@pitcher/js-api 1.27.2 → 1.28.0
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/js-api.esm.js +266 -13
- package/js-api.esm.js.map +1 -1
- package/js-api.umd.min.js +11 -11
- package/js-api.umd.min.js.map +1 -1
- package/lib/apps/canvas-builder/components/ui/DynamicContent/dynamicContent.util.d.ts +36 -0
- package/lib/apps/canvas-builder/components/ui/DynamicContent/dynamicContent.util.spec.d.ts +1 -0
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +63 -0
- package/lib/apps/canvas-builder/composables/useCanvasBlocks.d.ts +14 -0
- package/lib/apps/canvas-builder/composables/useCanvasHistory.d.ts +14 -0
- package/lib/apps/canvas-builder/composables/usePopupApps.d.ts +28 -0
- package/lib/apps/canvas-builder/types/canvas.d.ts +7 -0
- package/lib/apps/canvas-builder/util/canvas.util.d.ts +11 -0
- package/lib/components/CFileViewer/pdf/CFileViewer.pdf.util.d.ts +17 -0
- package/lib/components/CFileViewer/pdf/CFileViewer.pdf.util.spec.d.ts +1 -0
- package/lib/components/CRichTextEditor/components/CTextTypeSelect.test.d.ts +1 -0
- package/lib/composables/useCourseOnlyApps.d.ts +11 -0
- package/lib/sdk/api/HighLevelApi.d.ts +4 -0
- package/lib/sdk/api/modules/appsDb.d.ts +57 -0
- package/lib/sdk/api/modules/appsDb.spec.d.ts +1 -0
- package/lib/sdk/api/modules/index.d.ts +1 -0
- package/lib/sdk/main.d.ts +12 -0
- package/lib/sdk/payload.types.d.ts +73 -0
- package/lib/types/app.d.ts +14 -0
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { DynamicContentProps } from '../../../types/canvas';
|
|
3
|
+
/**
|
|
4
|
+
* Default heading font size (px) shown in the settings control. Must match the
|
|
5
|
+
* baseline `font-size-5` class the render/preview falls back to when unset
|
|
6
|
+
* (`font-size: 1.25rem` = 20px at a 16px root). Keep in sync if that class changes.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DEFAULT_HEADING_FONT_SIZE = 20;
|
|
9
|
+
export interface HeadingFormatting {
|
|
10
|
+
heading_font_family: string;
|
|
11
|
+
heading_font_size: number;
|
|
12
|
+
heading_color: string;
|
|
13
|
+
heading_alignment: 'left' | 'center' | 'right';
|
|
14
|
+
heading_bold: boolean;
|
|
15
|
+
heading_italic: boolean;
|
|
16
|
+
heading_underline: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Single source of truth for the heading's default formatting — the baseline look the
|
|
20
|
+
* settings modal opens on. Consumed by the ref initializers, `hasCustomFormatting`,
|
|
21
|
+
* `clearFormatting`, and `handleSave`'s collapse-to-undefined, so they can't drift.
|
|
22
|
+
* `themeFont` is the canvas theme font (`useCanvasTheme().font`), which the unset heading
|
|
23
|
+
* inherits; `heading_font_size` mirrors the `font-size-5` fallback.
|
|
24
|
+
*/
|
|
25
|
+
export declare function getHeadingFormattingDefaults(themeFont: string): HeadingFormatting;
|
|
26
|
+
/**
|
|
27
|
+
* Builds the inline style overrides for the Dynamic Content heading.
|
|
28
|
+
* Only properties the user has explicitly set produce a value; unset properties
|
|
29
|
+
* return `undefined` so the component's baseline classes (`font-700 font-size-5
|
|
30
|
+
* color-text`) render — preserving the look of pre-existing canvases (PIT-7015 AC9).
|
|
31
|
+
*
|
|
32
|
+
* `heading_bold` is three-state on purpose: `undefined` (legacy / never set) and
|
|
33
|
+
* `true` both fall through to the bold `font-700` class; only an explicit `false`
|
|
34
|
+
* emits `fontWeight: 'normal'` to override it.
|
|
35
|
+
*/
|
|
36
|
+
export declare function getHeadingStyle(data: Partial<DynamicContentProps> | undefined): CSSProperties;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -409,6 +409,13 @@ declare const componentNodesById: import('vue').ComputedRef<{
|
|
|
409
409
|
readonly show_heading?: boolean | undefined;
|
|
410
410
|
readonly heading_text?: string | undefined;
|
|
411
411
|
readonly layout_type?: import('../types/canvas').ContentGridLayoutTypes | undefined;
|
|
412
|
+
readonly heading_font_family?: string | undefined;
|
|
413
|
+
readonly heading_font_size?: number | undefined;
|
|
414
|
+
readonly heading_color?: string | undefined;
|
|
415
|
+
readonly heading_alignment?: "left" | "center" | "right" | undefined;
|
|
416
|
+
readonly heading_bold?: boolean | undefined;
|
|
417
|
+
readonly heading_italic?: boolean | undefined;
|
|
418
|
+
readonly heading_underline?: boolean | undefined;
|
|
412
419
|
} | {
|
|
413
420
|
readonly filters?: readonly {
|
|
414
421
|
readonly property: string;
|
|
@@ -913,6 +920,13 @@ declare const sectionComponentNodesBySectionId: import('vue').ComputedRef<{
|
|
|
913
920
|
readonly show_heading?: boolean | undefined;
|
|
914
921
|
readonly heading_text?: string | undefined;
|
|
915
922
|
readonly layout_type?: import('../types/canvas').ContentGridLayoutTypes | undefined;
|
|
923
|
+
readonly heading_font_family?: string | undefined;
|
|
924
|
+
readonly heading_font_size?: number | undefined;
|
|
925
|
+
readonly heading_color?: string | undefined;
|
|
926
|
+
readonly heading_alignment?: "left" | "center" | "right" | undefined;
|
|
927
|
+
readonly heading_bold?: boolean | undefined;
|
|
928
|
+
readonly heading_italic?: boolean | undefined;
|
|
929
|
+
readonly heading_underline?: boolean | undefined;
|
|
916
930
|
} | {
|
|
917
931
|
readonly filters?: readonly {
|
|
918
932
|
readonly property: string;
|
|
@@ -1573,6 +1587,13 @@ export default function useCanvas(): {
|
|
|
1573
1587
|
readonly show_heading?: boolean | undefined;
|
|
1574
1588
|
readonly heading_text?: string | undefined;
|
|
1575
1589
|
readonly layout_type?: import('../types/canvas').ContentGridLayoutTypes | undefined;
|
|
1590
|
+
readonly heading_font_family?: string | undefined;
|
|
1591
|
+
readonly heading_font_size?: number | undefined;
|
|
1592
|
+
readonly heading_color?: string | undefined;
|
|
1593
|
+
readonly heading_alignment?: "left" | "center" | "right" | undefined;
|
|
1594
|
+
readonly heading_bold?: boolean | undefined;
|
|
1595
|
+
readonly heading_italic?: boolean | undefined;
|
|
1596
|
+
readonly heading_underline?: boolean | undefined;
|
|
1576
1597
|
} | {
|
|
1577
1598
|
readonly filters?: readonly {
|
|
1578
1599
|
readonly property: string;
|
|
@@ -2089,6 +2110,13 @@ export default function useCanvas(): {
|
|
|
2089
2110
|
readonly show_heading?: boolean | undefined;
|
|
2090
2111
|
readonly heading_text?: string | undefined;
|
|
2091
2112
|
readonly layout_type?: import('../types/canvas').ContentGridLayoutTypes | undefined;
|
|
2113
|
+
readonly heading_font_family?: string | undefined;
|
|
2114
|
+
readonly heading_font_size?: number | undefined;
|
|
2115
|
+
readonly heading_color?: string | undefined;
|
|
2116
|
+
readonly heading_alignment?: "left" | "center" | "right" | undefined;
|
|
2117
|
+
readonly heading_bold?: boolean | undefined;
|
|
2118
|
+
readonly heading_italic?: boolean | undefined;
|
|
2119
|
+
readonly heading_underline?: boolean | undefined;
|
|
2092
2120
|
} | {
|
|
2093
2121
|
readonly filters?: readonly {
|
|
2094
2122
|
readonly property: string;
|
|
@@ -2567,6 +2595,13 @@ export default function useCanvas(): {
|
|
|
2567
2595
|
show_heading?: boolean | undefined;
|
|
2568
2596
|
heading_text?: string | undefined;
|
|
2569
2597
|
layout_type?: import('../types/canvas').ContentGridLayoutTypes | undefined;
|
|
2598
|
+
heading_font_family?: string | undefined;
|
|
2599
|
+
heading_font_size?: number | undefined;
|
|
2600
|
+
heading_color?: string | undefined;
|
|
2601
|
+
heading_alignment?: "left" | "center" | "right" | undefined;
|
|
2602
|
+
heading_bold?: boolean | undefined;
|
|
2603
|
+
heading_italic?: boolean | undefined;
|
|
2604
|
+
heading_underline?: boolean | undefined;
|
|
2570
2605
|
} | {
|
|
2571
2606
|
filters?: {
|
|
2572
2607
|
property: string;
|
|
@@ -3026,6 +3061,13 @@ export default function useCanvas(): {
|
|
|
3026
3061
|
show_heading?: boolean | undefined;
|
|
3027
3062
|
heading_text?: string | undefined;
|
|
3028
3063
|
layout_type?: import('../types/canvas').ContentGridLayoutTypes | undefined;
|
|
3064
|
+
heading_font_family?: string | undefined;
|
|
3065
|
+
heading_font_size?: number | undefined;
|
|
3066
|
+
heading_color?: string | undefined;
|
|
3067
|
+
heading_alignment?: "left" | "center" | "right" | undefined;
|
|
3068
|
+
heading_bold?: boolean | undefined;
|
|
3069
|
+
heading_italic?: boolean | undefined;
|
|
3070
|
+
heading_underline?: boolean | undefined;
|
|
3029
3071
|
} | {
|
|
3030
3072
|
filters?: {
|
|
3031
3073
|
property: string;
|
|
@@ -3561,6 +3603,13 @@ export default function useCanvas(): {
|
|
|
3561
3603
|
readonly show_heading?: boolean | undefined;
|
|
3562
3604
|
readonly heading_text?: string | undefined;
|
|
3563
3605
|
readonly layout_type?: import('../types/canvas').ContentGridLayoutTypes | undefined;
|
|
3606
|
+
readonly heading_font_family?: string | undefined;
|
|
3607
|
+
readonly heading_font_size?: number | undefined;
|
|
3608
|
+
readonly heading_color?: string | undefined;
|
|
3609
|
+
readonly heading_alignment?: "left" | "center" | "right" | undefined;
|
|
3610
|
+
readonly heading_bold?: boolean | undefined;
|
|
3611
|
+
readonly heading_italic?: boolean | undefined;
|
|
3612
|
+
readonly heading_underline?: boolean | undefined;
|
|
3564
3613
|
} | {
|
|
3565
3614
|
readonly filters?: readonly {
|
|
3566
3615
|
readonly property: string;
|
|
@@ -4270,6 +4319,13 @@ export default function useCanvas(): {
|
|
|
4270
4319
|
readonly show_heading?: boolean | undefined;
|
|
4271
4320
|
readonly heading_text?: string | undefined;
|
|
4272
4321
|
readonly layout_type?: import('../types/canvas').ContentGridLayoutTypes | undefined;
|
|
4322
|
+
readonly heading_font_family?: string | undefined;
|
|
4323
|
+
readonly heading_font_size?: number | undefined;
|
|
4324
|
+
readonly heading_color?: string | undefined;
|
|
4325
|
+
readonly heading_alignment?: "left" | "center" | "right" | undefined;
|
|
4326
|
+
readonly heading_bold?: boolean | undefined;
|
|
4327
|
+
readonly heading_italic?: boolean | undefined;
|
|
4328
|
+
readonly heading_underline?: boolean | undefined;
|
|
4273
4329
|
} | {
|
|
4274
4330
|
readonly filters?: readonly {
|
|
4275
4331
|
readonly property: string;
|
|
@@ -4738,6 +4794,13 @@ export default function useCanvas(): {
|
|
|
4738
4794
|
show_heading?: boolean | undefined;
|
|
4739
4795
|
heading_text?: string | undefined;
|
|
4740
4796
|
layout_type?: import('../types/canvas').ContentGridLayoutTypes | undefined;
|
|
4797
|
+
heading_font_family?: string | undefined;
|
|
4798
|
+
heading_font_size?: number | undefined;
|
|
4799
|
+
heading_color?: string | undefined;
|
|
4800
|
+
heading_alignment?: "left" | "center" | "right" | undefined;
|
|
4801
|
+
heading_bold?: boolean | undefined;
|
|
4802
|
+
heading_italic?: boolean | undefined;
|
|
4803
|
+
heading_underline?: boolean | undefined;
|
|
4741
4804
|
} | {
|
|
4742
4805
|
filters?: {
|
|
4743
4806
|
property: string;
|
|
@@ -560,6 +560,13 @@ export default function useCanvasBlocks(): {
|
|
|
560
560
|
readonly show_heading?: boolean | undefined;
|
|
561
561
|
readonly heading_text?: string | undefined;
|
|
562
562
|
readonly layout_type?: import('../types/canvas').ContentGridLayoutTypes | undefined;
|
|
563
|
+
readonly heading_font_family?: string | undefined;
|
|
564
|
+
readonly heading_font_size?: number | undefined;
|
|
565
|
+
readonly heading_color?: string | undefined;
|
|
566
|
+
readonly heading_alignment?: "left" | "center" | "right" | undefined;
|
|
567
|
+
readonly heading_bold?: boolean | undefined;
|
|
568
|
+
readonly heading_italic?: boolean | undefined;
|
|
569
|
+
readonly heading_underline?: boolean | undefined;
|
|
563
570
|
} | {
|
|
564
571
|
readonly filters?: readonly {
|
|
565
572
|
readonly property: string;
|
|
@@ -1061,6 +1068,13 @@ export default function useCanvasBlocks(): {
|
|
|
1061
1068
|
readonly show_heading?: boolean | undefined;
|
|
1062
1069
|
readonly heading_text?: string | undefined;
|
|
1063
1070
|
readonly layout_type?: import('../types/canvas').ContentGridLayoutTypes | undefined;
|
|
1071
|
+
readonly heading_font_family?: string | undefined;
|
|
1072
|
+
readonly heading_font_size?: number | undefined;
|
|
1073
|
+
readonly heading_color?: string | undefined;
|
|
1074
|
+
readonly heading_alignment?: "left" | "center" | "right" | undefined;
|
|
1075
|
+
readonly heading_bold?: boolean | undefined;
|
|
1076
|
+
readonly heading_italic?: boolean | undefined;
|
|
1077
|
+
readonly heading_underline?: boolean | undefined;
|
|
1064
1078
|
} | {
|
|
1065
1079
|
readonly filters?: readonly {
|
|
1066
1080
|
readonly property: string;
|
|
@@ -366,6 +366,13 @@ export default function useCanvasHistory(): {
|
|
|
366
366
|
show_heading?: boolean | undefined;
|
|
367
367
|
heading_text?: string | undefined;
|
|
368
368
|
layout_type?: import('../types/canvas').ContentGridLayoutTypes | undefined;
|
|
369
|
+
heading_font_family?: string | undefined;
|
|
370
|
+
heading_font_size?: number | undefined;
|
|
371
|
+
heading_color?: string | undefined;
|
|
372
|
+
heading_alignment?: "left" | "center" | "right" | undefined;
|
|
373
|
+
heading_bold?: boolean | undefined;
|
|
374
|
+
heading_italic?: boolean | undefined;
|
|
375
|
+
heading_underline?: boolean | undefined;
|
|
369
376
|
} | {
|
|
370
377
|
filters?: {
|
|
371
378
|
property: string;
|
|
@@ -833,6 +840,13 @@ export default function useCanvasHistory(): {
|
|
|
833
840
|
show_heading?: boolean | undefined;
|
|
834
841
|
heading_text?: string | undefined;
|
|
835
842
|
layout_type?: import('../types/canvas').ContentGridLayoutTypes | undefined;
|
|
843
|
+
heading_font_family?: string | undefined;
|
|
844
|
+
heading_font_size?: number | undefined;
|
|
845
|
+
heading_color?: string | undefined;
|
|
846
|
+
heading_alignment?: "left" | "center" | "right" | undefined;
|
|
847
|
+
heading_bold?: boolean | undefined;
|
|
848
|
+
heading_italic?: boolean | undefined;
|
|
849
|
+
heading_underline?: boolean | undefined;
|
|
836
850
|
} | {
|
|
837
851
|
filters?: {
|
|
838
852
|
property: string;
|
|
@@ -44,6 +44,7 @@ export declare function usePopupApps(): {
|
|
|
44
44
|
enabled: boolean;
|
|
45
45
|
headless?: boolean | undefined;
|
|
46
46
|
auto_install?: boolean | undefined;
|
|
47
|
+
course_only?: boolean | undefined;
|
|
47
48
|
entry?: string | undefined;
|
|
48
49
|
settings?: {
|
|
49
50
|
sections: {
|
|
@@ -58,6 +59,7 @@ export declare function usePopupApps(): {
|
|
|
58
59
|
label: string;
|
|
59
60
|
value: string;
|
|
60
61
|
}[] | undefined;
|
|
62
|
+
dynamic_options?: string | undefined;
|
|
61
63
|
}[];
|
|
62
64
|
}[];
|
|
63
65
|
} | undefined;
|
|
@@ -94,6 +96,7 @@ export declare function usePopupApps(): {
|
|
|
94
96
|
enabled: boolean;
|
|
95
97
|
headless?: boolean | undefined;
|
|
96
98
|
auto_install?: boolean | undefined;
|
|
99
|
+
course_only?: boolean | undefined;
|
|
97
100
|
entry?: string | undefined;
|
|
98
101
|
settings?: {
|
|
99
102
|
sections: {
|
|
@@ -108,6 +111,7 @@ export declare function usePopupApps(): {
|
|
|
108
111
|
label: string;
|
|
109
112
|
value: string;
|
|
110
113
|
}[] | undefined;
|
|
114
|
+
dynamic_options?: string | undefined;
|
|
111
115
|
}[];
|
|
112
116
|
}[];
|
|
113
117
|
} | undefined;
|
|
@@ -144,6 +148,7 @@ export declare function usePopupApps(): {
|
|
|
144
148
|
enabled: boolean;
|
|
145
149
|
headless?: boolean | undefined;
|
|
146
150
|
auto_install?: boolean | undefined;
|
|
151
|
+
course_only?: boolean | undefined;
|
|
147
152
|
entry?: string | undefined;
|
|
148
153
|
settings?: {
|
|
149
154
|
sections: {
|
|
@@ -158,6 +163,7 @@ export declare function usePopupApps(): {
|
|
|
158
163
|
label: string;
|
|
159
164
|
value: string;
|
|
160
165
|
}[] | undefined;
|
|
166
|
+
dynamic_options?: string | undefined;
|
|
161
167
|
}[];
|
|
162
168
|
}[];
|
|
163
169
|
} | undefined;
|
|
@@ -194,6 +200,7 @@ export declare function usePopupApps(): {
|
|
|
194
200
|
enabled: boolean;
|
|
195
201
|
headless?: boolean | undefined;
|
|
196
202
|
auto_install?: boolean | undefined;
|
|
203
|
+
course_only?: boolean | undefined;
|
|
197
204
|
entry?: string | undefined;
|
|
198
205
|
settings?: {
|
|
199
206
|
sections: {
|
|
@@ -208,6 +215,7 @@ export declare function usePopupApps(): {
|
|
|
208
215
|
label: string;
|
|
209
216
|
value: string;
|
|
210
217
|
}[] | undefined;
|
|
218
|
+
dynamic_options?: string | undefined;
|
|
211
219
|
}[];
|
|
212
220
|
}[];
|
|
213
221
|
} | undefined;
|
|
@@ -244,6 +252,7 @@ export declare function usePopupApps(): {
|
|
|
244
252
|
enabled: boolean;
|
|
245
253
|
headless?: boolean | undefined;
|
|
246
254
|
auto_install?: boolean | undefined;
|
|
255
|
+
course_only?: boolean | undefined;
|
|
247
256
|
entry?: string | undefined;
|
|
248
257
|
settings?: {
|
|
249
258
|
sections: {
|
|
@@ -258,6 +267,7 @@ export declare function usePopupApps(): {
|
|
|
258
267
|
label: string;
|
|
259
268
|
value: string;
|
|
260
269
|
}[] | undefined;
|
|
270
|
+
dynamic_options?: string | undefined;
|
|
261
271
|
}[];
|
|
262
272
|
}[];
|
|
263
273
|
} | undefined;
|
|
@@ -294,6 +304,7 @@ export declare function usePopupApps(): {
|
|
|
294
304
|
enabled: boolean;
|
|
295
305
|
headless?: boolean | undefined;
|
|
296
306
|
auto_install?: boolean | undefined;
|
|
307
|
+
course_only?: boolean | undefined;
|
|
297
308
|
entry?: string | undefined;
|
|
298
309
|
settings?: {
|
|
299
310
|
sections: {
|
|
@@ -308,6 +319,7 @@ export declare function usePopupApps(): {
|
|
|
308
319
|
label: string;
|
|
309
320
|
value: string;
|
|
310
321
|
}[] | undefined;
|
|
322
|
+
dynamic_options?: string | undefined;
|
|
311
323
|
}[];
|
|
312
324
|
}[];
|
|
313
325
|
} | undefined;
|
|
@@ -344,6 +356,7 @@ export declare function usePopupApps(): {
|
|
|
344
356
|
enabled: boolean;
|
|
345
357
|
headless?: boolean | undefined;
|
|
346
358
|
auto_install?: boolean | undefined;
|
|
359
|
+
course_only?: boolean | undefined;
|
|
347
360
|
entry?: string | undefined;
|
|
348
361
|
settings?: {
|
|
349
362
|
sections: {
|
|
@@ -358,6 +371,7 @@ export declare function usePopupApps(): {
|
|
|
358
371
|
label: string;
|
|
359
372
|
value: string;
|
|
360
373
|
}[] | undefined;
|
|
374
|
+
dynamic_options?: string | undefined;
|
|
361
375
|
}[];
|
|
362
376
|
}[];
|
|
363
377
|
} | undefined;
|
|
@@ -493,6 +507,7 @@ export declare function usePopupApps(): {
|
|
|
493
507
|
enabled: boolean;
|
|
494
508
|
headless?: boolean | undefined;
|
|
495
509
|
auto_install?: boolean | undefined;
|
|
510
|
+
course_only?: boolean | undefined;
|
|
496
511
|
entry?: string | undefined;
|
|
497
512
|
settings?: {
|
|
498
513
|
sections: {
|
|
@@ -507,6 +522,7 @@ export declare function usePopupApps(): {
|
|
|
507
522
|
label: string;
|
|
508
523
|
value: string;
|
|
509
524
|
}[] | undefined;
|
|
525
|
+
dynamic_options?: string | undefined;
|
|
510
526
|
}[];
|
|
511
527
|
}[];
|
|
512
528
|
} | undefined;
|
|
@@ -543,6 +559,7 @@ export declare function usePopupApps(): {
|
|
|
543
559
|
enabled: boolean;
|
|
544
560
|
headless?: boolean | undefined;
|
|
545
561
|
auto_install?: boolean | undefined;
|
|
562
|
+
course_only?: boolean | undefined;
|
|
546
563
|
entry?: string | undefined;
|
|
547
564
|
settings?: {
|
|
548
565
|
sections: {
|
|
@@ -557,6 +574,7 @@ export declare function usePopupApps(): {
|
|
|
557
574
|
label: string;
|
|
558
575
|
value: string;
|
|
559
576
|
}[] | undefined;
|
|
577
|
+
dynamic_options?: string | undefined;
|
|
560
578
|
}[];
|
|
561
579
|
}[];
|
|
562
580
|
} | undefined;
|
|
@@ -593,6 +611,7 @@ export declare function usePopupApps(): {
|
|
|
593
611
|
enabled: boolean;
|
|
594
612
|
headless?: boolean | undefined;
|
|
595
613
|
auto_install?: boolean | undefined;
|
|
614
|
+
course_only?: boolean | undefined;
|
|
596
615
|
entry?: string | undefined;
|
|
597
616
|
settings?: {
|
|
598
617
|
sections: {
|
|
@@ -607,6 +626,7 @@ export declare function usePopupApps(): {
|
|
|
607
626
|
label: string;
|
|
608
627
|
value: string;
|
|
609
628
|
}[] | undefined;
|
|
629
|
+
dynamic_options?: string | undefined;
|
|
610
630
|
}[];
|
|
611
631
|
}[];
|
|
612
632
|
} | undefined;
|
|
@@ -643,6 +663,7 @@ export declare function usePopupApps(): {
|
|
|
643
663
|
enabled: boolean;
|
|
644
664
|
headless?: boolean | undefined;
|
|
645
665
|
auto_install?: boolean | undefined;
|
|
666
|
+
course_only?: boolean | undefined;
|
|
646
667
|
entry?: string | undefined;
|
|
647
668
|
settings?: {
|
|
648
669
|
sections: {
|
|
@@ -657,6 +678,7 @@ export declare function usePopupApps(): {
|
|
|
657
678
|
label: string;
|
|
658
679
|
value: string;
|
|
659
680
|
}[] | undefined;
|
|
681
|
+
dynamic_options?: string | undefined;
|
|
660
682
|
}[];
|
|
661
683
|
}[];
|
|
662
684
|
} | undefined;
|
|
@@ -693,6 +715,7 @@ export declare function usePopupApps(): {
|
|
|
693
715
|
enabled: boolean;
|
|
694
716
|
headless?: boolean | undefined;
|
|
695
717
|
auto_install?: boolean | undefined;
|
|
718
|
+
course_only?: boolean | undefined;
|
|
696
719
|
entry?: string | undefined;
|
|
697
720
|
settings?: {
|
|
698
721
|
sections: {
|
|
@@ -707,6 +730,7 @@ export declare function usePopupApps(): {
|
|
|
707
730
|
label: string;
|
|
708
731
|
value: string;
|
|
709
732
|
}[] | undefined;
|
|
733
|
+
dynamic_options?: string | undefined;
|
|
710
734
|
}[];
|
|
711
735
|
}[];
|
|
712
736
|
} | undefined;
|
|
@@ -743,6 +767,7 @@ export declare function usePopupApps(): {
|
|
|
743
767
|
enabled: boolean;
|
|
744
768
|
headless?: boolean | undefined;
|
|
745
769
|
auto_install?: boolean | undefined;
|
|
770
|
+
course_only?: boolean | undefined;
|
|
746
771
|
entry?: string | undefined;
|
|
747
772
|
settings?: {
|
|
748
773
|
sections: {
|
|
@@ -757,6 +782,7 @@ export declare function usePopupApps(): {
|
|
|
757
782
|
label: string;
|
|
758
783
|
value: string;
|
|
759
784
|
}[] | undefined;
|
|
785
|
+
dynamic_options?: string | undefined;
|
|
760
786
|
}[];
|
|
761
787
|
}[];
|
|
762
788
|
} | undefined;
|
|
@@ -793,6 +819,7 @@ export declare function usePopupApps(): {
|
|
|
793
819
|
enabled: boolean;
|
|
794
820
|
headless?: boolean | undefined;
|
|
795
821
|
auto_install?: boolean | undefined;
|
|
822
|
+
course_only?: boolean | undefined;
|
|
796
823
|
entry?: string | undefined;
|
|
797
824
|
settings?: {
|
|
798
825
|
sections: {
|
|
@@ -807,6 +834,7 @@ export declare function usePopupApps(): {
|
|
|
807
834
|
label: string;
|
|
808
835
|
value: string;
|
|
809
836
|
}[] | undefined;
|
|
837
|
+
dynamic_options?: string | undefined;
|
|
810
838
|
}[];
|
|
811
839
|
}[];
|
|
812
840
|
} | undefined;
|
|
@@ -109,6 +109,13 @@ export interface DynamicContentProps {
|
|
|
109
109
|
show_heading?: boolean;
|
|
110
110
|
heading_text?: string;
|
|
111
111
|
layout_type?: ContentGridLayoutTypes;
|
|
112
|
+
heading_font_family?: string;
|
|
113
|
+
heading_font_size?: number;
|
|
114
|
+
heading_color?: string;
|
|
115
|
+
heading_alignment?: 'left' | 'center' | 'right';
|
|
116
|
+
heading_bold?: boolean;
|
|
117
|
+
heading_italic?: boolean;
|
|
118
|
+
heading_underline?: boolean;
|
|
112
119
|
}
|
|
113
120
|
export interface CustomDataTableHierarchyLevel {
|
|
114
121
|
type: 'group' | 'data';
|
|
@@ -14,6 +14,17 @@ export declare function getComponentDescription(type: ComponentTypes | string, t
|
|
|
14
14
|
description?: string;
|
|
15
15
|
}): string;
|
|
16
16
|
export declare function getNodeDisplayNameByComponentType(node: ComponentNode | null | undefined): string;
|
|
17
|
+
/**
|
|
18
|
+
* Resolves a component's human-readable title the same way the editor's Reorder panel does:
|
|
19
|
+
* prefer the admin-given name (`tracking_id`, via getNodeDisplayNameByComponentType), otherwise
|
|
20
|
+
* fall back to a localized component-type label. The name is trimmed first, so a whitespace-only
|
|
21
|
+
* value (e.g. a blank Text or a whitespace tracking_id) falls back to the type label instead of
|
|
22
|
+
* rendering a blank row; the `!== node.type` guard likewise prevents an un-renamed node (whose
|
|
23
|
+
* tracking_id defaults to its type string) from surfacing the raw type as its title.
|
|
24
|
+
* Shared by the editor Reorder panel and the rep "Customize your homepage" panel so the two views
|
|
25
|
+
* stay consistent by construction.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getNodeDisplayTitle(node: ComponentNode, t: (input: string) => string): string;
|
|
17
28
|
export declare function getSectionGlobalComponentSpacing(section: CanvasRetrieve['sections'][number]): string | undefined;
|
|
18
29
|
export declare function discardSectionComponentOverride(sectionId: CanvasRetrieve['id'], componentId: ComponentNode['id'], overrides: SectionComponentOverrides): SectionComponentOverrides;
|
|
19
30
|
export declare function addCanvasComponent(currentContent: ComponentNode[], add: {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as PSPDFKitType } from 'pspdfkit';
|
|
2
|
+
/**
|
|
3
|
+
* Tear down a PSPDFKit instance for a container without ever throwing.
|
|
4
|
+
*
|
|
5
|
+
* A password-protected PDF makes PSPDFKit render its own built-in password
|
|
6
|
+
* dialog and stay mid-load (the `PSPDFKit.load()` Promise never resolves, so no
|
|
7
|
+
* instance is ever assigned). Calling `PSPDFKit.unload(container)` while the
|
|
8
|
+
* container is still loading throws — which previously propagated out of the
|
|
9
|
+
* viewer's close handler and aborted it before the host was told to close. The
|
|
10
|
+
* user was then stuck on the password prompt with no way out but a full browser
|
|
11
|
+
* refresh (neither Exit nor Esc worked).
|
|
12
|
+
*
|
|
13
|
+
* Swallowing the unload error here keeps close/unmount teardown resilient: the
|
|
14
|
+
* container is removed from the DOM by the unmount that follows, which is what
|
|
15
|
+
* actually disposes the stuck dialog.
|
|
16
|
+
*/
|
|
17
|
+
export declare function safePspdfkitUnload(pspdfkit: Pick<typeof PSPDFKitType, 'unload'> | undefined, container: HTMLElement | null): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AppFile } from '../types/app';
|
|
2
|
+
/**
|
|
3
|
+
* Course-only apps (`module.canvas.course_only`, e.g. the L&D assessment-canvas wrap, PIT-6978) are
|
|
4
|
+
* offered in the Add-Component / Embeddable pickers ONLY where the host opts in via
|
|
5
|
+
* `provide('allowCourseOnlyApps', true)` — course-canvas-host does; normal sales / DSR canvases don't.
|
|
6
|
+
* Shared by AddComponentModal + Embeddable.settings so the two filters can't drift.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useCourseOnlyApps(): {
|
|
9
|
+
allowCourseOnlyApps: boolean;
|
|
10
|
+
isAppAllowed: (app: AppFile) => boolean;
|
|
11
|
+
};
|
|
@@ -126,6 +126,10 @@ export declare function createHighLevelApi(options?: ApiOptions): {
|
|
|
126
126
|
aiGetCapabilities(): Promise<import('../payload.types').AIRuntimeCapabilities>;
|
|
127
127
|
aiComplete(payload: import('../payload.types').AICompletePayload): Promise<import('../payload.types').AICompleteResult>;
|
|
128
128
|
piaSearchAnswer(payload: import('../payload.types').PiaSearchAnswerPayload): Promise<import('../payload.types').PiaSearchAnswerResult>;
|
|
129
|
+
appsDbGetEntries(payload: import('../payload.types').AppsDbGetEntriesPayload): Promise<import('../payload.types').AppsDbEntriesResult>;
|
|
130
|
+
appsDbUpsertEntry(payload: import('../payload.types').AppsDbUpsertEntryPayload): Promise<import('../payload.types').AppsDbEntry>;
|
|
131
|
+
appsDbDeleteEntry(payload: import('../payload.types').AppsDbDeleteEntryPayload): Promise<void>;
|
|
132
|
+
appsDbPsql(payload: import('../payload.types').AppsDbPsqlPayload): Promise<import('../payload.types').AppsDbEntriesResult>;
|
|
129
133
|
open(payload?: import('../payload.types').OpenRequestPayload): Promise<string>;
|
|
130
134
|
openExternalUrl(payload: import('../payload.types').OpenExternalUrlRequestPayload): Promise<void>;
|
|
131
135
|
getEnv(): Promise<import('../interfaces').PitcherEnv>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { AppsDbDeleteEntryPayload, AppsDbEntriesResult, AppsDbEntry, AppsDbGetEntriesPayload, AppsDbPsqlPayload, AppsDbUpsertEntryPayload } from '../../payload.types';
|
|
2
|
+
/**
|
|
3
|
+
* Lists AppsDB entries of a type, adapting to the platform:
|
|
4
|
+
* - Web: GET to the next-core AppsDB REST API.
|
|
5
|
+
* - iOS: reads the local offline mirror via the `appsdb_get_entries` bridge
|
|
6
|
+
* request. Types not allowlisted in the `offline_appsdb_types` setting fail
|
|
7
|
+
* with `code = type_not_synced` and automatically fall back to the network.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const { entries } = await api.appsDbGetEntries({ type: 'favorite' })
|
|
11
|
+
*/
|
|
12
|
+
export declare function appsDbGetEntries(payload: AppsDbGetEntriesPayload): Promise<AppsDbEntriesResult>;
|
|
13
|
+
/**
|
|
14
|
+
* Creates or updates (deep-merges) an AppsDB entry, adapting to the platform:
|
|
15
|
+
* - Web: POST (create) or PUT (update, when `id` is set) to the next-core AppsDB REST API.
|
|
16
|
+
* - iOS: the `appsdb_upsert_entry` bridge request writes on the server and
|
|
17
|
+
* mirrors the authoritative result locally. Offline it rejects with
|
|
18
|
+
* `code = offline_write_not_supported` — AppsDB writes are online-only.
|
|
19
|
+
*
|
|
20
|
+
* The `data` blob is sent verbatim (no key-casing transformation), and all
|
|
21
|
+
* `appsDb*` responses are likewise returned verbatim — even for
|
|
22
|
+
* `casing: 'camel'` consumers — so bridge and REST results are identical.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* const entry = await api.appsDbUpsertEntry({ type: 'favorite', user_id: 1, data: { file_id: 'abc' } })
|
|
26
|
+
*/
|
|
27
|
+
export declare function appsDbUpsertEntry(payload: AppsDbUpsertEntryPayload): Promise<AppsDbEntry>;
|
|
28
|
+
/**
|
|
29
|
+
* Deletes an AppsDB entry (soft delete server-side), adapting to the platform:
|
|
30
|
+
* - Web: DELETE to the next-core AppsDB REST API.
|
|
31
|
+
* - iOS: the `appsdb_delete_entry` bridge request deletes on the server and
|
|
32
|
+
* removes the entry from the local offline mirror. Offline it rejects with
|
|
33
|
+
* `code = offline_write_not_supported`.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await api.appsDbDeleteEntry({ id: '01H5ZXE7YP2JR6Q1Z2G3K4H5J6' })
|
|
37
|
+
*/
|
|
38
|
+
export declare function appsDbDeleteEntry(payload: AppsDbDeleteEntryPayload): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Runs a PSQL (SQL-like) query against AppsDB: POST to the next-core
|
|
41
|
+
* `/appsdb/psql` endpoint whenever the network is available.
|
|
42
|
+
*
|
|
43
|
+
* On iOS the local offline mirror (`appsdb_get_entries` + client-side
|
|
44
|
+
* evaluation of simple `field = literal` AND-chains) serves the query ONLY
|
|
45
|
+
* while the device is offline, or when an online fetch fails at the
|
|
46
|
+
* connection level. Online queries are always answered by the server: Hub
|
|
47
|
+
* flows use psql results to decide between creating and updating an entry,
|
|
48
|
+
* and the mirror can lag the server by a sync cycle (multi-device) — a stale
|
|
49
|
+
* empty read would turn an update into a duplicate create. Offline that same
|
|
50
|
+
* stale read is harmless because AppsDB writes are rejected offline anyway.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* const { entries } = await api.appsDbPsql({
|
|
54
|
+
* query: "SELECT * FROM personalfolders WHERE user_id = 1 AND data.custom_domain = 'acme.my.pitcher.com'",
|
|
55
|
+
* })
|
|
56
|
+
*/
|
|
57
|
+
export declare function appsDbPsql(payload: AppsDbPsqlPayload): Promise<AppsDbEntriesResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/sdk/main.d.ts
CHANGED
|
@@ -198,6 +198,10 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
198
198
|
aiGetCapabilities(): Promise<import('./payload.types').AIRuntimeCapabilities>;
|
|
199
199
|
aiComplete(payload: import('./payload.types').AICompletePayload): Promise<import('./payload.types').AICompleteResult>;
|
|
200
200
|
piaSearchAnswer(payload: import('./payload.types').PiaSearchAnswerPayload): Promise<import('./payload.types').PiaSearchAnswerResult>;
|
|
201
|
+
appsDbGetEntries(payload: import('./payload.types').AppsDbGetEntriesPayload): Promise<import('./payload.types').AppsDbEntriesResult>;
|
|
202
|
+
appsDbUpsertEntry(payload: import('./payload.types').AppsDbUpsertEntryPayload): Promise<import('./payload.types').AppsDbEntry>;
|
|
203
|
+
appsDbDeleteEntry(payload: import('./payload.types').AppsDbDeleteEntryPayload): Promise<void>;
|
|
204
|
+
appsDbPsql(payload: import('./payload.types').AppsDbPsqlPayload): Promise<import('./payload.types').AppsDbEntriesResult>;
|
|
201
205
|
open(payload?: import('./payload.types').OpenRequestPayload): Promise<string>;
|
|
202
206
|
openExternalUrl(payload: import('./payload.types').OpenExternalUrlRequestPayload): Promise<void>;
|
|
203
207
|
getEnv(): Promise<import('./interfaces').PitcherEnv>;
|
|
@@ -491,6 +495,10 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
491
495
|
aiGetCapabilities(): Promise<import('./payload.types').AIRuntimeCapabilities>;
|
|
492
496
|
aiComplete(payload: import('./payload.types').AICompletePayload): Promise<import('./payload.types').AICompleteResult>;
|
|
493
497
|
piaSearchAnswer(payload: import('./payload.types').PiaSearchAnswerPayload): Promise<import('./payload.types').PiaSearchAnswerResult>;
|
|
498
|
+
appsDbGetEntries(payload: import('./payload.types').AppsDbGetEntriesPayload): Promise<import('./payload.types').AppsDbEntriesResult>;
|
|
499
|
+
appsDbUpsertEntry(payload: import('./payload.types').AppsDbUpsertEntryPayload): Promise<import('./payload.types').AppsDbEntry>;
|
|
500
|
+
appsDbDeleteEntry(payload: import('./payload.types').AppsDbDeleteEntryPayload): Promise<void>;
|
|
501
|
+
appsDbPsql(payload: import('./payload.types').AppsDbPsqlPayload): Promise<import('./payload.types').AppsDbEntriesResult>;
|
|
494
502
|
open(payload?: import('./payload.types').OpenRequestPayload): Promise<string>;
|
|
495
503
|
openExternalUrl(payload: import('./payload.types').OpenExternalUrlRequestPayload): Promise<void>;
|
|
496
504
|
getEnv(): Promise<import('./interfaces').PitcherEnv>;
|
|
@@ -730,6 +738,10 @@ export declare function useApi(options?: ApiOptions): {
|
|
|
730
738
|
aiGetCapabilities(): Promise<import('./payload.types').AIRuntimeCapabilities>;
|
|
731
739
|
aiComplete(payload: import('./payload.types').AICompletePayload): Promise<import('./payload.types').AICompleteResult>;
|
|
732
740
|
piaSearchAnswer(payload: import('./payload.types').PiaSearchAnswerPayload): Promise<import('./payload.types').PiaSearchAnswerResult>;
|
|
741
|
+
appsDbGetEntries(payload: import('./payload.types').AppsDbGetEntriesPayload): Promise<import('./payload.types').AppsDbEntriesResult>;
|
|
742
|
+
appsDbUpsertEntry(payload: import('./payload.types').AppsDbUpsertEntryPayload): Promise<import('./payload.types').AppsDbEntry>;
|
|
743
|
+
appsDbDeleteEntry(payload: import('./payload.types').AppsDbDeleteEntryPayload): Promise<void>;
|
|
744
|
+
appsDbPsql(payload: import('./payload.types').AppsDbPsqlPayload): Promise<import('./payload.types').AppsDbEntriesResult>;
|
|
733
745
|
openExternalUrl(payload: import('./payload.types').OpenExternalUrlRequestPayload): Promise<void>;
|
|
734
746
|
getEnv(): Promise<import('./interfaces').PitcherEnv>;
|
|
735
747
|
updateMyUser(payload: {
|