@rippling/rippling-sdk 0.2.0-alpha.37 → 0.2.0-alpha.39
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/examples/sdui/sdui-crud-todo/sdui-crud-todo.ts +3 -3
- package/examples/sdui/sdui-showcase/sdui-showcase.ts +6 -11
- package/examples/sdui/sdui-tab-multi-view/sdui-tab-multi-view.ts +14 -24
- package/examples/sdui/vote/vote.ts +7 -11
- package/lib/manifest/app.d.mts +11 -1
- package/lib/manifest/app.d.mts.map +1 -1
- package/lib/manifest/app.d.ts +11 -1
- package/lib/manifest/app.d.ts.map +1 -1
- package/lib/manifest/app.js +42 -1
- package/lib/manifest/app.js.map +1 -1
- package/lib/manifest/app.mjs +42 -1
- package/lib/manifest/app.mjs.map +1 -1
- package/lib/manifest/category.d.mts +14 -3
- package/lib/manifest/category.d.mts.map +1 -1
- package/lib/manifest/category.d.ts +14 -3
- package/lib/manifest/category.d.ts.map +1 -1
- package/lib/manifest/category.js +25 -3
- package/lib/manifest/category.js.map +1 -1
- package/lib/manifest/category.mjs +25 -3
- package/lib/manifest/category.mjs.map +1 -1
- package/lib/manifest/custom-object-field-section.d.mts +13 -0
- package/lib/manifest/custom-object-field-section.d.mts.map +1 -1
- package/lib/manifest/custom-object-field-section.d.ts +13 -0
- package/lib/manifest/custom-object-field-section.d.ts.map +1 -1
- package/lib/manifest/custom-object-field-section.js +22 -1
- package/lib/manifest/custom-object-field-section.js.map +1 -1
- package/lib/manifest/custom-object-field-section.mjs +22 -1
- package/lib/manifest/custom-object-field-section.mjs.map +1 -1
- package/lib/manifest/custom-object-page-layout.d.mts +23 -0
- package/lib/manifest/custom-object-page-layout.d.mts.map +1 -1
- package/lib/manifest/custom-object-page-layout.d.ts +23 -0
- package/lib/manifest/custom-object-page-layout.d.ts.map +1 -1
- package/lib/manifest/custom-object-page-layout.js +45 -2
- package/lib/manifest/custom-object-page-layout.js.map +1 -1
- package/lib/manifest/custom-object-page-layout.mjs +45 -2
- package/lib/manifest/custom-object-page-layout.mjs.map +1 -1
- package/lib/manifest/custom-object.d.mts +41 -2
- package/lib/manifest/custom-object.d.mts.map +1 -1
- package/lib/manifest/custom-object.d.ts +41 -2
- package/lib/manifest/custom-object.d.ts.map +1 -1
- package/lib/manifest/custom-object.js +70 -3
- package/lib/manifest/custom-object.js.map +1 -1
- package/lib/manifest/custom-object.mjs +70 -3
- package/lib/manifest/custom-object.mjs.map +1 -1
- package/lib/manifest/existing-manifest-context.d.mts +87 -0
- package/lib/manifest/existing-manifest-context.d.mts.map +1 -0
- package/lib/manifest/existing-manifest-context.d.ts +87 -0
- package/lib/manifest/existing-manifest-context.d.ts.map +1 -0
- package/lib/manifest/existing-manifest-context.js +511 -0
- package/lib/manifest/existing-manifest-context.js.map +1 -0
- package/lib/manifest/existing-manifest-context.mjs +506 -0
- package/lib/manifest/existing-manifest-context.mjs.map +1 -0
- package/lib/manifest/field.d.mts +44 -2
- package/lib/manifest/field.d.mts.map +1 -1
- package/lib/manifest/field.d.ts +44 -2
- package/lib/manifest/field.d.ts.map +1 -1
- package/lib/manifest/field.js +134 -3
- package/lib/manifest/field.js.map +1 -1
- package/lib/manifest/field.mjs +134 -3
- package/lib/manifest/field.mjs.map +1 -1
- package/lib/manifest/index.d.mts +8 -7
- package/lib/manifest/index.d.mts.map +1 -1
- package/lib/manifest/index.d.ts +8 -7
- package/lib/manifest/index.d.ts.map +1 -1
- package/lib/manifest/index.js +3 -1
- package/lib/manifest/index.js.map +1 -1
- package/lib/manifest/index.mjs +5 -4
- package/lib/manifest/index.mjs.map +1 -1
- package/lib/manifest/list-view.d.mts +17 -0
- package/lib/manifest/list-view.d.mts.map +1 -1
- package/lib/manifest/list-view.d.ts +17 -0
- package/lib/manifest/list-view.d.ts.map +1 -1
- package/lib/manifest/list-view.js +38 -1
- package/lib/manifest/list-view.js.map +1 -1
- package/lib/manifest/list-view.mjs +38 -1
- package/lib/manifest/list-view.mjs.map +1 -1
- package/lib/manifest/manifest-builder.d.mts +60 -7
- package/lib/manifest/manifest-builder.d.mts.map +1 -1
- package/lib/manifest/manifest-builder.d.ts +60 -7
- package/lib/manifest/manifest-builder.d.ts.map +1 -1
- package/lib/manifest/manifest-builder.js +62 -4
- package/lib/manifest/manifest-builder.js.map +1 -1
- package/lib/manifest/manifest-builder.mjs +62 -4
- package/lib/manifest/manifest-builder.mjs.map +1 -1
- package/lib/manifest/manifest-function.d.mts +18 -3
- package/lib/manifest/manifest-function.d.mts.map +1 -1
- package/lib/manifest/manifest-function.d.ts +18 -3
- package/lib/manifest/manifest-function.d.ts.map +1 -1
- package/lib/manifest/manifest-function.js +44 -3
- package/lib/manifest/manifest-function.js.map +1 -1
- package/lib/manifest/manifest-function.mjs +44 -3
- package/lib/manifest/manifest-function.mjs.map +1 -1
- package/lib/manifest/rule.d.mts +17 -0
- package/lib/manifest/rule.d.mts.map +1 -1
- package/lib/manifest/rule.d.ts +17 -0
- package/lib/manifest/rule.d.ts.map +1 -1
- package/lib/manifest/rule.js +45 -1
- package/lib/manifest/rule.js.map +1 -1
- package/lib/manifest/rule.mjs +45 -1
- package/lib/manifest/rule.mjs.map +1 -1
- package/lib/manifest/sdui-page.d.mts +10 -1
- package/lib/manifest/sdui-page.d.mts.map +1 -1
- package/lib/manifest/sdui-page.d.ts +10 -1
- package/lib/manifest/sdui-page.d.ts.map +1 -1
- package/lib/manifest/sdui-page.js +28 -1
- package/lib/manifest/sdui-page.js.map +1 -1
- package/lib/manifest/sdui-page.mjs +28 -1
- package/lib/manifest/sdui-page.mjs.map +1 -1
- package/lib/manifest/validation.d.mts +17 -0
- package/lib/manifest/validation.d.mts.map +1 -1
- package/lib/manifest/validation.d.ts +17 -0
- package/lib/manifest/validation.d.ts.map +1 -1
- package/lib/manifest/validation.js +31 -1
- package/lib/manifest/validation.js.map +1 -1
- package/lib/manifest/validation.mjs +31 -1
- package/lib/manifest/validation.mjs.map +1 -1
- package/lib/sdui/actions.d.mts.map +1 -1
- package/lib/sdui/actions.d.ts.map +1 -1
- package/lib/sdui/actions.js +23 -13
- package/lib/sdui/actions.js.map +1 -1
- package/lib/sdui/actions.mjs +23 -13
- package/lib/sdui/actions.mjs.map +1 -1
- package/lib/sdui/component.d.mts +28 -11
- package/lib/sdui/component.d.mts.map +1 -1
- package/lib/sdui/component.d.ts +28 -11
- package/lib/sdui/component.d.ts.map +1 -1
- package/lib/sdui/component.js +69 -36
- package/lib/sdui/component.js.map +1 -1
- package/lib/sdui/component.mjs +69 -36
- package/lib/sdui/component.mjs.map +1 -1
- package/lib/sdui/components.d.mts +1141 -132
- package/lib/sdui/components.d.mts.map +1 -1
- package/lib/sdui/components.d.ts +1141 -132
- package/lib/sdui/components.d.ts.map +1 -1
- package/lib/sdui/components.js +834 -206
- package/lib/sdui/components.js.map +1 -1
- package/lib/sdui/components.mjs +830 -203
- package/lib/sdui/components.mjs.map +1 -1
- package/lib/sdui/directives.d.mts.map +1 -1
- package/lib/sdui/directives.d.ts.map +1 -1
- package/lib/sdui/directives.js +4 -1
- package/lib/sdui/directives.js.map +1 -1
- package/lib/sdui/directives.mjs +4 -1
- package/lib/sdui/directives.mjs.map +1 -1
- package/lib/sdui/index.d.mts +314 -261
- package/lib/sdui/index.d.mts.map +1 -1
- package/lib/sdui/index.d.ts +314 -261
- package/lib/sdui/index.d.ts.map +1 -1
- package/lib/sdui/index.js +255 -204
- package/lib/sdui/index.js.map +1 -1
- package/lib/sdui/index.mjs +128 -103
- package/lib/sdui/index.mjs.map +1 -1
- package/lib/sdui/propTypes.d.mts +6330 -0
- package/lib/sdui/propTypes.d.mts.map +1 -0
- package/lib/sdui/propTypes.d.ts +6330 -0
- package/lib/sdui/propTypes.d.ts.map +1 -0
- package/lib/sdui/propTypes.js +14 -0
- package/lib/sdui/propTypes.js.map +1 -0
- package/lib/sdui/propTypes.mjs +13 -0
- package/lib/sdui/propTypes.mjs.map +1 -0
- package/lib/sdui/render.d.mts +1 -1
- package/lib/sdui/render.d.mts.map +1 -1
- package/lib/sdui/render.d.ts +1 -1
- package/lib/sdui/render.d.ts.map +1 -1
- package/lib/sdui/render.js +11 -3
- package/lib/sdui/render.js.map +1 -1
- package/lib/sdui/render.mjs +11 -3
- package/lib/sdui/render.mjs.map +1 -1
- package/lib/sdui/state.d.mts.map +1 -1
- package/lib/sdui/state.d.ts.map +1 -1
- package/lib/sdui/state.js +3 -1
- package/lib/sdui/state.js.map +1 -1
- package/lib/sdui/state.mjs +3 -1
- package/lib/sdui/state.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/manifest/app.ts +46 -2
- package/src/lib/manifest/category.ts +35 -7
- package/src/lib/manifest/custom-object-field-section.ts +37 -1
- package/src/lib/manifest/custom-object-page-layout.ts +67 -2
- package/src/lib/manifest/custom-object.ts +88 -4
- package/src/lib/manifest/existing-manifest-context.ts +673 -0
- package/src/lib/manifest/field.ts +160 -3
- package/src/lib/manifest/index.ts +39 -4
- package/src/lib/manifest/list-view.ts +50 -1
- package/src/lib/manifest/manifest-builder.ts +115 -5
- package/src/lib/manifest/manifest-function.ts +44 -4
- package/src/lib/manifest/rule.ts +60 -1
- package/src/lib/manifest/sdui-page.ts +37 -2
- package/src/lib/manifest/validation.ts +48 -1
- package/src/lib/sdui/actions.ts +23 -10
- package/src/lib/sdui/component.ts +84 -44
- package/src/lib/sdui/components.ts +1627 -212
- package/src/lib/sdui/directives.ts +4 -1
- package/src/lib/sdui/index.ts +565 -200
- package/src/lib/sdui/propTypes.ts +8470 -0
- package/src/lib/sdui/render.ts +13 -5
- package/src/lib/sdui/state.ts +8 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -53,10 +53,10 @@ function renderSpec(functionId: string) {
|
|
|
53
53
|
SDUI.components.HStack({
|
|
54
54
|
gap: 'space200',
|
|
55
55
|
align: 'center',
|
|
56
|
-
wrap:
|
|
56
|
+
wrap: 'wrap',
|
|
57
57
|
children: [
|
|
58
58
|
SDUI.components.Heading({
|
|
59
|
-
level:
|
|
59
|
+
level: 2,
|
|
60
60
|
text: 'Team todos',
|
|
61
61
|
}),
|
|
62
62
|
SDUI.components.Badge({
|
|
@@ -87,7 +87,7 @@ function renderSpec(functionId: string) {
|
|
|
87
87
|
{ id: 'notes__c', header: 'Notes', data: 'notes__c' },
|
|
88
88
|
],
|
|
89
89
|
selectedRow: s.selectedRow.$bind,
|
|
90
|
-
headerActions: [{ id: 'new', label: 'New Todo', icon: 'ADD', appearance: '
|
|
90
|
+
headerActions: [{ id: 'new', label: 'New Todo', icon: 'ADD', appearance: 'primary' }],
|
|
91
91
|
onHeaderAction: [
|
|
92
92
|
SDUI.actions.set(s.form, { title: '', status: '', priority: '', notes: '' }),
|
|
93
93
|
SDUI.actions.set(s.showCreateModal, true),
|
|
@@ -53,7 +53,7 @@ function renderSpec(_functionId: string) {
|
|
|
53
53
|
align: 'flex-start',
|
|
54
54
|
children: [
|
|
55
55
|
SDUI.components.Heading({
|
|
56
|
-
level:
|
|
56
|
+
level: 1,
|
|
57
57
|
text: 'Extra components',
|
|
58
58
|
}),
|
|
59
59
|
SDUI.components.Text({
|
|
@@ -66,7 +66,6 @@ function renderSpec(_functionId: string) {
|
|
|
66
66
|
|
|
67
67
|
SDUI.components.Card({
|
|
68
68
|
title: 'Fields',
|
|
69
|
-
padding: '24',
|
|
70
69
|
children: [
|
|
71
70
|
SDUI.components.VStack({
|
|
72
71
|
gap: 'space350',
|
|
@@ -91,7 +90,7 @@ function renderSpec(_functionId: string) {
|
|
|
91
90
|
}),
|
|
92
91
|
SDUI.components.HStack({
|
|
93
92
|
gap: 'space400',
|
|
94
|
-
wrap:
|
|
93
|
+
wrap: 'nowrap',
|
|
95
94
|
align: 'stretch',
|
|
96
95
|
children: [
|
|
97
96
|
SDUI.components.Layout({
|
|
@@ -139,7 +138,6 @@ function renderSpec(_functionId: string) {
|
|
|
139
138
|
|
|
140
139
|
SDUI.components.Card({
|
|
141
140
|
title: 'Navigation',
|
|
142
|
-
padding: '24',
|
|
143
141
|
children: [
|
|
144
142
|
SDUI.components.VStack({
|
|
145
143
|
gap: 'space400',
|
|
@@ -154,7 +152,7 @@ function renderSpec(_functionId: string) {
|
|
|
154
152
|
}),
|
|
155
153
|
SDUI.components.HStack({
|
|
156
154
|
gap: 'space300',
|
|
157
|
-
wrap:
|
|
155
|
+
wrap: 'wrap',
|
|
158
156
|
align: 'center',
|
|
159
157
|
children: [
|
|
160
158
|
SDUI.components.Dropdown({
|
|
@@ -185,7 +183,7 @@ function renderSpec(_functionId: string) {
|
|
|
185
183
|
{ label: 'One', value: '1' },
|
|
186
184
|
{ label: 'Two', value: '2' },
|
|
187
185
|
],
|
|
188
|
-
width: '
|
|
186
|
+
width: 'auto',
|
|
189
187
|
maxHeight: 160,
|
|
190
188
|
}),
|
|
191
189
|
SDUI.components.Layout({
|
|
@@ -206,7 +204,6 @@ function renderSpec(_functionId: string) {
|
|
|
206
204
|
|
|
207
205
|
SDUI.components.Card({
|
|
208
206
|
title: 'Media',
|
|
209
|
-
padding: '24',
|
|
210
207
|
children: [
|
|
211
208
|
SDUI.components.VStack({
|
|
212
209
|
gap: 'space400',
|
|
@@ -215,7 +212,7 @@ function renderSpec(_functionId: string) {
|
|
|
215
212
|
SDUI.components.Carousel({ slides: CAROUSEL_SLIDES }),
|
|
216
213
|
SDUI.components.Video({
|
|
217
214
|
src: 'https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4',
|
|
218
|
-
width:
|
|
215
|
+
width: 720,
|
|
219
216
|
loading: 'lazy',
|
|
220
217
|
name: 'v',
|
|
221
218
|
}),
|
|
@@ -226,7 +223,6 @@ function renderSpec(_functionId: string) {
|
|
|
226
223
|
|
|
227
224
|
SDUI.components.Card({
|
|
228
225
|
title: 'Lists',
|
|
229
|
-
padding: '24',
|
|
230
226
|
children: [
|
|
231
227
|
SDUI.components.VStack({
|
|
232
228
|
gap: 'space450',
|
|
@@ -261,7 +257,6 @@ function renderSpec(_functionId: string) {
|
|
|
261
257
|
|
|
262
258
|
SDUI.components.Card({
|
|
263
259
|
title: 'Loading',
|
|
264
|
-
padding: '24',
|
|
265
260
|
children: [
|
|
266
261
|
SDUI.components.VStack({
|
|
267
262
|
gap: 'space400',
|
|
@@ -296,7 +291,7 @@ function renderSpec(_functionId: string) {
|
|
|
296
291
|
SDUI.components.Skeleton({ variant: 'BOX', width: 160, height: 48, borderRadius: 6 }),
|
|
297
292
|
],
|
|
298
293
|
}),
|
|
299
|
-
SDUI.components.ContentLoader({ width:
|
|
294
|
+
SDUI.components.ContentLoader({ width: 720, height: 40, speed: 1 }),
|
|
300
295
|
SDUI.components.SnackBar({
|
|
301
296
|
text: 'Done.',
|
|
302
297
|
appearance: 'SUCCESS',
|
|
@@ -110,7 +110,7 @@ function renderSpec(functionId: string) {
|
|
|
110
110
|
text: 'BARK & TRAIN · FIELD HQ',
|
|
111
111
|
}),
|
|
112
112
|
SDUI.components.Heading({
|
|
113
|
-
level:
|
|
113
|
+
level: 1,
|
|
114
114
|
text: 'Good morning, trainer 👋',
|
|
115
115
|
}),
|
|
116
116
|
SDUI.components.Text({
|
|
@@ -122,7 +122,7 @@ function renderSpec(functionId: string) {
|
|
|
122
122
|
}),
|
|
123
123
|
SDUI.components.HStack({
|
|
124
124
|
gap: 'space400',
|
|
125
|
-
wrap:
|
|
125
|
+
wrap: 'nowrap',
|
|
126
126
|
align: 'stretch',
|
|
127
127
|
justify: 'space-between',
|
|
128
128
|
children: [
|
|
@@ -131,7 +131,6 @@ function renderSpec(functionId: string) {
|
|
|
131
131
|
minWidth: '260px',
|
|
132
132
|
children: [
|
|
133
133
|
SDUI.components.Card({
|
|
134
|
-
padding: '32',
|
|
135
134
|
children: [
|
|
136
135
|
SDUI.components.Layout({
|
|
137
136
|
padding: { top: 24, bottom: 24, left: 24, right: 24 },
|
|
@@ -148,7 +147,7 @@ function renderSpec(functionId: string) {
|
|
|
148
147
|
color: '#4F46E5',
|
|
149
148
|
}),
|
|
150
149
|
SDUI.components.Heading({
|
|
151
|
-
level:
|
|
150
|
+
level: 1,
|
|
152
151
|
text: SDUI.template`${s.stats.dogCount}`,
|
|
153
152
|
}),
|
|
154
153
|
SDUI.components.Text({
|
|
@@ -169,7 +168,6 @@ function renderSpec(functionId: string) {
|
|
|
169
168
|
minWidth: '260px',
|
|
170
169
|
children: [
|
|
171
170
|
SDUI.components.Card({
|
|
172
|
-
padding: '32',
|
|
173
171
|
children: [
|
|
174
172
|
SDUI.components.Layout({
|
|
175
173
|
padding: { top: 24, bottom: 24, left: 24, right: 24 },
|
|
@@ -186,7 +184,7 @@ function renderSpec(functionId: string) {
|
|
|
186
184
|
color: '#059669',
|
|
187
185
|
}),
|
|
188
186
|
SDUI.components.Heading({
|
|
189
|
-
level:
|
|
187
|
+
level: 1,
|
|
190
188
|
text: SDUI.template`${s.stats.sessionCount}`,
|
|
191
189
|
}),
|
|
192
190
|
SDUI.components.Text({
|
|
@@ -207,7 +205,6 @@ function renderSpec(functionId: string) {
|
|
|
207
205
|
minWidth: '260px',
|
|
208
206
|
children: [
|
|
209
207
|
SDUI.components.Card({
|
|
210
|
-
padding: '32',
|
|
211
208
|
children: [
|
|
212
209
|
SDUI.components.Layout({
|
|
213
210
|
padding: { top: 24, bottom: 24, left: 24, right: 24 },
|
|
@@ -224,7 +221,7 @@ function renderSpec(functionId: string) {
|
|
|
224
221
|
color: '#EA580C',
|
|
225
222
|
}),
|
|
226
223
|
SDUI.components.Heading({
|
|
227
|
-
level:
|
|
224
|
+
level: 1,
|
|
228
225
|
text: SDUI.template`${s.stats.totalMinutes}`,
|
|
229
226
|
}),
|
|
230
227
|
SDUI.components.Text({
|
|
@@ -245,7 +242,7 @@ function renderSpec(functionId: string) {
|
|
|
245
242
|
// Chart + Quick actions row — 66% / 32%
|
|
246
243
|
SDUI.components.HStack({
|
|
247
244
|
gap: 'space400',
|
|
248
|
-
wrap:
|
|
245
|
+
wrap: 'wrap',
|
|
249
246
|
align: 'stretch',
|
|
250
247
|
justify: 'space-between',
|
|
251
248
|
children: [
|
|
@@ -255,7 +252,6 @@ function renderSpec(functionId: string) {
|
|
|
255
252
|
children: [
|
|
256
253
|
SDUI.components.Card({
|
|
257
254
|
title: 'Where practice time goes',
|
|
258
|
-
padding: '32',
|
|
259
255
|
children: [
|
|
260
256
|
SDUI.components.VStack({
|
|
261
257
|
gap: 'space400',
|
|
@@ -274,7 +270,7 @@ function renderSpec(functionId: string) {
|
|
|
274
270
|
}),
|
|
275
271
|
SDUI.components.HStack({
|
|
276
272
|
gap: 'space300',
|
|
277
|
-
wrap:
|
|
273
|
+
wrap: 'wrap',
|
|
278
274
|
justify: 'flex-start',
|
|
279
275
|
children: [
|
|
280
276
|
SDUI.components.Badge({
|
|
@@ -317,7 +313,6 @@ function renderSpec(functionId: string) {
|
|
|
317
313
|
children: [
|
|
318
314
|
SDUI.components.Card({
|
|
319
315
|
title: 'Quick actions',
|
|
320
|
-
padding: '32',
|
|
321
316
|
children: [
|
|
322
317
|
SDUI.components.VStack({
|
|
323
318
|
gap: 'space300',
|
|
@@ -381,7 +376,6 @@ function renderSpec(functionId: string) {
|
|
|
381
376
|
});
|
|
382
377
|
const dogsGrid = SDUI.components.Grid({
|
|
383
378
|
data: s.dogs,
|
|
384
|
-
width: '100%',
|
|
385
379
|
height: 520,
|
|
386
380
|
columns: [
|
|
387
381
|
{ id: 'dog_name__c', header: 'Name', data: 'dog_name__c', width: 220 },
|
|
@@ -411,7 +405,6 @@ function renderSpec(functionId: string) {
|
|
|
411
405
|
|
|
412
406
|
const sessionsGrid = SDUI.components.Grid({
|
|
413
407
|
data: s.sessions,
|
|
414
|
-
width: '100%',
|
|
415
408
|
height: 520,
|
|
416
409
|
columns: [
|
|
417
410
|
{ id: 'session_date__c', header: 'Date', data: 'session_date__c', width: 160 },
|
|
@@ -461,7 +454,7 @@ function renderSpec(functionId: string) {
|
|
|
461
454
|
gap: 'space200',
|
|
462
455
|
children: [
|
|
463
456
|
SDUI.components.Heading({
|
|
464
|
-
level:
|
|
457
|
+
level: 1,
|
|
465
458
|
text: 'Your dogs',
|
|
466
459
|
}),
|
|
467
460
|
SDUI.components.Text({
|
|
@@ -491,7 +484,7 @@ function renderSpec(functionId: string) {
|
|
|
491
484
|
gap: 'space200',
|
|
492
485
|
children: [
|
|
493
486
|
SDUI.components.Heading({
|
|
494
|
-
level:
|
|
487
|
+
level: 1,
|
|
495
488
|
text: 'Session schedule',
|
|
496
489
|
}),
|
|
497
490
|
SDUI.components.Text({
|
|
@@ -521,7 +514,7 @@ function renderSpec(functionId: string) {
|
|
|
521
514
|
gap: 'space200',
|
|
522
515
|
children: [
|
|
523
516
|
SDUI.components.Heading({
|
|
524
|
-
level:
|
|
517
|
+
level: 1,
|
|
525
518
|
text: 'Today & coming up',
|
|
526
519
|
}),
|
|
527
520
|
SDUI.components.Text({
|
|
@@ -574,7 +567,7 @@ function renderSpec(functionId: string) {
|
|
|
574
567
|
gap: 'space200',
|
|
575
568
|
children: [
|
|
576
569
|
SDUI.components.Heading({
|
|
577
|
-
level:
|
|
570
|
+
level: 1,
|
|
578
571
|
text: 'Resources & safety',
|
|
579
572
|
}),
|
|
580
573
|
SDUI.components.Text({
|
|
@@ -585,20 +578,17 @@ function renderSpec(functionId: string) {
|
|
|
585
578
|
],
|
|
586
579
|
}),
|
|
587
580
|
SDUI.components.Tip({
|
|
588
|
-
variant: 'warning',
|
|
589
581
|
title: 'Reactive dogs at the gate',
|
|
590
|
-
|
|
582
|
+
content:
|
|
591
583
|
'Stagger arrivals so reactive pups aren’t face-to-face in the lobby; post your muzzle policy here.',
|
|
592
584
|
}),
|
|
593
585
|
SDUI.components.Tip({
|
|
594
|
-
variant: 'info',
|
|
595
586
|
title: 'Emergency vet & after hours',
|
|
596
|
-
|
|
587
|
+
content:
|
|
597
588
|
'Pin clinic phone, poison control, and directions — trainers shouldn’t hunt for them mid-class.',
|
|
598
589
|
}),
|
|
599
590
|
SDUI.components.Card({
|
|
600
591
|
title: 'Files you’ll attach later',
|
|
601
|
-
padding: '32',
|
|
602
592
|
children: [
|
|
603
593
|
SDUI.components.VStack({
|
|
604
594
|
gap: 'space400',
|
|
@@ -611,7 +601,7 @@ function renderSpec(functionId: string) {
|
|
|
611
601
|
}),
|
|
612
602
|
SDUI.components.HStack({
|
|
613
603
|
gap: 'space300',
|
|
614
|
-
wrap:
|
|
604
|
+
wrap: 'wrap',
|
|
615
605
|
children: [
|
|
616
606
|
SDUI.components.Badge({ text: 'Waivers', appearance: 'PRIMARY_LIGHT' }),
|
|
617
607
|
SDUI.components.Badge({ text: 'Vaccination records', appearance: 'SUCCESS_LIGHT' }),
|
|
@@ -29,7 +29,7 @@ function renderSpec(_functionId: string) {
|
|
|
29
29
|
// is a real CSS value (unlike 'stretch') so layout actually applies.
|
|
30
30
|
const voteCards = SDUI.components.HStack({
|
|
31
31
|
gap: 'space500',
|
|
32
|
-
wrap:
|
|
32
|
+
wrap: 'nowrap',
|
|
33
33
|
justify: 'space-between',
|
|
34
34
|
align: 'stretch',
|
|
35
35
|
children: [
|
|
@@ -38,7 +38,6 @@ function renderSpec(_functionId: string) {
|
|
|
38
38
|
children: [
|
|
39
39
|
SDUI.components.Card({
|
|
40
40
|
title: 'Ship faster',
|
|
41
|
-
padding: '32',
|
|
42
41
|
children: [
|
|
43
42
|
SDUI.components.VStack({
|
|
44
43
|
gap: 'space500',
|
|
@@ -69,7 +68,6 @@ function renderSpec(_functionId: string) {
|
|
|
69
68
|
children: [
|
|
70
69
|
SDUI.components.Card({
|
|
71
70
|
title: 'Raise quality',
|
|
72
|
-
padding: '32',
|
|
73
71
|
children: [
|
|
74
72
|
SDUI.components.VStack({
|
|
75
73
|
gap: 'space500',
|
|
@@ -100,7 +98,6 @@ function renderSpec(_functionId: string) {
|
|
|
100
98
|
children: [
|
|
101
99
|
SDUI.components.Card({
|
|
102
100
|
title: 'Pay down debt',
|
|
103
|
-
padding: '32',
|
|
104
101
|
children: [
|
|
105
102
|
SDUI.components.VStack({
|
|
106
103
|
gap: 'space500',
|
|
@@ -144,7 +141,7 @@ function renderSpec(_functionId: string) {
|
|
|
144
141
|
align: 'center',
|
|
145
142
|
children: [
|
|
146
143
|
SDUI.components.Heading({
|
|
147
|
-
level:
|
|
144
|
+
level: 1,
|
|
148
145
|
align: 'center',
|
|
149
146
|
text: 'Where should we focus next quarter?',
|
|
150
147
|
}),
|
|
@@ -162,7 +159,7 @@ function renderSpec(_functionId: string) {
|
|
|
162
159
|
SDUI.components.HStack({
|
|
163
160
|
gap: 'space300',
|
|
164
161
|
justify: 'center',
|
|
165
|
-
wrap:
|
|
162
|
+
wrap: 'wrap',
|
|
166
163
|
children: [
|
|
167
164
|
SDUI.components.Chip({
|
|
168
165
|
text: 'Start over',
|
|
@@ -191,27 +188,27 @@ function renderSpec(_functionId: string) {
|
|
|
191
188
|
SDUI.components.HStack({
|
|
192
189
|
gap: 'space200',
|
|
193
190
|
justify: 'center',
|
|
194
|
-
wrap:
|
|
191
|
+
wrap: 'wrap',
|
|
195
192
|
children: [
|
|
196
193
|
SDUI.visible(
|
|
197
194
|
SDUI.conditions.eq(s.voteChoice, 'velocity'),
|
|
198
195
|
SDUI.components.Badge({
|
|
199
196
|
text: 'You voted · Ship faster',
|
|
200
|
-
appearance: '
|
|
197
|
+
appearance: 'PRIMARY_DARK',
|
|
201
198
|
}),
|
|
202
199
|
),
|
|
203
200
|
SDUI.visible(
|
|
204
201
|
SDUI.conditions.eq(s.voteChoice, 'quality'),
|
|
205
202
|
SDUI.components.Badge({
|
|
206
203
|
text: 'You voted · Raise quality',
|
|
207
|
-
appearance: '
|
|
204
|
+
appearance: 'SUCCESS_DARK',
|
|
208
205
|
}),
|
|
209
206
|
),
|
|
210
207
|
SDUI.visible(
|
|
211
208
|
SDUI.conditions.eq(s.voteChoice, 'debt'),
|
|
212
209
|
SDUI.components.Badge({
|
|
213
210
|
text: 'You voted · Pay down debt',
|
|
214
|
-
appearance: '
|
|
211
|
+
appearance: 'WARNING_DARK',
|
|
215
212
|
}),
|
|
216
213
|
),
|
|
217
214
|
],
|
|
@@ -220,7 +217,6 @@ function renderSpec(_functionId: string) {
|
|
|
220
217
|
// the shell's full width because the parent VStack is align:stretch
|
|
221
218
|
SDUI.components.Card({
|
|
222
219
|
title: 'Vote share (mock)',
|
|
223
|
-
padding: '32',
|
|
224
220
|
children: [
|
|
225
221
|
SDUI.components.VStack({
|
|
226
222
|
gap: 'space500',
|
package/lib/manifest/app.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CustomObject } from "./custom-object.mjs";
|
|
2
|
-
import type
|
|
2
|
+
import { type ExistingManifestContextOptions } from "./existing-manifest-context.mjs";
|
|
3
|
+
import type { ManifestComponentDeletion, ManifestScope } from "./manifest-builder.mjs";
|
|
3
4
|
import { SduiPage } from "./sdui-page.mjs";
|
|
4
5
|
/**
|
|
5
6
|
* A single page entry in an {@link App}.
|
|
@@ -83,6 +84,8 @@ export interface AppProps {
|
|
|
83
84
|
* @see {@link SduiPage} — SDUI surface tab source.
|
|
84
85
|
*/
|
|
85
86
|
export declare class App {
|
|
87
|
+
static readonly componentType: "CUSTOM_APP";
|
|
88
|
+
static toDeletionIdentifier(apiName: string): ManifestComponentDeletion;
|
|
86
89
|
private readonly _apiName;
|
|
87
90
|
private readonly _name;
|
|
88
91
|
private readonly _description;
|
|
@@ -95,6 +98,13 @@ export declare class App {
|
|
|
95
98
|
* @param props - Initialization properties.
|
|
96
99
|
*/
|
|
97
100
|
constructor(scope: ManifestScope, props: AppProps);
|
|
101
|
+
/**
|
|
102
|
+
* Loads this app from the active existing-manifest JSON context.
|
|
103
|
+
*/
|
|
104
|
+
static loadFromExisting(apiName: string, options?: ExistingManifestContextOptions): App;
|
|
105
|
+
/** @internal Hydrates an app from existing manifest wire JSON. */
|
|
106
|
+
static _fromExistingComponent(scope: ManifestScope, component: Record<string, any>): App;
|
|
107
|
+
private static appIconFromExistingComponent;
|
|
98
108
|
/**
|
|
99
109
|
* Returns the api_name of this app (e.g. `'gym_membership_management_app'`).
|
|
100
110
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":"OAAO,EAAE,YAAY,EAAE;OAChB,KAAK,EAAE,aAAa,EAAE;
|
|
1
|
+
{"version":3,"file":"app.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":"OAAO,EAAE,YAAY,EAAE;OAChB,EAA8B,KAAK,8BAA8B,EAAE;OACnE,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE;OACjD,EAAE,QAAQ,EAAE;AAEnB;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;CACnB;AAyBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,GAAG;IACd,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAG,YAAY,CAAU;IAEtD,MAAM,CAAC,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,yBAAyB;IAOvE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAClD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;IAC5C,2DAA2D;IAC3D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwB;IAE/C;;;OAGG;gBACS,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ;IAUjD;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,8BAAmC,GAAG,GAAG;IAI3F,kEAAkE;IAClE,MAAM,CAAC,sBAAsB,CAAC,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG;IAcxF,OAAO,CAAC,MAAM,CAAC,4BAA4B;IAO3C;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;OAEG;IACH,OAAO,IAAI,MAAM;IAIjB;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAc9B"}
|
package/lib/manifest/app.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CustomObject } from "./custom-object.js";
|
|
2
|
-
import type
|
|
2
|
+
import { type ExistingManifestContextOptions } from "./existing-manifest-context.js";
|
|
3
|
+
import type { ManifestComponentDeletion, ManifestScope } from "./manifest-builder.js";
|
|
3
4
|
import { SduiPage } from "./sdui-page.js";
|
|
4
5
|
/**
|
|
5
6
|
* A single page entry in an {@link App}.
|
|
@@ -83,6 +84,8 @@ export interface AppProps {
|
|
|
83
84
|
* @see {@link SduiPage} — SDUI surface tab source.
|
|
84
85
|
*/
|
|
85
86
|
export declare class App {
|
|
87
|
+
static readonly componentType: "CUSTOM_APP";
|
|
88
|
+
static toDeletionIdentifier(apiName: string): ManifestComponentDeletion;
|
|
86
89
|
private readonly _apiName;
|
|
87
90
|
private readonly _name;
|
|
88
91
|
private readonly _description;
|
|
@@ -95,6 +98,13 @@ export declare class App {
|
|
|
95
98
|
* @param props - Initialization properties.
|
|
96
99
|
*/
|
|
97
100
|
constructor(scope: ManifestScope, props: AppProps);
|
|
101
|
+
/**
|
|
102
|
+
* Loads this app from the active existing-manifest JSON context.
|
|
103
|
+
*/
|
|
104
|
+
static loadFromExisting(apiName: string, options?: ExistingManifestContextOptions): App;
|
|
105
|
+
/** @internal Hydrates an app from existing manifest wire JSON. */
|
|
106
|
+
static _fromExistingComponent(scope: ManifestScope, component: Record<string, any>): App;
|
|
107
|
+
private static appIconFromExistingComponent;
|
|
98
108
|
/**
|
|
99
109
|
* Returns the api_name of this app (e.g. `'gym_membership_management_app'`).
|
|
100
110
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":"OAAO,EAAE,YAAY,EAAE;OAChB,KAAK,EAAE,aAAa,EAAE;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":"OAAO,EAAE,YAAY,EAAE;OAChB,EAA8B,KAAK,8BAA8B,EAAE;OACnE,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE;OACjD,EAAE,QAAQ,EAAE;AAEnB;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,E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-object.js");
|
|
5
|
+
const existing_manifest_context_1 = require("./existing-manifest-context.js");
|
|
5
6
|
function resolvePage(entry) {
|
|
6
7
|
if (entry instanceof custom_object_1.CustomObject) {
|
|
7
8
|
const apiName = entry.getApiName();
|
|
@@ -20,6 +21,11 @@ function resolvePage(entry) {
|
|
|
20
21
|
};
|
|
21
22
|
}
|
|
22
23
|
}
|
|
24
|
+
function cloneJson(value) {
|
|
25
|
+
if (value == null)
|
|
26
|
+
return value;
|
|
27
|
+
return JSON.parse(JSON.stringify(value));
|
|
28
|
+
}
|
|
23
29
|
/**
|
|
24
30
|
* Defines a Rippling app and registers it with the manifest.
|
|
25
31
|
*
|
|
@@ -43,6 +49,12 @@ function resolvePage(entry) {
|
|
|
43
49
|
* @see {@link SduiPage} — SDUI surface tab source.
|
|
44
50
|
*/
|
|
45
51
|
class App {
|
|
52
|
+
static toDeletionIdentifier(apiName) {
|
|
53
|
+
return {
|
|
54
|
+
type: App.componentType,
|
|
55
|
+
api_name: apiName,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
46
58
|
/**
|
|
47
59
|
* @param scope - The manifest to register this app with.
|
|
48
60
|
* @param props - Initialization properties.
|
|
@@ -56,6 +68,34 @@ class App {
|
|
|
56
68
|
this._pages = (props.pages ?? []).map(resolvePage);
|
|
57
69
|
scope._register(this);
|
|
58
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Loads this app from the active existing-manifest JSON context.
|
|
73
|
+
*/
|
|
74
|
+
static loadFromExisting(apiName, options = {}) {
|
|
75
|
+
return (0, existing_manifest_context_1.getExistingManifestContext)(options).loadApp(apiName);
|
|
76
|
+
}
|
|
77
|
+
/** @internal Hydrates an app from existing manifest wire JSON. */
|
|
78
|
+
static _fromExistingComponent(scope, component) {
|
|
79
|
+
const app = Object.create(App.prototype);
|
|
80
|
+
Object.assign(app, {
|
|
81
|
+
_apiName: component['api_name'],
|
|
82
|
+
_name: component['name'] ?? component['api_name'],
|
|
83
|
+
_description: component['description'],
|
|
84
|
+
_appType: component['app_type'],
|
|
85
|
+
_icon: App.appIconFromExistingComponent(component['icon']),
|
|
86
|
+
_pages: cloneJson(component['pages'] ?? []),
|
|
87
|
+
});
|
|
88
|
+
scope._register(app);
|
|
89
|
+
return app;
|
|
90
|
+
}
|
|
91
|
+
static appIconFromExistingComponent(value) {
|
|
92
|
+
if (value == null || typeof value !== 'object')
|
|
93
|
+
return undefined;
|
|
94
|
+
const wire = value;
|
|
95
|
+
if (typeof wire['s3_bucket'] !== 'string' || typeof wire['s3_key'] !== 'string')
|
|
96
|
+
return undefined;
|
|
97
|
+
return { s3Bucket: wire['s3_bucket'], s3Key: wire['s3_key'] };
|
|
98
|
+
}
|
|
59
99
|
/**
|
|
60
100
|
* Returns the api_name of this app (e.g. `'gym_membership_management_app'`).
|
|
61
101
|
*/
|
|
@@ -75,7 +115,7 @@ class App {
|
|
|
75
115
|
*/
|
|
76
116
|
toDict() {
|
|
77
117
|
const component = {
|
|
78
|
-
type:
|
|
118
|
+
type: App.componentType,
|
|
79
119
|
api_name: this._apiName,
|
|
80
120
|
name: this._name,
|
|
81
121
|
};
|
|
@@ -92,4 +132,5 @@ class App {
|
|
|
92
132
|
}
|
|
93
133
|
}
|
|
94
134
|
exports.App = App;
|
|
135
|
+
App.componentType = 'CUSTOM_APP';
|
|
95
136
|
//# sourceMappingURL=app.js.map
|
package/lib/manifest/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":";;;AAAA,sDAA+C;
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":";;;AAAA,sDAA+C;AAC/C,8EAA8G;AAkE9G,SAAS,WAAW,CAAC,KAAc;IACjC,IAAI,KAAK,YAAY,4BAAY,EAAE,CAAC;QAClC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC;QACnC,OAA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,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,MAAM,SAAS,GAAwB;YACrC,IAAI,EAAE,GAAG,CAAC,aAAa;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,KAAK;SACjB,CAAC;QACF,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI;YAAE,SAAS,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5E,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC;YACvB,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACnF,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI;YAAE,SAAS,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;QACjE,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;YAAE,SAAS,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QACpF,OAAO,SAAS,CAAC;IACnB,CAAC;;AA7FH,kBA8FC;AA7FiB,iBAAa,GAAG,YAAqB,CAAC"}
|
package/lib/manifest/app.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CustomObject } from "./custom-object.mjs";
|
|
2
|
+
import { getExistingManifestContext } from "./existing-manifest-context.mjs";
|
|
2
3
|
function resolvePage(entry) {
|
|
3
4
|
if (entry instanceof CustomObject) {
|
|
4
5
|
const apiName = entry.getApiName();
|
|
@@ -17,6 +18,11 @@ function resolvePage(entry) {
|
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
}
|
|
21
|
+
function cloneJson(value) {
|
|
22
|
+
if (value == null)
|
|
23
|
+
return value;
|
|
24
|
+
return JSON.parse(JSON.stringify(value));
|
|
25
|
+
}
|
|
20
26
|
/**
|
|
21
27
|
* Defines a Rippling app and registers it with the manifest.
|
|
22
28
|
*
|
|
@@ -40,6 +46,12 @@ function resolvePage(entry) {
|
|
|
40
46
|
* @see {@link SduiPage} — SDUI surface tab source.
|
|
41
47
|
*/
|
|
42
48
|
export class App {
|
|
49
|
+
static toDeletionIdentifier(apiName) {
|
|
50
|
+
return {
|
|
51
|
+
type: App.componentType,
|
|
52
|
+
api_name: apiName,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
43
55
|
/**
|
|
44
56
|
* @param scope - The manifest to register this app with.
|
|
45
57
|
* @param props - Initialization properties.
|
|
@@ -53,6 +65,34 @@ export class App {
|
|
|
53
65
|
this._pages = (props.pages ?? []).map(resolvePage);
|
|
54
66
|
scope._register(this);
|
|
55
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Loads this app from the active existing-manifest JSON context.
|
|
70
|
+
*/
|
|
71
|
+
static loadFromExisting(apiName, options = {}) {
|
|
72
|
+
return getExistingManifestContext(options).loadApp(apiName);
|
|
73
|
+
}
|
|
74
|
+
/** @internal Hydrates an app from existing manifest wire JSON. */
|
|
75
|
+
static _fromExistingComponent(scope, component) {
|
|
76
|
+
const app = Object.create(App.prototype);
|
|
77
|
+
Object.assign(app, {
|
|
78
|
+
_apiName: component['api_name'],
|
|
79
|
+
_name: component['name'] ?? component['api_name'],
|
|
80
|
+
_description: component['description'],
|
|
81
|
+
_appType: component['app_type'],
|
|
82
|
+
_icon: App.appIconFromExistingComponent(component['icon']),
|
|
83
|
+
_pages: cloneJson(component['pages'] ?? []),
|
|
84
|
+
});
|
|
85
|
+
scope._register(app);
|
|
86
|
+
return app;
|
|
87
|
+
}
|
|
88
|
+
static appIconFromExistingComponent(value) {
|
|
89
|
+
if (value == null || typeof value !== 'object')
|
|
90
|
+
return undefined;
|
|
91
|
+
const wire = value;
|
|
92
|
+
if (typeof wire['s3_bucket'] !== 'string' || typeof wire['s3_key'] !== 'string')
|
|
93
|
+
return undefined;
|
|
94
|
+
return { s3Bucket: wire['s3_bucket'], s3Key: wire['s3_key'] };
|
|
95
|
+
}
|
|
56
96
|
/**
|
|
57
97
|
* Returns the api_name of this app (e.g. `'gym_membership_management_app'`).
|
|
58
98
|
*/
|
|
@@ -72,7 +112,7 @@ export class App {
|
|
|
72
112
|
*/
|
|
73
113
|
toDict() {
|
|
74
114
|
const component = {
|
|
75
|
-
type:
|
|
115
|
+
type: App.componentType,
|
|
76
116
|
api_name: this._apiName,
|
|
77
117
|
name: this._name,
|
|
78
118
|
};
|
|
@@ -88,4 +128,5 @@ export class App {
|
|
|
88
128
|
return component;
|
|
89
129
|
}
|
|
90
130
|
}
|
|
131
|
+
App.componentType = 'CUSTOM_APP';
|
|
91
132
|
//# sourceMappingURL=app.mjs.map
|
package/lib/manifest/app.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.mjs","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":"OAAO,EAAE,YAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"app.mjs","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":"OAAO,EAAE,YAAY,EAAE;OAChB,EAAE,0BAA0B,EAAuC;AAkE1E,SAAS,WAAW,CAAC,KAAc;IACjC,IAAI,KAAK,YAAY,YAAY,EAAE,CAAC;QAClC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC;QACnC,OAAO;YACL,QAAQ,EAAE,OAAO;YACjB,SAAS,EAAE,aAAa;YACxB,eAAe,EAAE,OAAO;SACzB,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,UAAU,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QACzC,OAAO;YACL,QAAQ,EAAE,UAAU;YACpB,SAAS,EAAE,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