@rippling/rippling-sdk 0.2.0-alpha.64 → 0.2.0-alpha.69
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/manifest/dental-practice-management/dental-practice-management.ts +135 -5
- package/examples/manifest/gym-membership-management/gym-membership-management.ts +2 -2
- package/examples/manifest/simple-todo-app/simple-todo-app.ts +1 -1
- package/examples/manifest/todo-app-without-object-list-view/functions/todo-page.ts +487 -0
- package/examples/manifest/todo-app-without-object-list-view/todo-app-without-object-list-view.ts +111 -0
- package/functions.d.mts +5 -5
- package/functions.d.mts.map +1 -1
- package/functions.d.ts +5 -5
- package/functions.d.ts.map +1 -1
- package/functions.js +1 -1
- package/functions.js.map +1 -1
- package/functions.mjs +1 -1
- package/functions.mjs.map +1 -1
- package/lib/manifest/field.d.mts +9 -0
- package/lib/manifest/field.d.mts.map +1 -1
- package/lib/manifest/field.d.ts +9 -0
- package/lib/manifest/field.d.ts.map +1 -1
- package/lib/manifest/field.js +3 -0
- package/lib/manifest/field.js.map +1 -1
- package/lib/manifest/field.mjs +3 -0
- package/lib/manifest/field.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/workers.d.mts +37 -2
- package/resources/workers.d.mts.map +1 -1
- package/resources/workers.d.ts +37 -2
- package/resources/workers.d.ts.map +1 -1
- package/resources/workers.js +2 -2
- package/resources/workers.mjs +2 -2
- package/src/functions.ts +10 -5
- package/src/lib/manifest/field.ts +12 -0
- package/src/resources/workers.ts +43 -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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* with status, treatment plans, rollups, and an SDUI ObjectListView tab for appointments.
|
|
4
4
|
*
|
|
5
5
|
* dental_patient__c ← chart: demographics, allergies, notes
|
|
6
|
+
* dental_provider__c ← providers selectable for appointments
|
|
6
7
|
* dental_operatory__c ← chair / room (parent for same-day board rollups)
|
|
7
8
|
* dental_appointment__c ← child of operatory; patient lookup, time, status, visit type
|
|
8
9
|
* dental_treatment_plan__c ← child of patient; plan status, procedures, estimates
|
|
@@ -16,6 +17,7 @@ import * as fs from 'node:fs';
|
|
|
16
17
|
import * as path from 'node:path';
|
|
17
18
|
import {
|
|
18
19
|
App,
|
|
20
|
+
BooleanField,
|
|
19
21
|
Category,
|
|
20
22
|
CustomObject,
|
|
21
23
|
CustomObjectFieldSection,
|
|
@@ -103,6 +105,14 @@ const patientEmailField = new EmailField(patientObj, {
|
|
|
103
105
|
section: patientIdentitySection,
|
|
104
106
|
});
|
|
105
107
|
|
|
108
|
+
const patientActiveField = new BooleanField(patientObj, {
|
|
109
|
+
apiName: 'active_patient__c',
|
|
110
|
+
displayName: 'Active patient',
|
|
111
|
+
description: 'Whether the patient is currently active in the practice',
|
|
112
|
+
required: true,
|
|
113
|
+
section: patientIdentitySection,
|
|
114
|
+
});
|
|
115
|
+
|
|
106
116
|
const patientAllergiesField = new LongTextField(patientObj, {
|
|
107
117
|
apiName: 'allergies_and_alerts__c',
|
|
108
118
|
displayName: 'Allergies & medical alerts',
|
|
@@ -137,6 +147,50 @@ const patientLabelField = new FormulaField(patientObj, {
|
|
|
137
147
|
section: patientIdentitySection,
|
|
138
148
|
});
|
|
139
149
|
|
|
150
|
+
// ── Provider ────────────────────────────────────────────────────────────────
|
|
151
|
+
const providerObj = new CustomObject(manifest, {
|
|
152
|
+
apiName: 'dental_provider__c',
|
|
153
|
+
name: 'Provider',
|
|
154
|
+
pluralLabel: 'Providers',
|
|
155
|
+
category: dentalCategory,
|
|
156
|
+
description: 'Clinicians who can be assigned to appointment blocks',
|
|
157
|
+
icon: { emoji: '🧑⚕️' },
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
const providerSection = new CustomObjectFieldSection(providerObj, {
|
|
161
|
+
name: 'Provider',
|
|
162
|
+
sectionId: 'sec_provider_info',
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
const providerNameField = providerObj.standardFields.name;
|
|
166
|
+
|
|
167
|
+
const providerStatusField = new SelectField(providerObj, {
|
|
168
|
+
apiName: 'provider_status__c',
|
|
169
|
+
displayName: 'Status',
|
|
170
|
+
description: 'Whether this provider is active in the practice',
|
|
171
|
+
options: ['Active', 'On leave', 'Inactive'],
|
|
172
|
+
required: true,
|
|
173
|
+
section: providerSection,
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
const providerBookingStatusField = new SelectField(providerObj, {
|
|
177
|
+
apiName: 'booking_status__c',
|
|
178
|
+
displayName: 'Booking status',
|
|
179
|
+
description: 'Whether scheduling should offer this provider for new appointments',
|
|
180
|
+
options: ['Open', 'Limited', 'Closed'],
|
|
181
|
+
required: true,
|
|
182
|
+
section: providerSection,
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
const providerNextAvailableDaysField = new NumberField(providerObj, {
|
|
186
|
+
apiName: 'next_available_days__c',
|
|
187
|
+
displayName: 'Next available (days)',
|
|
188
|
+
description: 'Estimated days until this provider has an open appointment slot',
|
|
189
|
+
decimalPlaces: 0,
|
|
190
|
+
required: true,
|
|
191
|
+
section: providerSection,
|
|
192
|
+
});
|
|
193
|
+
|
|
140
194
|
// ── Operatory (chair) ─────────────────────────────────────────────────────────
|
|
141
195
|
const operatoryObj = new CustomObject(manifest, {
|
|
142
196
|
apiName: 'dental_operatory__c',
|
|
@@ -216,7 +270,20 @@ const apptPatientRef = new LookupField(apptObj, {
|
|
|
216
270
|
target: patientObj,
|
|
217
271
|
relatedDataLabel: 'Appointments',
|
|
218
272
|
required: true,
|
|
219
|
-
|
|
273
|
+
lookup_filter_rql_condition: '(active_patient__c == True)',
|
|
274
|
+
description: 'Chart to open for this visit (active patients only)',
|
|
275
|
+
section: apptPatientSection,
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
const apptProviderRef = new LookupField(apptObj, {
|
|
279
|
+
apiName: 'provider_ref__c',
|
|
280
|
+
displayName: 'Provider',
|
|
281
|
+
target: providerObj,
|
|
282
|
+
relatedDataLabel: 'Appointments',
|
|
283
|
+
required: true,
|
|
284
|
+
lookup_filter_rql_condition:
|
|
285
|
+
"((provider_status__c == 'Active') AND (next_available_days__c <= 14) AND (booking_status__c != 'Closed'))",
|
|
286
|
+
description: 'Provider assigned to this visit (active and bookable within two weeks)',
|
|
220
287
|
section: apptPatientSection,
|
|
221
288
|
});
|
|
222
289
|
|
|
@@ -378,7 +445,30 @@ new ListViewDef(patientObj, {
|
|
|
378
445
|
viewId: 'view_dental_all_patients',
|
|
379
446
|
name: 'All patients',
|
|
380
447
|
description: 'Full chart list with plan counts',
|
|
381
|
-
fields: [
|
|
448
|
+
fields: [
|
|
449
|
+
'name',
|
|
450
|
+
patientDobField,
|
|
451
|
+
patientPhoneField,
|
|
452
|
+
patientActiveField,
|
|
453
|
+
patientLabelField,
|
|
454
|
+
planCountOnPatient,
|
|
455
|
+
],
|
|
456
|
+
orderBy: 'name',
|
|
457
|
+
sortOrder: 'ASC',
|
|
458
|
+
isPublic: true,
|
|
459
|
+
objectScope: 'all',
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
new ListViewDef(providerObj, {
|
|
463
|
+
viewId: 'view_dental_providers',
|
|
464
|
+
name: 'All providers',
|
|
465
|
+
description: 'Provider directory with appointment booking fields',
|
|
466
|
+
fields: [
|
|
467
|
+
providerNameField,
|
|
468
|
+
providerStatusField,
|
|
469
|
+
providerBookingStatusField,
|
|
470
|
+
providerNextAvailableDaysField,
|
|
471
|
+
],
|
|
382
472
|
orderBy: 'name',
|
|
383
473
|
sortOrder: 'ASC',
|
|
384
474
|
isPublic: true,
|
|
@@ -406,6 +496,7 @@ new ListViewDef(apptObj, {
|
|
|
406
496
|
apptStartField,
|
|
407
497
|
apptDurationMins,
|
|
408
498
|
apptPatientRef,
|
|
499
|
+
apptProviderRef,
|
|
409
500
|
apptVisitTypeField,
|
|
410
501
|
apptStatusField,
|
|
411
502
|
apptBoardLabel,
|
|
@@ -449,6 +540,7 @@ new CustomObjectPageLayout(patientObj, {
|
|
|
449
540
|
patientDobField,
|
|
450
541
|
patientPhoneField,
|
|
451
542
|
patientEmailField,
|
|
543
|
+
patientActiveField,
|
|
452
544
|
patientLabelField,
|
|
453
545
|
],
|
|
454
546
|
},
|
|
@@ -472,6 +564,37 @@ new CustomObjectPageLayout(patientObj, {
|
|
|
472
564
|
visibilityConditions: {},
|
|
473
565
|
});
|
|
474
566
|
|
|
567
|
+
new CustomObjectPageLayout(providerObj, {
|
|
568
|
+
apiName: 'default',
|
|
569
|
+
name: 'Provider',
|
|
570
|
+
layoutId: 'layout_dental_provider',
|
|
571
|
+
tabEdits: {
|
|
572
|
+
newTabs: [
|
|
573
|
+
{
|
|
574
|
+
key: 'provider',
|
|
575
|
+
name: 'Provider',
|
|
576
|
+
type: 'tab_with_sections',
|
|
577
|
+
sections: [
|
|
578
|
+
{
|
|
579
|
+
name: 'Booking',
|
|
580
|
+
type: 'fields_section',
|
|
581
|
+
section: providerSection,
|
|
582
|
+
fields: [
|
|
583
|
+
{ field: providerNameField, editable: true },
|
|
584
|
+
providerStatusField,
|
|
585
|
+
providerBookingStatusField,
|
|
586
|
+
providerNextAvailableDaysField,
|
|
587
|
+
],
|
|
588
|
+
},
|
|
589
|
+
],
|
|
590
|
+
},
|
|
591
|
+
],
|
|
592
|
+
systemTabEdits: {},
|
|
593
|
+
tabsOrder: ['provider'],
|
|
594
|
+
},
|
|
595
|
+
visibilityConditions: {},
|
|
596
|
+
});
|
|
597
|
+
|
|
475
598
|
new CustomObjectPageLayout(operatoryObj, {
|
|
476
599
|
apiName: 'default',
|
|
477
600
|
name: 'Operatory',
|
|
@@ -519,7 +642,14 @@ new CustomObjectPageLayout(apptObj, {
|
|
|
519
642
|
name: 'Patient & status',
|
|
520
643
|
type: 'fields_section',
|
|
521
644
|
section: apptPatientSection,
|
|
522
|
-
fields: [
|
|
645
|
+
fields: [
|
|
646
|
+
apptPatientRef,
|
|
647
|
+
apptProviderRef,
|
|
648
|
+
apptVisitTypeField,
|
|
649
|
+
apptStatusField,
|
|
650
|
+
apptBoardLabel,
|
|
651
|
+
apptClinicalNotes,
|
|
652
|
+
],
|
|
523
653
|
},
|
|
524
654
|
],
|
|
525
655
|
},
|
|
@@ -570,8 +700,8 @@ new CustomObjectPageLayout(planObj, {
|
|
|
570
700
|
|
|
571
701
|
// ── SDUI object-list tabs ───────────────────────────────────────────────────
|
|
572
702
|
const sduiObjectListDependencies = {
|
|
573
|
-
'@rippling/rippling-sdk': '^0.2.0-alpha.
|
|
574
|
-
'@rippling/pebble-sdui-web': '^0.3
|
|
703
|
+
'@rippling/rippling-sdk': '^0.2.0-alpha.65',
|
|
704
|
+
'@rippling/pebble-sdui-web': '^0.6.3',
|
|
575
705
|
};
|
|
576
706
|
|
|
577
707
|
function loadFunctionCode(filename: string): string {
|
|
@@ -632,8 +632,8 @@ new CustomObjectPageLayout(enrollmentObj, {
|
|
|
632
632
|
|
|
633
633
|
// ── SDUI object-list tabs ───────────────────────────────────────────────────
|
|
634
634
|
const sduiObjectListDependencies = {
|
|
635
|
-
'@rippling/rippling-sdk': '^0.2.0-alpha.
|
|
636
|
-
'@rippling/pebble-sdui-web': '^0.3
|
|
635
|
+
'@rippling/rippling-sdk': '^0.2.0-alpha.65',
|
|
636
|
+
'@rippling/pebble-sdui-web': '^0.6.3',
|
|
637
637
|
};
|
|
638
638
|
|
|
639
639
|
function loadFunctionCode(filename: string): string {
|
|
@@ -134,7 +134,7 @@ const todoListFn = new ManifestFunction(manifest, {
|
|
|
134
134
|
name: 'renderTodos',
|
|
135
135
|
description: 'SDUI ObjectListView for todo records',
|
|
136
136
|
code: fs.readFileSync(path.join(__dirname, 'functions', 'todo-list.ts'), 'utf-8'),
|
|
137
|
-
dependencies: { '@rippling/rippling-sdk': '^0.2.0-alpha.
|
|
137
|
+
dependencies: { '@rippling/rippling-sdk': '^0.2.0-alpha.65', '@rippling/pebble-sdui-web': '^0.6.3' },
|
|
138
138
|
isAsync: false,
|
|
139
139
|
});
|
|
140
140
|
|