@budibase/frontend-core 2.22.12 → 2.22.13

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/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@budibase/frontend-core",
3
- "version": "2.22.12",
3
+ "version": "2.22.13",
4
4
  "description": "Budibase frontend core libraries used in builder and client",
5
5
  "author": "Budibase",
6
6
  "license": "MPL-2.0",
7
7
  "svelte": "src/index.js",
8
8
  "dependencies": {
9
- "@budibase/bbui": "2.22.12",
10
- "@budibase/shared-core": "2.22.12",
9
+ "@budibase/bbui": "2.22.13",
10
+ "@budibase/shared-core": "2.22.13",
11
11
  "dayjs": "^1.10.8",
12
12
  "lodash": "4.17.21",
13
13
  "socket.io-client": "^4.6.1"
14
14
  },
15
- "gitHead": "f8c374b0bfe6868c5aa13b086d97e80a15ee72d9"
15
+ "gitHead": "a8479c046fc0ccb320f5f128aafeb9421dde5db5"
16
16
  }
package/src/api/app.js CHANGED
@@ -197,4 +197,13 @@ export const buildAppEndpoints = API => ({
197
197
  url: `/api/applications/${appId}/sample`,
198
198
  })
199
199
  },
200
+
201
+ setRevertableVersion: async (appId, revertableVersion) => {
202
+ return await API.post({
203
+ url: `/api/applications/${appId}/setRevertableVersion`,
204
+ body: {
205
+ revertableVersion,
206
+ },
207
+ })
208
+ },
200
209
  })
@@ -0,0 +1,244 @@
1
+ <script>
2
+ export let sideNav = false
3
+ export let hideDevTools = false
4
+ export let hideFooter = false
5
+ export let noAnimation = false
6
+ </script>
7
+
8
+ <div class:sideNav id="clientAppSkeletonLoader" class="skeleton">
9
+ <div class="animation" class:noAnimation />
10
+
11
+ {#if !hideDevTools}
12
+ <div class="devTools" />
13
+ {/if}
14
+ <div class="main">
15
+ <div class="nav" />
16
+ <div class="body">
17
+ <div class="bodyVerticalPadding" />
18
+ <div class="bodyHorizontal">
19
+ <div class="bodyHorizontalPadding" />
20
+ <svg
21
+ class="svg"
22
+ xmlns="http://www.w3.org/2000/svg"
23
+ xmlns:xlink="http://www.w3.org/1999/xlink"
24
+ width="240"
25
+ height="256"
26
+ >
27
+ <mask id="mask">
28
+ <rect x="0" y="0" width="240" height="256" fill="white" />
29
+ <rect x="0" y="0" width="240" height="32" rx="6" fill="black" />
30
+ <rect x="0" y="56" width="240" height="32" rx="6" fill="black" />
31
+ <rect x="0" y="112" width="240" height="32" rx="6" fill="black" />
32
+ <rect x="0" y="168" width="240" height="32" rx="6" fill="black" />
33
+ <rect x="71" y="224" width="98" height="32" rx="6" fill="black" />
34
+ </mask>
35
+
36
+ <rect
37
+ x="0"
38
+ y="0"
39
+ width="240"
40
+ height="256"
41
+ fill="black"
42
+ mask="url(#mask)"
43
+ />
44
+ </svg>
45
+ <div class="bodyHorizontalPadding" />
46
+ </div>
47
+ <div class="bodyVerticalPadding" />
48
+ </div>
49
+ </div>
50
+ {#if !hideFooter}
51
+ <div class="footer" />
52
+ {/if}
53
+ </div>
54
+
55
+ <style>
56
+ .skeleton {
57
+ position: relative;
58
+ height: 100%;
59
+ display: flex;
60
+ flex-direction: column;
61
+ border-radius: 4px;
62
+ overflow: hidden;
63
+ background-color: var(--spectrum-global-color-gray-200);
64
+ }
65
+
66
+ .animation {
67
+ position: absolute;
68
+ height: 100%;
69
+ width: 100%;
70
+ background: linear-gradient(
71
+ to right,
72
+ transparent 0%,
73
+ var(--spectrum-global-color-gray-300) 20%,
74
+ transparent 40%,
75
+ transparent 100%
76
+ );
77
+ animation-duration: 1.3s;
78
+ animation-fill-mode: forwards;
79
+ animation-iteration-count: infinite;
80
+ animation-name: shimmer;
81
+ animation-timing-function: linear;
82
+ }
83
+
84
+ .noAnimation {
85
+ animation-name: none;
86
+ background: transparent;
87
+ }
88
+
89
+ .devTools {
90
+ display: flex;
91
+ box-sizing: border-box;
92
+ background-color: black;
93
+ height: 60px;
94
+ padding: 1px 24px 1px 20px;
95
+ display: flex;
96
+ align-items: center;
97
+ z-index: 1;
98
+ flex-shrink: 0;
99
+
100
+ color: white;
101
+ mix-blend-mode: multiply;
102
+ background: rgb(0 0 0);
103
+ font-size: 30px;
104
+ font-family: Source Sans Pro;
105
+ -webkit-font-smoothing: antialiased;
106
+ }
107
+
108
+ .main {
109
+ height: 100%;
110
+ display: flex;
111
+ flex-direction: column;
112
+ }
113
+
114
+ @media (max-width: 720px) {
115
+ #clientAppSkeletonLoader .main {
116
+ flex-direction: column;
117
+ width: initial;
118
+ }
119
+ }
120
+
121
+ @container (max-width: 720px) {
122
+ #clientAppSkeletonLoader .main {
123
+ flex-direction: column;
124
+ width: initial;
125
+ }
126
+ }
127
+
128
+ .sideNav .main {
129
+ flex-direction: row;
130
+ width: 100%;
131
+ }
132
+
133
+ .nav {
134
+ flex-shrink: 0;
135
+ width: 100%;
136
+ height: 141px;
137
+ background-color: transparent;
138
+ }
139
+
140
+ @media (max-width: 720px) {
141
+ #clientAppSkeletonLoader .nav {
142
+ height: 61px;
143
+ width: initial;
144
+ }
145
+ }
146
+
147
+ @container (max-width: 720px) {
148
+ #clientAppSkeletonLoader .nav {
149
+ height: 61px;
150
+ width: initial;
151
+ }
152
+ }
153
+
154
+ .sideNav .nav {
155
+ height: 100%;
156
+ width: 251px;
157
+ }
158
+
159
+ .body {
160
+ z-index: 2;
161
+ display: flex;
162
+ flex-direction: column;
163
+ height: 100%;
164
+ position: relative;
165
+ }
166
+
167
+ @media (max-width: 720px) {
168
+ #clientAppSkeletonLoader .body {
169
+ width: initial;
170
+ height: 100%;
171
+ }
172
+ }
173
+
174
+ @container (max-width: 720px) {
175
+ #clientAppSkeletonLoader .body {
176
+ width: initial;
177
+ height: 100%;
178
+ }
179
+ }
180
+
181
+ .sideNav .body {
182
+ width: 100%;
183
+ height: initial;
184
+ }
185
+
186
+ .body :global(svg > rect) {
187
+ fill: var(--spectrum-alias-background-color-primary);
188
+ }
189
+
190
+ .body :global(svg) {
191
+ flex-shrink: 0;
192
+ }
193
+
194
+ .bodyHorizontal {
195
+ display: flex;
196
+ flex-shrink: 0;
197
+ }
198
+
199
+ .bodyHorizontalPadding {
200
+ height: 100%;
201
+ flex-grow: 1;
202
+ background-color: var(--spectrum-alias-background-color-primary);
203
+ }
204
+
205
+ .bodyVerticalPadding {
206
+ width: 100%;
207
+ flex-grow: 1;
208
+ background-color: var(--spectrum-alias-background-color-primary);
209
+ }
210
+
211
+ .footer {
212
+ flex-shrink: 0;
213
+ box-sizing: border-box;
214
+ z-index: 1;
215
+ height: 52px;
216
+ width: 100%;
217
+ }
218
+
219
+ @media (max-width: 720px) {
220
+ #clientAppSkeletonLoader .footer {
221
+ border-top: none;
222
+ }
223
+ }
224
+
225
+ @container (max-width: 720px) {
226
+ #clientAppSkeletonLoader .footer {
227
+ border-top: none;
228
+ }
229
+ }
230
+
231
+ .sideNav .footer {
232
+ border-top: 3px solid var(--spectrum-alias-background-color-primary);
233
+ }
234
+
235
+ @keyframes shimmer {
236
+ 0% {
237
+ left: -170%;
238
+ }
239
+
240
+ 100% {
241
+ left: 170%;
242
+ }
243
+ }
244
+ </style>
@@ -5,3 +5,4 @@ export { default as UserAvatar } from "./UserAvatar.svelte"
5
5
  export { default as UserAvatars } from "./UserAvatars.svelte"
6
6
  export { default as Updating } from "./Updating.svelte"
7
7
  export { Grid } from "./grid"
8
+ export { default as ClientAppSkeleton } from "./ClientAppSkeleton.svelte"
package/src/constants.js CHANGED
@@ -3,6 +3,7 @@
3
3
  */
4
4
  export { OperatorOptions, SqlNumberTypeRangeMap } from "@budibase/shared-core"
5
5
  export { Feature as Features } from "@budibase/types"
6
+ import { BpmCorrelationKey } from "@budibase/shared-core"
6
7
 
7
8
  // Cookie names
8
9
  export const Cookies = {
@@ -10,6 +11,7 @@ export const Cookies = {
10
11
  CurrentApp: "budibase:currentapp",
11
12
  ReturnUrl: "budibase:returnurl",
12
13
  AccountReturnUrl: "budibase:account:returnurl",
14
+ OnboardingProcessCorrelationKey: BpmCorrelationKey.ONBOARDING,
13
15
  }
14
16
 
15
17
  // Table names
@@ -18,4 +18,3 @@
18
18
  --drop-shadow: rgba(0, 0, 0, 0.25) !important;
19
19
  --spectrum-global-color-blue-100: rgba(35, 40, 50) !important;
20
20
  }
21
-
@@ -7,3 +7,4 @@ export * as RowUtils from "./rows"
7
7
  export { memo, derivedMemo } from "./memo"
8
8
  export { createWebsocket } from "./websocket"
9
9
  export * from "./download"
10
+ export * from "./theme"
@@ -0,0 +1,12 @@
1
+ import { Themes } from "../constants.js"
2
+
3
+ export const getBaseTheme = theme => {
4
+ if (!theme) {
5
+ return ""
6
+ }
7
+ let base = Themes.find(x => `spectrum--${x.class}` === theme)?.base || ""
8
+ if (base) {
9
+ base = `spectrum--${base}`
10
+ }
11
+ return base
12
+ }