@steedos/webapp 3.0.2-beta.2 → 3.0.2-beta.4

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.
@@ -51612,245 +51612,251 @@ Try polyfilling it using "@formatjs/intl-displaynames"
51612
51612
  const isMobile = false;
51613
51613
  const badgeText = "${IF(${id} == 'approve_workflow',${badge|pick:'workflow'},${badge|pick:${id}}) | toInt}";
51614
51614
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(AmisRender, { schema: {
51615
- "type": "service",
51616
- "id": "u:0f6224a0836f",
51617
- "affixFooter": false,
51618
- "body": [
51619
- {
51620
- "type": "panel",
51621
- "key": "1",
51622
- "title": localizeMessage("accounts.app"),
51623
- "className": "p-4 shadow border-none",
51624
- "header": [
51625
- {
51626
- "type": "flex",
51627
- "justify": "space-between",
51628
- "items": [
51629
- {
51630
- "type": "wrapper",
51631
- "className": "text-xl font-bold p-0",
51632
- "body": [
51633
- {
51634
- "type": "plain",
51635
- "text": localizeMessage("accounts.app")
51636
- }
51637
- ]
51638
- },
51639
- {
51640
- "type": "wrapper",
51641
- "className": "p-0",
51642
- "body": [
51643
- {
51644
- "type": "button",
51645
- "label": localizeMessage("accounts.refresh"),
51646
- "className": "hidden btn-reload-app-dashboard",
51647
- "onEvent": {
51648
- "click": {
51649
- "actions": [
51650
- {
51651
- "actionType": "reload"
51652
- }
51653
- ]
51654
- }
51615
+ "type": "spinner",
51616
+ "show": true,
51617
+ "overlay": true,
51618
+ "body": {
51619
+ "type": "service",
51620
+ "id": "u:0f6224a0836f",
51621
+ "affixFooter": false,
51622
+ "body": [
51623
+ {
51624
+ "type": "panel",
51625
+ "key": "1",
51626
+ "title": localizeMessage("accounts.app"),
51627
+ "className": "p-4 shadow border-none",
51628
+ "header": [
51629
+ {
51630
+ "type": "flex",
51631
+ "justify": "space-between",
51632
+ "items": [
51633
+ {
51634
+ "type": "wrapper",
51635
+ "className": "text-xl font-bold p-0",
51636
+ "body": [
51637
+ {
51638
+ "type": "plain",
51639
+ "text": localizeMessage("accounts.app")
51655
51640
  }
51656
- },
51657
- {
51658
- "type": "button",
51659
- "label": localizeMessage("accounts.newApp"),
51660
- "actionType": "dialog",
51661
- "level": "primary",
51662
- "visibleOn": "Builder.settings.context.user.is_space_admin == true",
51663
- "dialog": {
51664
- "title": localizeMessage("accounts.newApp"),
51665
- "actions": [
51666
- {
51667
- "type": "button",
51668
- "actionType": "cancel",
51669
- "label": localizeMessage("accounts.Cancel")
51670
- },
51671
- {
51672
- "type": "button",
51673
- "actionType": "confirm",
51674
- "label": localizeMessage("accounts.OK"),
51675
- "primary": true
51676
- }
51677
- ],
51678
- "body": [
51679
- {
51680
- "type": "form",
51681
- "canAccessSuperData": false,
51682
- "api": {
51683
- "url": "/service/api/apps/create_by_design",
51684
- "method": "post",
51685
- "requestAdaptor": "api.data={code: context.code, name: context.name, icon: context.icon}; return api;",
51686
- "adaptor": "window.location.href=Steedos.getRelativeUrl('/app/' + payload.code);return {}",
51687
- "messages": {}
51688
- },
51689
- "body": [
51690
- {
51691
- "type": "input-text",
51692
- "name": "code",
51693
- "label": localizeMessage("accounts.appCode"),
51694
- "value": "a_${UUID(6)}",
51695
- "required": true,
51696
- "validateOnChange": true,
51697
- "validations": {
51698
- "isVariableName": /^[a-zA-Z]([A-Za-z0-9]|_(?!_))*[A-Za-z0-9]$/
51699
- }
51700
- },
51701
- {
51702
- "name": "name",
51703
- "type": "input-text",
51704
- "label": localizeMessage("accounts.appName"),
51705
- "required": true
51706
- },
51641
+ ]
51642
+ },
51643
+ {
51644
+ "type": "wrapper",
51645
+ "className": "p-0",
51646
+ "body": [
51647
+ {
51648
+ "type": "button",
51649
+ "label": localizeMessage("accounts.refresh"),
51650
+ "className": "hidden btn-reload-app-dashboard",
51651
+ "onEvent": {
51652
+ "click": {
51653
+ "actions": [
51707
51654
  {
51708
- "type": "steedos-field",
51709
- "label": localizeMessage("accounts.appIcon"),
51710
- "config": {
51711
- "label": localizeMessage("accounts.appIcon"),
51712
- "type": "lookup",
51713
- "required": true,
51714
- "sort_no": 30,
51715
- "optionsFunction": "function anonymous() { var options; options = []; _.forEach(Steedos.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }",
51716
- "name": "icon",
51717
- "inlineHelpText": "",
51718
- "description": "",
51719
- "hidden": false,
51720
- "readonly": false,
51721
- "disabled": false
51722
- }
51655
+ "actionType": "reload"
51723
51656
  }
51724
51657
  ]
51725
51658
  }
51726
- ]
51727
- }
51728
- }
51729
- ]
51730
- }
51731
- ]
51732
- }
51733
- ],
51734
- "body": [
51735
- {
51736
- "type": "each",
51737
- "name": "app_items",
51738
- "items": [{
51739
- "type": "button",
51740
- "level": "link",
51741
- "body": [{
51742
- "type": "tpl",
51743
- "tpl": "<div class='slds-app-launcher__tile slds-text-link_reset'><div class='slds-app-launcher__tile-figure'><svg class='w-12 h-12 slds-icon slds-icon_container rounded-sm slds-icon-${iconCategory || 'standard'}-${REPLACE(icon, '_', '-')}' aria-hidden='true'><use xlink:href='/assets/icons/${iconCategory || 'standard'}-sprite/svg/symbols.svg#${icon}'></use></svg><span class='slds-assistive-text'>${name}</span></div><div class='slds-app-launcher__tile-body'><span class='slds-link text-blue-600 text-lg'><span title='${name}'>${name}</span></span><div style='display: -webkit-box; -webkit-line-clamp: 1;-webkit-box-orient: vertical;overflow: hidden;'><span title='${description}'>${description}</span></div></div></div>",
51744
- "badge": {
51745
- "mode": "text",
51746
- "text": badgeText,
51747
- "visibleOn": badgeText,
51748
- "className": "w-full",
51749
- "overflowCount": 99,
51750
- "style": {
51751
- "top": "20px",
51752
- "left": "37px",
51753
- "height": "20px",
51754
- "border-radius": "10px",
51755
- "line-height": "18px",
51756
- "margin-left": "${" + badgeText + ">9?(" + badgeText + ">99?'-21px':'-11px'):'0'}",
51757
- "right": "auto",
51758
- "font-size": "16px"
51759
- }
51760
- }
51761
- }],
51762
- "onEvent": {
51763
- "click": {
51764
- "actions": [
51765
- {
51766
- "actionType": "closeDialog"
51767
- },
51768
- {
51769
- "actionType": "link",
51770
- "args": {
51771
- "link": "${path}"
51772
- },
51773
- "expression": "${AND(!blank , !on_click)}"
51774
- },
51775
- {
51776
- "actionType": "url",
51777
- "args": {
51778
- "url": "${path}",
51779
- "blank": true
51780
- },
51781
- "expression": "${AND(blank , !on_click)}"
51659
+ }
51782
51660
  },
51783
51661
  {
51784
- "actionType": "custom",
51785
- "script": on_click_script,
51786
- "expression": "${!!on_click}"
51662
+ "type": "button",
51663
+ "label": localizeMessage("accounts.newApp"),
51664
+ "actionType": "dialog",
51665
+ "level": "primary",
51666
+ "visibleOn": "Builder.settings.context.user.is_space_admin == true",
51667
+ "dialog": {
51668
+ "title": localizeMessage("accounts.newApp"),
51669
+ "actions": [
51670
+ {
51671
+ "type": "button",
51672
+ "actionType": "cancel",
51673
+ "label": localizeMessage("accounts.Cancel")
51674
+ },
51675
+ {
51676
+ "type": "button",
51677
+ "actionType": "confirm",
51678
+ "label": localizeMessage("accounts.OK"),
51679
+ "primary": true
51680
+ }
51681
+ ],
51682
+ "body": [
51683
+ {
51684
+ "type": "form",
51685
+ "canAccessSuperData": false,
51686
+ "api": {
51687
+ "url": "/service/api/apps/create_by_design",
51688
+ "method": "post",
51689
+ "requestAdaptor": "api.data={code: context.code, name: context.name, icon: context.icon}; return api;",
51690
+ "adaptor": "window.location.href=Steedos.getRelativeUrl('/app/' + payload.code);return {}",
51691
+ "messages": {}
51692
+ },
51693
+ "body": [
51694
+ {
51695
+ "type": "input-text",
51696
+ "name": "code",
51697
+ "label": localizeMessage("accounts.appCode"),
51698
+ "value": "a_${UUID(6)}",
51699
+ "required": true,
51700
+ "validateOnChange": true,
51701
+ "validations": {
51702
+ "isVariableName": /^[a-zA-Z]([A-Za-z0-9]|_(?!_))*[A-Za-z0-9]$/
51703
+ }
51704
+ },
51705
+ {
51706
+ "name": "name",
51707
+ "type": "input-text",
51708
+ "label": localizeMessage("accounts.appName"),
51709
+ "required": true
51710
+ },
51711
+ {
51712
+ "type": "steedos-field",
51713
+ "label": localizeMessage("accounts.appIcon"),
51714
+ "config": {
51715
+ "label": localizeMessage("accounts.appIcon"),
51716
+ "type": "lookup",
51717
+ "required": true,
51718
+ "sort_no": 30,
51719
+ "optionsFunction": "function anonymous() { var options; options = []; _.forEach(Steedos.resources.sldsIcons.standard, function (svg) { return options.push({ value: svg, label: svg, icon: svg }); }); return options; }",
51720
+ "name": "icon",
51721
+ "inlineHelpText": "",
51722
+ "description": "",
51723
+ "hidden": false,
51724
+ "readonly": false,
51725
+ "disabled": false
51726
+ }
51727
+ }
51728
+ ]
51729
+ }
51730
+ ]
51731
+ }
51787
51732
  }
51788
51733
  ]
51789
51734
  }
51735
+ ]
51736
+ }
51737
+ ],
51738
+ "body": [
51739
+ {
51740
+ "type": "each",
51741
+ "name": "app_items",
51742
+ "items": [{
51743
+ "type": "button",
51744
+ "level": "link",
51745
+ "body": [{
51746
+ "type": "tpl",
51747
+ "tpl": "<div class='slds-app-launcher__tile slds-text-link_reset'><div class='slds-app-launcher__tile-figure'><svg class='w-12 h-12 slds-icon slds-icon_container rounded-sm slds-icon-${iconCategory || 'standard'}-${REPLACE(icon, '_', '-')}' aria-hidden='true'><use xlink:href='/assets/icons/${iconCategory || 'standard'}-sprite/svg/symbols.svg#${icon}'></use></svg><span class='slds-assistive-text'>${name}</span></div><div class='slds-app-launcher__tile-body'><span class='slds-link text-blue-600 text-lg'><span title='${name}'>${name}</span></span><div style='display: -webkit-box; -webkit-line-clamp: 1;-webkit-box-orient: vertical;overflow: hidden;'><span title='${description}'>${description}</span></div></div></div>",
51748
+ "badge": {
51749
+ "mode": "text",
51750
+ "text": badgeText,
51751
+ "visibleOn": badgeText,
51752
+ "className": "w-full",
51753
+ "overflowCount": 99,
51754
+ "style": {
51755
+ "top": "20px",
51756
+ "left": "37px",
51757
+ "height": "20px",
51758
+ "border-radius": "10px",
51759
+ "line-height": "18px",
51760
+ "margin-left": "${" + badgeText + ">9?(" + badgeText + ">99?'-21px':'-11px'):'0'}",
51761
+ "right": "auto",
51762
+ "font-size": "16px"
51763
+ }
51764
+ }
51765
+ }],
51766
+ "onEvent": {
51767
+ "click": {
51768
+ "actions": [
51769
+ {
51770
+ "actionType": "closeDialog"
51771
+ },
51772
+ {
51773
+ "actionType": "link",
51774
+ "args": {
51775
+ "link": "${path}"
51776
+ },
51777
+ "expression": "${AND(!blank , !on_click)}"
51778
+ },
51779
+ {
51780
+ "actionType": "url",
51781
+ "args": {
51782
+ "url": "${path}",
51783
+ "blank": true
51784
+ },
51785
+ "expression": "${AND(blank , !on_click)}"
51786
+ },
51787
+ {
51788
+ "actionType": "custom",
51789
+ "script": on_click_script,
51790
+ "expression": "${!!on_click}"
51791
+ }
51792
+ ]
51793
+ }
51794
+ },
51795
+ "inline": true,
51796
+ "style": {},
51797
+ "visibleOn": "${visible_on}",
51798
+ "className": "slds-p-horizontal_small app-item app-item-${id}"
51799
+ }],
51800
+ "className": "grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4"
51801
+ }
51802
+ ],
51803
+ "visible": false
51804
+ }
51805
+ ],
51806
+ "className": "steedos-apps-service steedos-apps-home p-4",
51807
+ "visibleOn": "",
51808
+ "clearValueOnHidden": false,
51809
+ "visible": true,
51810
+ "messages": {},
51811
+ "onEvent": {
51812
+ "@data.changed.steedos_keyvalues": {
51813
+ "actions": [
51814
+ {
51815
+ "actionType": "reload"
51816
+ }
51817
+ ]
51818
+ },
51819
+ "fetchInited": {
51820
+ "actions": [
51821
+ {
51822
+ "actionType": "broadcast",
51823
+ "args": {
51824
+ "eventName": "@appsLoaded"
51790
51825
  },
51791
- "inline": true,
51792
- "style": {},
51793
- "visibleOn": "${visible_on}",
51794
- "className": "slds-p-horizontal_small app-item app-item-${id}"
51795
- }],
51796
- "className": "grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4"
51797
- }
51798
- ]
51799
- }
51800
- ],
51801
- "className": "steedos-apps-service steedos-apps-home p-4",
51802
- "visibleOn": "",
51803
- "clearValueOnHidden": false,
51804
- "visible": true,
51805
- "messages": {},
51806
- "onEvent": {
51807
- "@data.changed.steedos_keyvalues": {
51808
- "actions": [
51809
- {
51810
- "actionType": "reload"
51811
- }
51812
- ]
51813
- },
51814
- "fetchInited": {
51815
- "actions": [
51816
- {
51817
- "actionType": "broadcast",
51818
- "args": {
51819
- "eventName": "@appsLoaded"
51820
- },
51821
- "data": {
51822
- "apps": "${event.data.app_items}"
51826
+ "data": {
51827
+ "apps": "${event.data.app_items}"
51828
+ }
51823
51829
  }
51830
+ ]
51831
+ }
51832
+ },
51833
+ "api": {
51834
+ "method": "get",
51835
+ "cache": "10000",
51836
+ "url": "${context.rootUrl}/service/api/apps/menus?mobile=" + isMobile,
51837
+ "data": null,
51838
+ "headers": {
51839
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
51840
+ },
51841
+ // "adaptor": pcInitApiAdaptorScript
51842
+ adaptor: pcInitJumtoFirstAppFirstTabScript
51843
+ },
51844
+ data: {
51845
+ objectName: "",
51846
+ pageType: "",
51847
+ listName: "",
51848
+ app: "",
51849
+ appId: "",
51850
+ app_id: ""
51851
+ },
51852
+ dataProvider: function(data2, setData) {
51853
+ window.addEventListener("message", function(event2) {
51854
+ const { data: data22 } = event2;
51855
+ if (data22 && data22.type === "page.dataProvider.setData") {
51856
+ setData(data22.data);
51824
51857
  }
51825
- ]
51858
+ });
51826
51859
  }
51827
- },
51828
- "api": {
51829
- "method": "get",
51830
- "cache": "10000",
51831
- "url": "${context.rootUrl}/service/api/apps/menus?mobile=" + isMobile,
51832
- "data": null,
51833
- "headers": {
51834
- "Authorization": "Bearer ${context.tenantId},${context.authToken}"
51835
- },
51836
- // "adaptor": pcInitApiAdaptorScript
51837
- adaptor: pcInitJumtoFirstAppFirstTabScript
51838
- },
51839
- data: {
51840
- objectName: "",
51841
- pageType: "",
51842
- listName: "",
51843
- app: "",
51844
- appId: "",
51845
- app_id: ""
51846
- },
51847
- dataProvider: function(data2, setData) {
51848
- window.addEventListener("message", function(event2) {
51849
- const { data: data22 } = event2;
51850
- if (data22 && data22.type === "page.dataProvider.setData") {
51851
- setData(data22.data);
51852
- }
51853
- });
51854
51860
  }
51855
51861
  }, data: {
51856
51862
  context: {
package/dist/index.html CHANGED
@@ -64,7 +64,7 @@
64
64
  </script>
65
65
  <script src="https://unpkg.com/i18next@24.2.2/dist/umd/i18next.min.js"></script>
66
66
  <link rel="stylesheet" type="text/css" href="/tailwind/tailwind-steedos.css">
67
- <script type="module" crossorigin src="/assets/index-D8UFbuIT.js"></script>
67
+ <script type="module" crossorigin src="/assets/index-D5Zk9QpF.js"></script>
68
68
  </head>
69
69
  <body class="skin-blue-light fixed steedos sidebar-mini three-columns" >
70
70
  <div id="root" class="steedos skin-blue-light creator h-full flex flex-col relative overflow-hidden bg-slate-50"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/webapp",
3
- "version": "3.0.2-beta.2",
3
+ "version": "3.0.2-beta.4",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -75,5 +75,5 @@
75
75
  "access": "public"
76
76
  },
77
77
  "repository": "https://github.com/steedos/app-builder/tree/master/apps/accounts",
78
- "gitHead": "6cc1a7f6c5baff5296129c180b0f454e89699cef"
78
+ "gitHead": "f91c10cc452b86692de4e9769870755bfb574c18"
79
79
  }