@steedos-widgets/amis-object 1.2.5 → 1.2.6-beta.9
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/amis/AmisGlobalFooter.d.ts +2 -0
- package/dist/amis/AmisGlobalHeader.d.ts +157 -4
- package/dist/amis/AmisGlobalHeaderToolbar.d.ts +8 -0
- package/dist/amis/index.d.ts +2 -0
- package/dist/amis-object.cjs.css +150 -0
- package/dist/amis-object.cjs.js +294 -49
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.css +150 -0
- package/dist/amis-object.esm.js +293 -50
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.css +150 -0
- package/dist/amis-object.umd.js +294 -49
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +11 -11
- package/dist/meta.js +406 -253
- package/dist/metas/AmisGlobalFooter.d.ts +2 -0
- package/dist/metas/AmisGlobalHeaderToolbar.d.ts +2 -0
- package/package.json +3 -3
package/dist/amis-object.esm.css
CHANGED
|
@@ -295,15 +295,30 @@ body {
|
|
|
295
295
|
.sticky {
|
|
296
296
|
position: sticky
|
|
297
297
|
}
|
|
298
|
+
.inset-0 {
|
|
299
|
+
top: 0px;
|
|
300
|
+
right: 0px;
|
|
301
|
+
bottom: 0px;
|
|
302
|
+
left: 0px
|
|
303
|
+
}
|
|
298
304
|
.bottom-4 {
|
|
299
305
|
bottom: 1rem
|
|
300
306
|
}
|
|
301
307
|
.right-4 {
|
|
302
308
|
right: 1rem
|
|
303
309
|
}
|
|
310
|
+
.bottom-0 {
|
|
311
|
+
bottom: 0px
|
|
312
|
+
}
|
|
304
313
|
.top-0 {
|
|
305
314
|
top: 0px
|
|
306
315
|
}
|
|
316
|
+
.z-20 {
|
|
317
|
+
z-index: 20
|
|
318
|
+
}
|
|
319
|
+
.z-40 {
|
|
320
|
+
z-index: 40
|
|
321
|
+
}
|
|
307
322
|
.z-10 {
|
|
308
323
|
z-index: 10
|
|
309
324
|
}
|
|
@@ -365,6 +380,12 @@ body {
|
|
|
365
380
|
.mr-1 {
|
|
366
381
|
margin-right: 0.25rem
|
|
367
382
|
}
|
|
383
|
+
.mb-\[-3px\] {
|
|
384
|
+
margin-bottom: -3px
|
|
385
|
+
}
|
|
386
|
+
.mt-\[50px\] {
|
|
387
|
+
margin-top: 50px
|
|
388
|
+
}
|
|
368
389
|
.mt-1 {
|
|
369
390
|
margin-top: 0.25rem
|
|
370
391
|
}
|
|
@@ -422,9 +443,15 @@ body {
|
|
|
422
443
|
.h-12 {
|
|
423
444
|
height: 3rem
|
|
424
445
|
}
|
|
446
|
+
.h-16 {
|
|
447
|
+
height: 4rem
|
|
448
|
+
}
|
|
425
449
|
.h-10 {
|
|
426
450
|
height: 2.5rem
|
|
427
451
|
}
|
|
452
|
+
.h-\[50px\] {
|
|
453
|
+
height: 50px
|
|
454
|
+
}
|
|
428
455
|
.h-7 {
|
|
429
456
|
height: 1.75rem
|
|
430
457
|
}
|
|
@@ -467,6 +494,9 @@ body {
|
|
|
467
494
|
.w-auto {
|
|
468
495
|
width: auto
|
|
469
496
|
}
|
|
497
|
+
.w-64 {
|
|
498
|
+
width: 16rem
|
|
499
|
+
}
|
|
470
500
|
.w-96 {
|
|
471
501
|
width: 24rem
|
|
472
502
|
}
|
|
@@ -506,6 +536,10 @@ body {
|
|
|
506
536
|
.flex-shrink-0 {
|
|
507
537
|
flex-shrink: 0
|
|
508
538
|
}
|
|
539
|
+
.-translate-x-0 {
|
|
540
|
+
--tw-translate-x: -0px;
|
|
541
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))
|
|
542
|
+
}
|
|
509
543
|
@keyframes spin {
|
|
510
544
|
to {
|
|
511
545
|
transform: rotate(360deg)
|
|
@@ -523,6 +557,9 @@ body {
|
|
|
523
557
|
.flex-wrap {
|
|
524
558
|
flex-wrap: wrap
|
|
525
559
|
}
|
|
560
|
+
.flex-nowrap {
|
|
561
|
+
flex-wrap: nowrap
|
|
562
|
+
}
|
|
526
563
|
.items-center {
|
|
527
564
|
align-items: center
|
|
528
565
|
}
|
|
@@ -532,6 +569,13 @@ body {
|
|
|
532
569
|
.justify-between {
|
|
533
570
|
justify-content: space-between
|
|
534
571
|
}
|
|
572
|
+
.justify-evenly {
|
|
573
|
+
justify-content: space-evenly
|
|
574
|
+
}
|
|
575
|
+
.gap-x-3 {
|
|
576
|
+
-moz-column-gap: 0.75rem;
|
|
577
|
+
column-gap: 0.75rem
|
|
578
|
+
}
|
|
535
579
|
.space-x-4 > :not([hidden]) ~ :not([hidden]) {
|
|
536
580
|
--tw-space-x-reverse: 0;
|
|
537
581
|
margin-right: calc(1rem * var(--tw-space-x-reverse));
|
|
@@ -582,6 +626,9 @@ body {
|
|
|
582
626
|
.border-b {
|
|
583
627
|
border-bottom-width: 1px
|
|
584
628
|
}
|
|
629
|
+
.border-b-\[3px\] {
|
|
630
|
+
border-bottom-width: 3px
|
|
631
|
+
}
|
|
585
632
|
.border-r {
|
|
586
633
|
border-right-width: 1px
|
|
587
634
|
}
|
|
@@ -602,6 +649,14 @@ body {
|
|
|
602
649
|
--tw-border-opacity: 1;
|
|
603
650
|
border-color: rgb(209 213 219 / var(--tw-border-opacity))
|
|
604
651
|
}
|
|
652
|
+
.border-sky-500 {
|
|
653
|
+
--tw-border-opacity: 1;
|
|
654
|
+
border-color: rgb(14 165 233 / var(--tw-border-opacity))
|
|
655
|
+
}
|
|
656
|
+
.border-slate-200 {
|
|
657
|
+
--tw-border-opacity: 1;
|
|
658
|
+
border-color: rgb(226 232 240 / var(--tw-border-opacity))
|
|
659
|
+
}
|
|
605
660
|
.border-gray-200 {
|
|
606
661
|
--tw-border-opacity: 1;
|
|
607
662
|
border-color: rgb(229 231 235 / var(--tw-border-opacity))
|
|
@@ -689,6 +744,18 @@ body {
|
|
|
689
744
|
.pl-1 {
|
|
690
745
|
padding-left: 0.25rem
|
|
691
746
|
}
|
|
747
|
+
.pr-4 {
|
|
748
|
+
padding-right: 1rem
|
|
749
|
+
}
|
|
750
|
+
.pb-0 {
|
|
751
|
+
padding-bottom: 0px
|
|
752
|
+
}
|
|
753
|
+
.pb-16 {
|
|
754
|
+
padding-bottom: 4rem
|
|
755
|
+
}
|
|
756
|
+
.pb-4 {
|
|
757
|
+
padding-bottom: 1rem
|
|
758
|
+
}
|
|
692
759
|
.text-left {
|
|
693
760
|
text-align: left
|
|
694
761
|
}
|
|
@@ -710,6 +777,9 @@ body {
|
|
|
710
777
|
.text-\[15px\] {
|
|
711
778
|
font-size: 15px
|
|
712
779
|
}
|
|
780
|
+
.text-\[13px\] {
|
|
781
|
+
font-size: 13px
|
|
782
|
+
}
|
|
713
783
|
.text-xs {
|
|
714
784
|
font-size: 12px
|
|
715
785
|
}
|
|
@@ -804,6 +874,25 @@ body {
|
|
|
804
874
|
.\!filter {
|
|
805
875
|
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) !important
|
|
806
876
|
}
|
|
877
|
+
.backdrop-blur {
|
|
878
|
+
--tw-backdrop-blur: blur(8px);
|
|
879
|
+
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
|
|
880
|
+
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)
|
|
881
|
+
}
|
|
882
|
+
.transition-colors {
|
|
883
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
|
|
884
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
885
|
+
transition-duration: 150ms
|
|
886
|
+
}
|
|
887
|
+
.duration-500 {
|
|
888
|
+
transition-duration: 500ms
|
|
889
|
+
}
|
|
890
|
+
.duration-300 {
|
|
891
|
+
transition-duration: 300ms
|
|
892
|
+
}
|
|
893
|
+
.ease-in-out {
|
|
894
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1)
|
|
895
|
+
}
|
|
807
896
|
.hover\:bg-sky-50:hover {
|
|
808
897
|
--tw-bg-opacity: 1;
|
|
809
898
|
background-color: rgb(240 249 255 / var(--tw-bg-opacity))
|
|
@@ -819,9 +908,15 @@ body {
|
|
|
819
908
|
.sm\:mt-3 {
|
|
820
909
|
margin-top: 0.75rem
|
|
821
910
|
}
|
|
911
|
+
.sm\:mt-\[90px\] {
|
|
912
|
+
margin-top: 90px
|
|
913
|
+
}
|
|
822
914
|
.sm\:grid {
|
|
823
915
|
display: grid
|
|
824
916
|
}
|
|
917
|
+
.sm\:w-\[220px\] {
|
|
918
|
+
width: 220px
|
|
919
|
+
}
|
|
825
920
|
.sm\:grid-cols-4 {
|
|
826
921
|
grid-template-columns: repeat(4, minmax(0, 1fr))
|
|
827
922
|
}
|
|
@@ -865,6 +960,9 @@ body {
|
|
|
865
960
|
}
|
|
866
961
|
}
|
|
867
962
|
@media (min-width: 1024px) {
|
|
963
|
+
.lg\:z-50 {
|
|
964
|
+
z-index: 50
|
|
965
|
+
}
|
|
868
966
|
.lg\:order-first {
|
|
869
967
|
order: -9999
|
|
870
968
|
}
|
|
@@ -1081,6 +1179,58 @@ body {
|
|
|
1081
1179
|
height: -webkit-fill-available !important;
|
|
1082
1180
|
}
|
|
1083
1181
|
|
|
1182
|
+
.antd-AmisGlobalFooter .antd-Nav-Menu-item,
|
|
1183
|
+
.antd-AmisGlobalFooter .antd-Nav-Menu-submenu-title,
|
|
1184
|
+
.antd-AmisGlobalFooter .antd-Nav-Menu-overflow-item-rest {
|
|
1185
|
+
background-color: rgb(243 244 246) !important;
|
|
1186
|
+
}
|
|
1187
|
+
.antd-AmisGlobalFooter .antd-Nav-Menu-submenu-selected {
|
|
1188
|
+
border-bottom: none !important;
|
|
1189
|
+
}
|
|
1190
|
+
.antd-AmisGlobalFooter .antd-Nav-Menu-item.antd-Nav-Menu-item-selected:after {
|
|
1191
|
+
width: 0;
|
|
1192
|
+
}
|
|
1193
|
+
#steedos-global-footer .antd-Nav-Menu-horizontal.antd-Nav-Menu-light > .antd-Nav-Menu-submenu-selected .antd-Nav-Menu-item-icon,
|
|
1194
|
+
#steedosGlobalFooterRoot .antd-Nav-Menu-horizontal.antd-Nav-Menu-light .antd-Nav-Menu-item-icon {
|
|
1195
|
+
color: rgb(51 65 85);
|
|
1196
|
+
}
|
|
1197
|
+
.antd-AmisGlobalFooter .antd-Nav-Menu-submenu-open .antd-Nav-Menu-item-icon {
|
|
1198
|
+
color: #0970d1 !important;
|
|
1199
|
+
}
|
|
1200
|
+
.antd-AmisGlobalFooter .antd-Nav-Menu-item-selected .text-slate-700,
|
|
1201
|
+
.footer-popup .antd-Nav-Menu-item-selected .text-slate-700 {
|
|
1202
|
+
color: #0970d1 !important;
|
|
1203
|
+
}
|
|
1204
|
+
.antd-AmisGlobalFooter .antd-Nav-Menu-item-selected svg,
|
|
1205
|
+
.footer-popup .antd-Nav-Menu-item-selected svg {
|
|
1206
|
+
fill: #0970d1;
|
|
1207
|
+
}
|
|
1208
|
+
.antd-AmisGlobalFooter .antd-Nav-Menu-item-link,
|
|
1209
|
+
.antd-AmisGlobalFooter .antd-Nav-Menu-item-wrap,
|
|
1210
|
+
.antd-Nav-Menu-overflow-item {
|
|
1211
|
+
height: 100% !important;
|
|
1212
|
+
}
|
|
1213
|
+
.antd-AmisGlobalFooter .antd-Nav-Menu-submenu-title {
|
|
1214
|
+
height: 100% !important;
|
|
1215
|
+
display: flex;
|
|
1216
|
+
align-items: center;
|
|
1217
|
+
}
|
|
1218
|
+
.footer-popup .nav-label {
|
|
1219
|
+
flex-direction: unset !important;
|
|
1220
|
+
}
|
|
1221
|
+
.footer-popup {
|
|
1222
|
+
max-height: 50vh;
|
|
1223
|
+
overflow: auto;
|
|
1224
|
+
}
|
|
1225
|
+
.steedos-global-footer-root .antd-Nav-Menu-horizontal.antd-Nav-Menu-light {
|
|
1226
|
+
background-color: rgb(243 244 246);
|
|
1227
|
+
}
|
|
1228
|
+
@media (max-width: 767px) {
|
|
1229
|
+
.steedos-object-listview .antd-Table-content {
|
|
1230
|
+
max-height: calc(100vh - 263px);
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1084
1234
|
.sidebar-wrapper {
|
|
1085
1235
|
transition: 0.5s ease translate;
|
|
1086
1236
|
translate: -100% 0;
|
package/dist/amis-object.esm.js
CHANGED
|
@@ -13466,6 +13466,58 @@ var AmisAppMenu = function (props) { return __awaiter(void 0, void 0, void 0, fu
|
|
|
13466
13466
|
});
|
|
13467
13467
|
}); };
|
|
13468
13468
|
|
|
13469
|
+
/*
|
|
13470
|
+
* @Author: baozhoutao@steedos.com
|
|
13471
|
+
* @Date: 2022-09-01 14:44:57
|
|
13472
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
13473
|
+
* @LastEditTime: 2023-04-11 13:51:50
|
|
13474
|
+
* @Description:
|
|
13475
|
+
*/
|
|
13476
|
+
var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13477
|
+
var _a, stacked, overflow, appId, data, _b, links, _c, showIcon, _d, indentSize, selectedId, isMobile, className, className1, schema;
|
|
13478
|
+
return __generator(this, function (_e) {
|
|
13479
|
+
_a = props.stacked, stacked = _a === void 0 ? false : _a, overflow = props.overflow, appId = props.appId, data = props.data, _b = props.links, links = _b === void 0 ? null : _b, _c = props.showIcon, showIcon = _c === void 0 ? true : _c, _d = props.indentSize, indentSize = _d === void 0 ? 12 : _d, selectedId = props.selectedId;
|
|
13480
|
+
if (!appId) {
|
|
13481
|
+
appId = data.context.appId || 'admin';
|
|
13482
|
+
}
|
|
13483
|
+
isMobile = window.innerWidth <= 768;
|
|
13484
|
+
className = 'fixed bottom-0 z-20 flex justify-evenly w-full h-16 bg-gray-100 AmisGlobalFooter';
|
|
13485
|
+
className1 = 'fixed bottom-0 z-20 flex justify-center w-full h-16 bg-gray-100 AmisGlobalFooter';
|
|
13486
|
+
schema = {};
|
|
13487
|
+
if (links) {
|
|
13488
|
+
schema = {
|
|
13489
|
+
type: 'service',
|
|
13490
|
+
mobile: {
|
|
13491
|
+
body: [
|
|
13492
|
+
{
|
|
13493
|
+
"type": "nav",
|
|
13494
|
+
"className": links.length == 1 ? "".concat(className1) : "".concat(className),
|
|
13495
|
+
"stacked": stacked,
|
|
13496
|
+
"overflow": overflow,
|
|
13497
|
+
"indentSize": indentSize,
|
|
13498
|
+
"links": links
|
|
13499
|
+
}
|
|
13500
|
+
]
|
|
13501
|
+
}
|
|
13502
|
+
};
|
|
13503
|
+
}
|
|
13504
|
+
else if (isMobile) {
|
|
13505
|
+
schema = {
|
|
13506
|
+
type: 'service',
|
|
13507
|
+
schemaApi: {
|
|
13508
|
+
"method": "get",
|
|
13509
|
+
"url": "${context.rootUrl}/service/api/apps/".concat(appId, "/menus?try=1111111"),
|
|
13510
|
+
"adaptor": "\n try {\n if(payload.nav_schema){\n payload.data = payload.nav_schema;\n return payload\n }\n\n const data = { nav: [] };\n const stacked = ".concat(stacked, ";\n const showIcon = ").concat(showIcon, ";\n const selectedId = '").concat(selectedId, "';\n _.each(payload.children, (tab)=>{\n data.nav.push({\n \"label\": {\n type: 'tpl',\n tpl: `<span class='fill-slate-500 text-slate-700 block -ml-px no-underline group flex items-center text-[13px] font-medium rounded-md flex-col leading-3 nav-label'><svg class=\" flex-shrink-0 h-10 w-10\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg>${tab.name}</span>`,\n className:'h-full flex items-center'\n },\n \"to\": tab.path,\n \"target\":tab.target\n // active: selectedId === tab.id,\n });\n })\n\n payload.data = {\n \"type\": \"nav\",\n className: payload.children.length ==1 ? '").concat(className1, "' : '").concat(className, "',\n \"stacked\": ").concat(stacked, ",\n \"overflow\": ").concat(JSON.stringify(overflow), ",\n \"indentSize\": ").concat(indentSize, ",\n \"links\": data.nav,\n };\n } catch (error) {\n console.log(`error`, error)\n }\n return payload;\n "),
|
|
13511
|
+
"headers": {
|
|
13512
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
13513
|
+
}
|
|
13514
|
+
}
|
|
13515
|
+
};
|
|
13516
|
+
}
|
|
13517
|
+
return [2 /*return*/, schema];
|
|
13518
|
+
});
|
|
13519
|
+
}); };
|
|
13520
|
+
|
|
13469
13521
|
/*
|
|
13470
13522
|
* @Author: baozhoutao@steedos.com
|
|
13471
13523
|
* @Date: 2022-09-01 14:44:57
|
|
@@ -13473,7 +13525,7 @@ var AmisAppMenu = function (props) { return __awaiter(void 0, void 0, void 0, fu
|
|
|
13473
13525
|
* @LastEditTime: 2023-03-17 14:09:53
|
|
13474
13526
|
* @Description:
|
|
13475
13527
|
*/
|
|
13476
|
-
var
|
|
13528
|
+
var AmisGlobalHeaderToolbar = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13477
13529
|
var _a, className, data, _b, logoutScript, _c, customButtons, avatarSrc;
|
|
13478
13530
|
var _d, _e;
|
|
13479
13531
|
return __generator(this, function (_f) {
|
|
@@ -13485,7 +13537,7 @@ var AmisGlobalHeader = function (props) { return __awaiter(void 0, void 0, void
|
|
|
13485
13537
|
return [2 /*return*/, {
|
|
13486
13538
|
"type": "wrapper",
|
|
13487
13539
|
"id": "u:9c3d279be31a",
|
|
13488
|
-
"className": "steedos-global-header leading-3\t".concat(className),
|
|
13540
|
+
"className": "steedos-global-header-toolbar leading-3\t".concat(className),
|
|
13489
13541
|
"size": "xs",
|
|
13490
13542
|
"body": __spreadArray(__spreadArray([], __read(customButtons), false), [
|
|
13491
13543
|
{
|
|
@@ -13783,25 +13835,25 @@ var AmisGlobalHeader = function (props) { return __awaiter(void 0, void 0, void
|
|
|
13783
13835
|
},
|
|
13784
13836
|
"level": "link"
|
|
13785
13837
|
},
|
|
13786
|
-
|
|
13787
|
-
|
|
13788
|
-
|
|
13789
|
-
|
|
13790
|
-
|
|
13791
|
-
|
|
13792
|
-
|
|
13793
|
-
|
|
13794
|
-
|
|
13795
|
-
|
|
13796
|
-
|
|
13797
|
-
|
|
13798
|
-
|
|
13799
|
-
|
|
13800
|
-
|
|
13801
|
-
|
|
13802
|
-
|
|
13803
|
-
|
|
13804
|
-
|
|
13838
|
+
{
|
|
13839
|
+
"type": "button",
|
|
13840
|
+
"label": "关于",
|
|
13841
|
+
"className": "flex",
|
|
13842
|
+
"onEvent": {
|
|
13843
|
+
"click": {
|
|
13844
|
+
"actions": [
|
|
13845
|
+
{
|
|
13846
|
+
"args": {
|
|
13847
|
+
"url": "/app/-/page/about",
|
|
13848
|
+
"blank": false
|
|
13849
|
+
},
|
|
13850
|
+
"actionType": "link"
|
|
13851
|
+
}
|
|
13852
|
+
]
|
|
13853
|
+
}
|
|
13854
|
+
},
|
|
13855
|
+
"level": "link"
|
|
13856
|
+
},
|
|
13805
13857
|
{
|
|
13806
13858
|
"type": "button",
|
|
13807
13859
|
"label": "注销",
|
|
@@ -13830,6 +13882,194 @@ var AmisGlobalHeader = function (props) { return __awaiter(void 0, void 0, void
|
|
|
13830
13882
|
});
|
|
13831
13883
|
}); };
|
|
13832
13884
|
|
|
13885
|
+
/*
|
|
13886
|
+
* @Author: baozhoutao@steedos.com
|
|
13887
|
+
* @Date: 2022-09-01 14:44:57
|
|
13888
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
13889
|
+
* @LastEditTime: 2023-04-11 13:51:50
|
|
13890
|
+
* @Description:
|
|
13891
|
+
*/
|
|
13892
|
+
var AmisGlobalHeader = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13893
|
+
var logoSrc, isMobile, schema;
|
|
13894
|
+
return __generator(this, function (_a) {
|
|
13895
|
+
logoSrc = props.logoSrc;
|
|
13896
|
+
isMobile = window.innerWidth <= 768;
|
|
13897
|
+
schema = {
|
|
13898
|
+
"type": "wrapper",
|
|
13899
|
+
"className": 'p-0',
|
|
13900
|
+
body: [
|
|
13901
|
+
{
|
|
13902
|
+
"type": "wrapper",
|
|
13903
|
+
"className": "bg-white sticky p-0 top-0 z-40 w-full flex-none backdrop-blur transition-colors duration-500 lg:z-50 sm:shadow border-b-[3px] border-sky-500 border-solid steedos-header-container",
|
|
13904
|
+
body: [
|
|
13905
|
+
{
|
|
13906
|
+
"type": "wrapper",
|
|
13907
|
+
"className": 'flex w-full px-4 h-[50px] p-0 justify-between items-center steedos-header-container-line-one',
|
|
13908
|
+
"body": [
|
|
13909
|
+
{
|
|
13910
|
+
type: "wrapper",
|
|
13911
|
+
className: 'p-0 flex flex-1 items-center',
|
|
13912
|
+
body: [
|
|
13913
|
+
{
|
|
13914
|
+
"type": "button",
|
|
13915
|
+
"className": "toggle-sidebar flex items-center pr-4",
|
|
13916
|
+
"hiddenOn": "true",
|
|
13917
|
+
"onEvent": {
|
|
13918
|
+
"click": {
|
|
13919
|
+
"actions": [
|
|
13920
|
+
{
|
|
13921
|
+
"actionType": "custom",
|
|
13922
|
+
"script": "document.body.classList.toggle('sidebar-open')",
|
|
13923
|
+
}
|
|
13924
|
+
]
|
|
13925
|
+
}
|
|
13926
|
+
},
|
|
13927
|
+
"body": [
|
|
13928
|
+
{
|
|
13929
|
+
"type": "steedos-icon",
|
|
13930
|
+
"category": "utility",
|
|
13931
|
+
"name": "rows",
|
|
13932
|
+
"colorVariant": "default",
|
|
13933
|
+
"id": "u:afc3a08e8cf3",
|
|
13934
|
+
"className": "slds-button_icon slds-global-header__icon"
|
|
13935
|
+
}
|
|
13936
|
+
],
|
|
13937
|
+
},
|
|
13938
|
+
{
|
|
13939
|
+
"className": 'block h-10 w-auto mr-4',
|
|
13940
|
+
"type": "tpl",
|
|
13941
|
+
"tpl": "<a href='/app' class='flex items-center '><img class='block h-10 w-auto' src='".concat(logoSrc, "'></a>"),
|
|
13942
|
+
},
|
|
13943
|
+
],
|
|
13944
|
+
},
|
|
13945
|
+
{
|
|
13946
|
+
"type": "steedos-global-header-toolbar",
|
|
13947
|
+
"label": "Global Header",
|
|
13948
|
+
className: 'flex flex-nowrap gap-x-3 items-center',
|
|
13949
|
+
logoutScript: "window.signOut();",
|
|
13950
|
+
customButtons: [
|
|
13951
|
+
{
|
|
13952
|
+
"type": "button",
|
|
13953
|
+
"className": "toggle-sidebar",
|
|
13954
|
+
"visibleOn": "${AND(app.showSidebar,!" + isMobile + ")}",
|
|
13955
|
+
"onEvent": {
|
|
13956
|
+
"click": {
|
|
13957
|
+
"actions": [
|
|
13958
|
+
{
|
|
13959
|
+
"actionType": "custom",
|
|
13960
|
+
"script": "document.body.classList.toggle('sidebar-open')",
|
|
13961
|
+
}
|
|
13962
|
+
]
|
|
13963
|
+
}
|
|
13964
|
+
},
|
|
13965
|
+
"body": [
|
|
13966
|
+
{
|
|
13967
|
+
"type": "steedos-icon",
|
|
13968
|
+
"category": "utility",
|
|
13969
|
+
"name": "rows",
|
|
13970
|
+
"colorVariant": "default",
|
|
13971
|
+
"id": "u:afc3a08e8cf3",
|
|
13972
|
+
"className": "slds-button_icon slds-global-header__icon"
|
|
13973
|
+
}
|
|
13974
|
+
],
|
|
13975
|
+
},
|
|
13976
|
+
{
|
|
13977
|
+
"type": "steedos-app-launcher",
|
|
13978
|
+
"showAppName": false,
|
|
13979
|
+
"appId": "${app.id}",
|
|
13980
|
+
"visibleOn": "${isMobile}"
|
|
13981
|
+
}
|
|
13982
|
+
]
|
|
13983
|
+
}
|
|
13984
|
+
],
|
|
13985
|
+
},
|
|
13986
|
+
{
|
|
13987
|
+
"type": "grid",
|
|
13988
|
+
"className": 'steedos-context-bar flex flex-nowrap h-10 leading-5 pl-4 mb-[-3px] steedos-header-container-line-two',
|
|
13989
|
+
"hiddenOn": "${" + isMobile + "}",
|
|
13990
|
+
"columns": [
|
|
13991
|
+
{
|
|
13992
|
+
"columnClassName": "items-center flex pb-0",
|
|
13993
|
+
"body": [
|
|
13994
|
+
{
|
|
13995
|
+
"type": "steedos-app-launcher",
|
|
13996
|
+
"showAppName": true,
|
|
13997
|
+
"appId": "${app.id}",
|
|
13998
|
+
}
|
|
13999
|
+
],
|
|
14000
|
+
"md": "auto",
|
|
14001
|
+
"valign": "middle"
|
|
14002
|
+
},
|
|
14003
|
+
{
|
|
14004
|
+
"columnClassName": "flex overflow-hidden",
|
|
14005
|
+
"hiddenOn": "${app.showSidebar === true}",
|
|
14006
|
+
"body": [
|
|
14007
|
+
{
|
|
14008
|
+
"visibleOn": "${AND(!app.showSidebar,!" + isMobile + ")}",
|
|
14009
|
+
"type": "steedos-app-menu",
|
|
14010
|
+
"stacked": false,
|
|
14011
|
+
showIcon: false,
|
|
14012
|
+
"appId": "${app.id}",
|
|
14013
|
+
overflow: {
|
|
14014
|
+
enable: false,
|
|
14015
|
+
itemWidth: 80,
|
|
14016
|
+
},
|
|
14017
|
+
"id": "u:77851eb4aa89",
|
|
14018
|
+
}
|
|
14019
|
+
],
|
|
14020
|
+
"id": "u:5367229505d8",
|
|
14021
|
+
"md": "",
|
|
14022
|
+
"valign": "middle",
|
|
14023
|
+
}
|
|
14024
|
+
],
|
|
14025
|
+
},
|
|
14026
|
+
],
|
|
14027
|
+
},
|
|
14028
|
+
{
|
|
14029
|
+
"type": "button",
|
|
14030
|
+
"className": 'p-0 absolute inset-0 mt-[50px] sm:mt-[90px]',
|
|
14031
|
+
hiddenOn: "${app.showSidebar != true}",
|
|
14032
|
+
body: [
|
|
14033
|
+
{
|
|
14034
|
+
type: "wrapper",
|
|
14035
|
+
className: 'sidebar-wrapper px-0 pt-4 pb-16 fixed z-20 h-full h-fill ease-in-out duration-300 flex flex-col border-r overflow-y-auto bg-white border-slate-200 block -translate-x-0 sm:w-[220px] w-64',
|
|
14036
|
+
body: [
|
|
14037
|
+
{
|
|
14038
|
+
"type": "steedos-app-launcher",
|
|
14039
|
+
"className": "px-4 pb-4",
|
|
14040
|
+
"visibleOn": "${isMobile}",
|
|
14041
|
+
"showAppName": true
|
|
14042
|
+
},
|
|
14043
|
+
{
|
|
14044
|
+
"type": "steedos-app-menu",
|
|
14045
|
+
"stacked": true,
|
|
14046
|
+
"appId": "${app.id}",
|
|
14047
|
+
},
|
|
14048
|
+
]
|
|
14049
|
+
},
|
|
14050
|
+
{
|
|
14051
|
+
"type": "wrapper",
|
|
14052
|
+
"className": 'sidebar-overlay',
|
|
14053
|
+
"hiddenOn": "${!isMobile}",
|
|
14054
|
+
}
|
|
14055
|
+
],
|
|
14056
|
+
"onEvent": {
|
|
14057
|
+
"click": {
|
|
14058
|
+
"actions": [
|
|
14059
|
+
{
|
|
14060
|
+
"actionType": "custom",
|
|
14061
|
+
"script": "console.log(event.target); if(window.innerWidth < 768){ document.body.classList.remove('sidebar-open'); }",
|
|
14062
|
+
}
|
|
14063
|
+
]
|
|
14064
|
+
}
|
|
14065
|
+
},
|
|
14066
|
+
},
|
|
14067
|
+
],
|
|
14068
|
+
};
|
|
14069
|
+
return [2 /*return*/, schema];
|
|
14070
|
+
});
|
|
14071
|
+
}); };
|
|
14072
|
+
|
|
13833
14073
|
var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13834
14074
|
var steedosField, field, _a, readonly, _b, ctx, config, $schema, schema, error_1;
|
|
13835
14075
|
return __generator(this, function (_c) {
|
|
@@ -13878,39 +14118,42 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
|
|
|
13878
14118
|
* @Author: baozhoutao@steedos.com
|
|
13879
14119
|
* @Date: 2023-01-14 16:41:24
|
|
13880
14120
|
* @LastEditors: baozhoutao@steedos.com
|
|
13881
|
-
* @LastEditTime: 2023-
|
|
14121
|
+
* @LastEditTime: 2023-04-21 11:50:26
|
|
13882
14122
|
* @Description:
|
|
13883
14123
|
*/
|
|
13884
14124
|
var getSelectFlowSchema = function (id, props) {
|
|
13885
14125
|
var label = props.label, data = props.data, name = props.name, required = props.required, _a = props.action, action = _a === void 0 ? 'query' : _a, _b = props.distributeInstanceId, distributeInstanceId = _b === void 0 ? "" : _b, _c = props.distributeStepId, distributeStepId = _c === void 0 ? "" : _c, _d = props.mode, mode = _d === void 0 ? 'input-tree' : _d, className = props.className, onEvent = props.onEvent, _e = props.multiple, multiple = _e === void 0 ? false : _e, delimiter = props.delimiter, joinValues = props.joinValues, extractValue = props.extractValue, searchable = props.searchable, _f = props.showIcon, showIcon = _f === void 0 ? true : _f, _g = props.showRadio, showRadio = _g === void 0 ? false : _g, showOutline = props.showOutline, initiallyOpen = props.initiallyOpen, unfoldedLevel = props.unfoldedLevel, treeContainerClassName = props.treeContainerClassName, _h = props.amis, amis = _h === void 0 ? {} : _h;
|
|
13886
14126
|
console.log("=====onEvent", onEvent);
|
|
13887
|
-
return __assign$2({ "type": mode, "id": id, "label": label, "name": name, "options": [], "multiple": multiple, "delimiter": delimiter, "joinValues": joinValues, "extractValue": extractValue, "searchable": searchable, "showOutline": showOutline, "initiallyOpen": initiallyOpen, "unfoldedLevel": unfoldedLevel, "className": className, "required": required, "treeContainerClassName": treeContainerClassName,
|
|
13888
|
-
|
|
13889
|
-
|
|
13890
|
-
|
|
13891
|
-
|
|
13892
|
-
|
|
13893
|
-
|
|
13894
|
-
|
|
13895
|
-
|
|
13896
|
-
|
|
13897
|
-
|
|
13898
|
-
|
|
13899
|
-
|
|
13900
|
-
|
|
13901
|
-
|
|
13902
|
-
|
|
13903
|
-
|
|
13904
|
-
|
|
13905
|
-
|
|
13906
|
-
|
|
13907
|
-
|
|
13908
|
-
|
|
13909
|
-
|
|
13910
|
-
|
|
13911
|
-
|
|
13912
|
-
|
|
13913
|
-
}
|
|
14127
|
+
return __assign$2({ "type": mode, "id": id, "label": label, "name": name, "options": [], "multiple": multiple, "delimiter": delimiter, "joinValues": joinValues, "extractValue": extractValue, "searchable": searchable, "showOutline": showOutline, "initiallyOpen": initiallyOpen, "unfoldedLevel": unfoldedLevel, "className": className, "required": required, "treeContainerClassName": treeContainerClassName,
|
|
14128
|
+
// "menuTpl": {
|
|
14129
|
+
// // type: "button",
|
|
14130
|
+
// type: "tpl",
|
|
14131
|
+
// tpl: "<div class='flex justify-between'><span>${label}</span><span class='rounded p-1 text-xs text-center w-14 ${children != null ? \'hidden\' : \'\'}'><button><i class='fa-regular fa-star'></i></button></span></div>",
|
|
14132
|
+
// "onEvent": {
|
|
14133
|
+
// "click": {
|
|
14134
|
+
// "weight": 0,
|
|
14135
|
+
// "actions": [
|
|
14136
|
+
// {
|
|
14137
|
+
// actionType: 'custom',
|
|
14138
|
+
// script: "console.log('====event', event), event.preventDefault(); event.stopPropagation()"
|
|
14139
|
+
// },
|
|
14140
|
+
// {
|
|
14141
|
+
// "args": {
|
|
14142
|
+
// "api": {
|
|
14143
|
+
// "url": "/aaa",
|
|
14144
|
+
// "method": "get",
|
|
14145
|
+
// "messages": {
|
|
14146
|
+
// }
|
|
14147
|
+
// }
|
|
14148
|
+
// },
|
|
14149
|
+
// "actionType": "download",
|
|
14150
|
+
// "stopPropagation": true
|
|
14151
|
+
// }
|
|
14152
|
+
// ]
|
|
14153
|
+
// }
|
|
14154
|
+
// }
|
|
14155
|
+
// },
|
|
14156
|
+
"source": {
|
|
13914
14157
|
"method": "post",
|
|
13915
14158
|
"url": "${context.rootUrl}/graphql?keywords=${keywords}",
|
|
13916
14159
|
"requestAdaptor": "\n const keywords = api.body.keywords || '';\n const appId = '".concat(data.app_id || '', "';\n api.data = {\n query: `\n {\n options: flows__getList(action: \"").concat(action, "\", keywords: \"${keywords}\", appId: \"${appId}\", distributeInstanceId: \"").concat(distributeInstanceId, "\", distributeStepId: \"").concat(distributeStepId, "\"){\n value:_id\n label:name\n children: flows{\n value: _id,\n label: name\n }\n }\n }\n `\n }\n "),
|
|
@@ -14161,5 +14404,5 @@ var index_esm = /*#__PURE__*/Object.freeze({
|
|
|
14161
14404
|
SteedosUI: SteedosUI$1
|
|
14162
14405
|
});
|
|
14163
14406
|
|
|
14164
|
-
export { AmisAppLauncher, AmisAppMenu, AmisGlobalHeader, AmisInstanceDetail, index_esm$1 as AmisLib, AmisLogo, AmisObjectButton, AmisObjectCalendar, AmisObjectFieldLookup, AmisObjectForm, AmisObjectListView, AmisObjectTable, AmisProvider, AmisRecordDetail, AmisRecordDetailHeader, AmisRecordDetailRelatedList, AmisRecordDetailRelatedLists, AmisRecordService, AmisSelectFlow, AmisSelectUser, AmisSteedosField, FromNow, PageListView, PageObject, PageRecordDetail, SteedosBadge, SteedosBadgeRibbon, SteedosDropdown, SteedosDropdownButton, SteedosIcon, index_esm as SteedosLib, SteedosLoading, SteedosSkeleton };
|
|
14407
|
+
export { AmisAppLauncher, AmisAppMenu, AmisGlobalFooter, AmisGlobalHeader, AmisGlobalHeaderToolbar, AmisInstanceDetail, index_esm$1 as AmisLib, AmisLogo, AmisObjectButton, AmisObjectCalendar, AmisObjectFieldLookup, AmisObjectForm, AmisObjectListView, AmisObjectTable, AmisProvider, AmisRecordDetail, AmisRecordDetailHeader, AmisRecordDetailRelatedList, AmisRecordDetailRelatedLists, AmisRecordService, AmisSelectFlow, AmisSelectUser, AmisSteedosField, FromNow, PageListView, PageObject, PageRecordDetail, SteedosBadge, SteedosBadgeRibbon, SteedosDropdown, SteedosDropdownButton, SteedosIcon, index_esm as SteedosLib, SteedosLoading, SteedosSkeleton };
|
|
14165
14408
|
//# sourceMappingURL=amis-object.esm.js.map
|