@feltmaps/js-sdk 1.7.0-next.16 → 1.7.0-next.17
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/dist/client.cjs +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +1 -1
- package/dist/{controller-DoTYIPvN.d.cts → controller-XgU-ujEt.d.cts} +104 -127
- package/dist/{controller-DoTYIPvN.d.ts → controller-XgU-ujEt.d.ts} +104 -127
- package/dist/controller-bundled.d.ts +104 -127
- package/dist/handler.cjs +1 -1
- package/dist/handler.d.cts +41 -120
- package/dist/handler.d.ts +41 -120
- package/dist/handler.js +1 -1
- package/package.json +1 -1
|
@@ -9972,6 +9972,22 @@ declare const uiSelectElementSchema: ZodObject<objectUtil.extendShape<objectUtil
|
|
|
9972
9972
|
* ```
|
|
9973
9973
|
*
|
|
9974
9974
|
* @example
|
|
9975
|
+
* #### with label
|
|
9976
|
+
* `label` is displayed above the select and used for screen readers.
|
|
9977
|
+
* `placeholder` is displayed in the select when no value is selected.
|
|
9978
|
+
*
|
|
9979
|
+
* ```typescript
|
|
9980
|
+
* {
|
|
9981
|
+
* type: "Select",
|
|
9982
|
+
* label: "Fruit",
|
|
9983
|
+
* options: [{ label: "Apple", value: "apple" }, { label: "Banana", value: "banana" }],
|
|
9984
|
+
* value: undefined,
|
|
9985
|
+
* placeholder: "Select a fruit",
|
|
9986
|
+
* onChange: (args) => console.log(args.value),
|
|
9987
|
+
* }
|
|
9988
|
+
* ```
|
|
9989
|
+
*
|
|
9990
|
+
* @example
|
|
9975
9991
|
* #### with search
|
|
9976
9992
|
* ```typescript
|
|
9977
9993
|
* {
|
|
@@ -10521,7 +10537,7 @@ declare const placementForUiElementSchema: ZodUnion<[ZodObject<{
|
|
|
10521
10537
|
at: "start" | "end";
|
|
10522
10538
|
}>]>;
|
|
10523
10539
|
/**
|
|
10524
|
-
* Used in {@link UiController.
|
|
10540
|
+
* Used in {@link UiController.createOrUpdatePanel} to specify the position of a panel in the stack
|
|
10525
10541
|
* and in {@link UiController.createPanelElements} to specify the position of an element in a panel.
|
|
10526
10542
|
*
|
|
10527
10543
|
* In both cases, the default value is `{ at: "end" }`.
|
|
@@ -10554,7 +10570,7 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
|
|
|
10554
10570
|
/**
|
|
10555
10571
|
* The elements to add to the panel body.
|
|
10556
10572
|
*/
|
|
10557
|
-
body: ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many"
|
|
10573
|
+
body: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
|
|
10558
10574
|
/**
|
|
10559
10575
|
* The elements to add to the panel footer.
|
|
10560
10576
|
*/
|
|
@@ -10569,7 +10585,6 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
|
|
|
10569
10585
|
}>, "strip", ZodTypeAny, {
|
|
10570
10586
|
type: "Panel";
|
|
10571
10587
|
id: string;
|
|
10572
|
-
body: UIPanelElement[];
|
|
10573
10588
|
onCreate?: ((args_0: {
|
|
10574
10589
|
id: string;
|
|
10575
10590
|
}, ...args: unknown[]) => void) | undefined;
|
|
@@ -10577,6 +10592,7 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
|
|
|
10577
10592
|
id: string;
|
|
10578
10593
|
}, ...args: unknown[]) => void) | undefined;
|
|
10579
10594
|
title?: string | undefined;
|
|
10595
|
+
body?: UIPanelElement[] | undefined;
|
|
10580
10596
|
footer?: UIPanelElement[] | undefined;
|
|
10581
10597
|
onClickClose?: ((args_0: {
|
|
10582
10598
|
id: string;
|
|
@@ -10584,7 +10600,6 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
|
|
|
10584
10600
|
}, {
|
|
10585
10601
|
type: "Panel";
|
|
10586
10602
|
id: string;
|
|
10587
|
-
body: UIPanelElement[];
|
|
10588
10603
|
onCreate?: ((args_0: {
|
|
10589
10604
|
id: string;
|
|
10590
10605
|
}, ...args: unknown[]) => void) | undefined;
|
|
@@ -10592,6 +10607,7 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
|
|
|
10592
10607
|
id: string;
|
|
10593
10608
|
}, ...args: unknown[]) => void) | undefined;
|
|
10594
10609
|
title?: string | undefined;
|
|
10610
|
+
body?: UIPanelElement[] | undefined;
|
|
10595
10611
|
footer?: UIPanelElement[] | undefined;
|
|
10596
10612
|
onClickClose?: ((args_0: {
|
|
10597
10613
|
id: string;
|
|
@@ -10599,7 +10615,7 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
|
|
|
10599
10615
|
}>;
|
|
10600
10616
|
/**
|
|
10601
10617
|
* Represents a panel in the UI.
|
|
10602
|
-
* It can be added to the map by using the {@link UiController.
|
|
10618
|
+
* It can be added to the map by using the {@link UiController.createOrUpdatePanel} method.
|
|
10603
10619
|
*
|
|
10604
10620
|
* A panel is a container for other UI elements.
|
|
10605
10621
|
* It can have a title, a body, a footer as well as a close button.
|
|
@@ -10663,11 +10679,18 @@ declare const uiPanelSchema: ZodObject<objectUtil.extendShape<objectUtil.extendS
|
|
|
10663
10679
|
* ```
|
|
10664
10680
|
*
|
|
10665
10681
|
*/
|
|
10666
|
-
interface UIPanel extends UIElementBase, Omit<zInfer<typeof uiPanelSchema>, "onClickClose" | "body" | "footer" | "onCreate" | "onDestroy"> {
|
|
10682
|
+
interface UIPanel extends UIElementBase, Omit<zInfer<typeof uiPanelSchema>, "onClickClose" | "body" | "footer" | "onCreate" | "onDestroy" | "id"> {
|
|
10683
|
+
/**
|
|
10684
|
+
* The ID of the panel obtained from {@link UiController.createPanelId}.
|
|
10685
|
+
*
|
|
10686
|
+
* @remarks
|
|
10687
|
+
* Custom IDs are not supported.
|
|
10688
|
+
*/
|
|
10689
|
+
id: string;
|
|
10667
10690
|
/**
|
|
10668
10691
|
* The elements to add to the panel body.
|
|
10669
10692
|
*/
|
|
10670
|
-
body
|
|
10693
|
+
body?: UIPanelElement[];
|
|
10671
10694
|
/**
|
|
10672
10695
|
* The elements to add to the panel footer.
|
|
10673
10696
|
*/
|
|
@@ -10685,7 +10708,7 @@ interface UIPanel extends UIElementBase, Omit<zInfer<typeof uiPanelSchema>, "onC
|
|
|
10685
10708
|
declare const uiPanelCreateSchema: {
|
|
10686
10709
|
params: ZodObject<objectUtil.extendShape<Omit<{
|
|
10687
10710
|
type: ZodOptional<ZodLiteral<"Panel">>;
|
|
10688
|
-
id:
|
|
10711
|
+
id: ZodString;
|
|
10689
10712
|
onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
|
|
10690
10713
|
id: ZodString;
|
|
10691
10714
|
}, "strip", ZodTypeAny, {
|
|
@@ -10701,7 +10724,7 @@ declare const uiPanelCreateSchema: {
|
|
|
10701
10724
|
id: string;
|
|
10702
10725
|
}>], ZodUnknown>, ZodVoid>>;
|
|
10703
10726
|
title: ZodOptional<ZodString>;
|
|
10704
|
-
body: ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many"
|
|
10727
|
+
body: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
|
|
10705
10728
|
footer: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
|
|
10706
10729
|
onClickClose: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
|
|
10707
10730
|
id: ZodString;
|
|
@@ -10711,12 +10734,11 @@ declare const uiPanelCreateSchema: {
|
|
|
10711
10734
|
id: string;
|
|
10712
10735
|
}>], ZodUnknown>, ZodVoid>>;
|
|
10713
10736
|
}, "body" | "footer">, {
|
|
10714
|
-
body: ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many"
|
|
10737
|
+
body: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
|
|
10715
10738
|
footer: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
|
|
10716
10739
|
}>, "strip", ZodTypeAny, {
|
|
10717
|
-
|
|
10740
|
+
id: string;
|
|
10718
10741
|
type?: "Panel" | undefined;
|
|
10719
|
-
id?: string | undefined;
|
|
10720
10742
|
onCreate?: ((args_0: {
|
|
10721
10743
|
id: string;
|
|
10722
10744
|
}, ...args: unknown[]) => void) | undefined;
|
|
@@ -10724,14 +10746,14 @@ declare const uiPanelCreateSchema: {
|
|
|
10724
10746
|
id: string;
|
|
10725
10747
|
}, ...args: unknown[]) => void) | undefined;
|
|
10726
10748
|
title?: string | undefined;
|
|
10749
|
+
body?: UIPanelElementCreate[] | undefined;
|
|
10727
10750
|
footer?: UIPanelElementCreate[] | undefined;
|
|
10728
10751
|
onClickClose?: ((args_0: {
|
|
10729
10752
|
id: string;
|
|
10730
10753
|
}, ...args: unknown[]) => void) | undefined;
|
|
10731
10754
|
}, {
|
|
10732
|
-
|
|
10755
|
+
id: string;
|
|
10733
10756
|
type?: "Panel" | undefined;
|
|
10734
|
-
id?: string | undefined;
|
|
10735
10757
|
onCreate?: ((args_0: {
|
|
10736
10758
|
id: string;
|
|
10737
10759
|
}, ...args: unknown[]) => void) | undefined;
|
|
@@ -10739,51 +10761,21 @@ declare const uiPanelCreateSchema: {
|
|
|
10739
10761
|
id: string;
|
|
10740
10762
|
}, ...args: unknown[]) => void) | undefined;
|
|
10741
10763
|
title?: string | undefined;
|
|
10764
|
+
body?: UIPanelElementCreate[] | undefined;
|
|
10742
10765
|
footer?: UIPanelElementCreate[] | undefined;
|
|
10743
10766
|
onClickClose?: ((args_0: {
|
|
10744
10767
|
id: string;
|
|
10745
10768
|
}, ...args: unknown[]) => void) | undefined;
|
|
10746
10769
|
}>;
|
|
10747
|
-
clonable: ZodObject<objectUtil.extendShape<
|
|
10770
|
+
clonable: ZodObject<objectUtil.extendShape<{
|
|
10748
10771
|
type: ZodOptional<ZodLiteral<"Panel">>;
|
|
10749
|
-
id:
|
|
10750
|
-
onCreate: ZodOptional<
|
|
10751
|
-
|
|
10752
|
-
}, "strip", ZodTypeAny, {
|
|
10753
|
-
id: string;
|
|
10754
|
-
}, {
|
|
10755
|
-
id: string;
|
|
10756
|
-
}>], ZodUnknown>, ZodVoid>>;
|
|
10757
|
-
onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
|
|
10758
|
-
id: ZodString;
|
|
10759
|
-
}, "strip", ZodTypeAny, {
|
|
10760
|
-
id: string;
|
|
10761
|
-
}, {
|
|
10762
|
-
id: string;
|
|
10763
|
-
}>], ZodUnknown>, ZodVoid>>;
|
|
10772
|
+
id: ZodString;
|
|
10773
|
+
onCreate: ZodOptional<ZodString>;
|
|
10774
|
+
onDestroy: ZodOptional<ZodString>;
|
|
10764
10775
|
title: ZodOptional<ZodString>;
|
|
10765
|
-
body: ZodArray<ZodType<
|
|
10766
|
-
footer: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
|
|
10767
|
-
onClickClose: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
|
|
10768
|
-
id: ZodString;
|
|
10769
|
-
}, "strip", ZodTypeAny, {
|
|
10770
|
-
id: string;
|
|
10771
|
-
}, {
|
|
10772
|
-
id: string;
|
|
10773
|
-
}>], ZodUnknown>, ZodVoid>>;
|
|
10774
|
-
}, "body" | "footer">, {
|
|
10775
|
-
body: ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">;
|
|
10776
|
+
body: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
|
|
10776
10777
|
footer: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
|
|
10777
|
-
|
|
10778
|
-
id: ZodOptional<ZodString>;
|
|
10779
|
-
onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
|
|
10780
|
-
id: ZodString;
|
|
10781
|
-
}, "strip", ZodTypeAny, {
|
|
10782
|
-
id: string;
|
|
10783
|
-
}, {
|
|
10784
|
-
id: string;
|
|
10785
|
-
}>], ZodUnknown>, ZodVoid>>;
|
|
10786
|
-
onDestroy: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
|
|
10778
|
+
onClickClose: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
|
|
10787
10779
|
id: ZodString;
|
|
10788
10780
|
}, "strip", ZodTypeAny, {
|
|
10789
10781
|
id: string;
|
|
@@ -10791,46 +10783,40 @@ declare const uiPanelCreateSchema: {
|
|
|
10791
10783
|
id: string;
|
|
10792
10784
|
}>], ZodUnknown>, ZodVoid>>;
|
|
10793
10785
|
}, {
|
|
10794
|
-
onCreate: ZodOptional<ZodString>;
|
|
10795
|
-
onDestroy: ZodOptional<ZodString>;
|
|
10796
|
-
}>>, {
|
|
10797
10786
|
onClickClose: ZodOptional<ZodString>;
|
|
10798
|
-
body: ZodArray<ZodType<UIPanelElementCreateClonable, ZodTypeDef, UIPanelElementCreateClonable>, "many"
|
|
10787
|
+
body: ZodOptional<ZodArray<ZodType<UIPanelElementCreateClonable, ZodTypeDef, UIPanelElementCreateClonable>, "many">>;
|
|
10799
10788
|
footer: ZodOptional<ZodArray<ZodType<UIPanelElementCreateClonable, ZodTypeDef, UIPanelElementCreateClonable>, "many">>;
|
|
10800
10789
|
}>, "strip", ZodTypeAny, {
|
|
10801
|
-
|
|
10790
|
+
id: string;
|
|
10802
10791
|
type?: "Panel" | undefined;
|
|
10803
|
-
id?: string | undefined;
|
|
10804
10792
|
onCreate?: string | undefined;
|
|
10805
10793
|
onDestroy?: string | undefined;
|
|
10806
10794
|
title?: string | undefined;
|
|
10795
|
+
body?: UIPanelElementCreateClonable[] | undefined;
|
|
10807
10796
|
footer?: UIPanelElementCreateClonable[] | undefined;
|
|
10808
10797
|
onClickClose?: string | undefined;
|
|
10809
10798
|
}, {
|
|
10810
|
-
|
|
10799
|
+
id: string;
|
|
10811
10800
|
type?: "Panel" | undefined;
|
|
10812
|
-
id?: string | undefined;
|
|
10813
10801
|
onCreate?: string | undefined;
|
|
10814
10802
|
onDestroy?: string | undefined;
|
|
10815
10803
|
title?: string | undefined;
|
|
10804
|
+
body?: UIPanelElementCreateClonable[] | undefined;
|
|
10816
10805
|
footer?: UIPanelElementCreateClonable[] | undefined;
|
|
10817
10806
|
onClickClose?: string | undefined;
|
|
10818
10807
|
}>;
|
|
10819
10808
|
};
|
|
10820
10809
|
/**
|
|
10821
|
-
* The parameters for creating a panel by using {@link UiController.
|
|
10810
|
+
* The parameters for creating a panel by using {@link UiController.createOrUpdatePanel}.
|
|
10822
10811
|
*
|
|
10823
10812
|
* @see {@link UIPanel} for more information about panels.
|
|
10824
|
-
*
|
|
10825
|
-
* @remarks
|
|
10826
|
-
* `id` is optional but recommended if you want to be able to perform updates.
|
|
10827
10813
|
*/
|
|
10828
|
-
interface
|
|
10814
|
+
interface UIPanelCreateOrUpdate extends Omit<UIPanel, "body" | "footer" | "type">, Omit<UIElementBaseCreateParams, "id"> {
|
|
10829
10815
|
type?: "Panel";
|
|
10830
10816
|
/**
|
|
10831
10817
|
* The elements to add to the panel body.
|
|
10832
10818
|
*/
|
|
10833
|
-
body
|
|
10819
|
+
body?: UIPanelElementCreate[];
|
|
10834
10820
|
/**
|
|
10835
10821
|
* The elements to add to the panel footer.
|
|
10836
10822
|
*/
|
|
@@ -11225,10 +11211,10 @@ declare const UpdateActionTriggerParamsSchema: ZodObject<{
|
|
|
11225
11211
|
interface UpdateActionTriggerParams extends Omit<Partial<UIActionTriggerCreate>, "id"> {
|
|
11226
11212
|
id: zInfer<typeof UpdateActionTriggerParamsSchema>["id"];
|
|
11227
11213
|
}
|
|
11228
|
-
declare const
|
|
11214
|
+
declare const CreateOrUpdatePanelParamsSchema: ZodObject<{
|
|
11229
11215
|
panel: ZodObject<objectUtil.extendShape<Omit<{
|
|
11230
11216
|
type: ZodOptional<ZodLiteral<"Panel">>;
|
|
11231
|
-
id:
|
|
11217
|
+
id: ZodString;
|
|
11232
11218
|
onCreate: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
|
|
11233
11219
|
id: ZodString;
|
|
11234
11220
|
}, "strip", ZodTypeAny, {
|
|
@@ -11244,7 +11230,7 @@ declare const CreatePanelParamsSchema: ZodObject<{
|
|
|
11244
11230
|
id: string;
|
|
11245
11231
|
}>], ZodUnknown>, ZodVoid>>;
|
|
11246
11232
|
title: ZodOptional<ZodString>;
|
|
11247
|
-
body: ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many"
|
|
11233
|
+
body: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
|
|
11248
11234
|
footer: ZodOptional<ZodArray<ZodType<UIPanelElement, ZodTypeDef, UIPanelElement>, "many">>;
|
|
11249
11235
|
onClickClose: ZodOptional<ZodFunction<ZodTuple<[ZodObject<{
|
|
11250
11236
|
id: ZodString;
|
|
@@ -11254,12 +11240,11 @@ declare const CreatePanelParamsSchema: ZodObject<{
|
|
|
11254
11240
|
id: string;
|
|
11255
11241
|
}>], ZodUnknown>, ZodVoid>>;
|
|
11256
11242
|
}, "body" | "footer">, {
|
|
11257
|
-
body: ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many"
|
|
11243
|
+
body: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
|
|
11258
11244
|
footer: ZodOptional<ZodArray<ZodType<UIPanelElementCreate, ZodTypeDef, UIPanelElementCreate>, "many">>;
|
|
11259
11245
|
}>, "strip", ZodTypeAny, {
|
|
11260
|
-
|
|
11246
|
+
id: string;
|
|
11261
11247
|
type?: "Panel" | undefined;
|
|
11262
|
-
id?: string | undefined;
|
|
11263
11248
|
onCreate?: ((args_0: {
|
|
11264
11249
|
id: string;
|
|
11265
11250
|
}, ...args: unknown[]) => void) | undefined;
|
|
@@ -11267,14 +11252,14 @@ declare const CreatePanelParamsSchema: ZodObject<{
|
|
|
11267
11252
|
id: string;
|
|
11268
11253
|
}, ...args: unknown[]) => void) | undefined;
|
|
11269
11254
|
title?: string | undefined;
|
|
11255
|
+
body?: UIPanelElementCreate[] | undefined;
|
|
11270
11256
|
footer?: UIPanelElementCreate[] | undefined;
|
|
11271
11257
|
onClickClose?: ((args_0: {
|
|
11272
11258
|
id: string;
|
|
11273
11259
|
}, ...args: unknown[]) => void) | undefined;
|
|
11274
11260
|
}, {
|
|
11275
|
-
|
|
11261
|
+
id: string;
|
|
11276
11262
|
type?: "Panel" | undefined;
|
|
11277
|
-
id?: string | undefined;
|
|
11278
11263
|
onCreate?: ((args_0: {
|
|
11279
11264
|
id: string;
|
|
11280
11265
|
}, ...args: unknown[]) => void) | undefined;
|
|
@@ -11282,6 +11267,7 @@ declare const CreatePanelParamsSchema: ZodObject<{
|
|
|
11282
11267
|
id: string;
|
|
11283
11268
|
}, ...args: unknown[]) => void) | undefined;
|
|
11284
11269
|
title?: string | undefined;
|
|
11270
|
+
body?: UIPanelElementCreate[] | undefined;
|
|
11285
11271
|
footer?: UIPanelElementCreate[] | undefined;
|
|
11286
11272
|
onClickClose?: ((args_0: {
|
|
11287
11273
|
id: string;
|
|
@@ -11308,9 +11294,8 @@ declare const CreatePanelParamsSchema: ZodObject<{
|
|
|
11308
11294
|
}>]>>;
|
|
11309
11295
|
}, "strip", ZodTypeAny, {
|
|
11310
11296
|
panel: {
|
|
11311
|
-
|
|
11297
|
+
id: string;
|
|
11312
11298
|
type?: "Panel" | undefined;
|
|
11313
|
-
id?: string | undefined;
|
|
11314
11299
|
onCreate?: ((args_0: {
|
|
11315
11300
|
id: string;
|
|
11316
11301
|
}, ...args: unknown[]) => void) | undefined;
|
|
@@ -11318,6 +11303,7 @@ declare const CreatePanelParamsSchema: ZodObject<{
|
|
|
11318
11303
|
id: string;
|
|
11319
11304
|
}, ...args: unknown[]) => void) | undefined;
|
|
11320
11305
|
title?: string | undefined;
|
|
11306
|
+
body?: UIPanelElementCreate[] | undefined;
|
|
11321
11307
|
footer?: UIPanelElementCreate[] | undefined;
|
|
11322
11308
|
onClickClose?: ((args_0: {
|
|
11323
11309
|
id: string;
|
|
@@ -11332,9 +11318,8 @@ declare const CreatePanelParamsSchema: ZodObject<{
|
|
|
11332
11318
|
} | undefined;
|
|
11333
11319
|
}, {
|
|
11334
11320
|
panel: {
|
|
11335
|
-
|
|
11321
|
+
id: string;
|
|
11336
11322
|
type?: "Panel" | undefined;
|
|
11337
|
-
id?: string | undefined;
|
|
11338
11323
|
onCreate?: ((args_0: {
|
|
11339
11324
|
id: string;
|
|
11340
11325
|
}, ...args: unknown[]) => void) | undefined;
|
|
@@ -11342,6 +11327,7 @@ declare const CreatePanelParamsSchema: ZodObject<{
|
|
|
11342
11327
|
id: string;
|
|
11343
11328
|
}, ...args: unknown[]) => void) | undefined;
|
|
11344
11329
|
title?: string | undefined;
|
|
11330
|
+
body?: UIPanelElementCreate[] | undefined;
|
|
11345
11331
|
footer?: UIPanelElementCreate[] | undefined;
|
|
11346
11332
|
onClickClose?: ((args_0: {
|
|
11347
11333
|
id: string;
|
|
@@ -11356,26 +11342,21 @@ declare const CreatePanelParamsSchema: ZodObject<{
|
|
|
11356
11342
|
} | undefined;
|
|
11357
11343
|
}>;
|
|
11358
11344
|
/**
|
|
11359
|
-
* The parameters for
|
|
11345
|
+
* The parameters for creating or updating a panel by using {@link UiController.createOrUpdatePanel}.
|
|
11360
11346
|
*
|
|
11361
11347
|
* @public
|
|
11362
11348
|
*/
|
|
11363
|
-
interface
|
|
11349
|
+
interface CreateOrUpdatePanelParams extends zInfer<typeof CreateOrUpdatePanelParamsSchema> {
|
|
11364
11350
|
/**
|
|
11365
11351
|
* The panel to add.
|
|
11366
11352
|
*/
|
|
11367
|
-
panel:
|
|
11353
|
+
panel: UIPanelCreateOrUpdate;
|
|
11368
11354
|
/**
|
|
11369
11355
|
* The placement of the panel on the right sidebar stack.
|
|
11370
11356
|
*
|
|
11371
11357
|
* @defaultValue `{ at: "end" }`
|
|
11372
11358
|
*/
|
|
11373
|
-
|
|
11374
|
-
}
|
|
11375
|
-
/**
|
|
11376
|
-
* @public
|
|
11377
|
-
*/
|
|
11378
|
-
interface UpdatePanelParams extends Omit<Partial<UIPanelCreate>, "id">, UIElementBase {
|
|
11359
|
+
initialPlacement?: PlacementForUIElement;
|
|
11379
11360
|
}
|
|
11380
11361
|
declare const CreatePanelElementsParamsSchema: ZodObject<{
|
|
11381
11362
|
panelId: ZodString;
|
|
@@ -12541,29 +12522,44 @@ interface UiController {
|
|
|
12541
12522
|
*/
|
|
12542
12523
|
deleteActionTrigger(id: string): void;
|
|
12543
12524
|
/**
|
|
12544
|
-
* Creates a panel
|
|
12525
|
+
* Creates a panel ID.
|
|
12545
12526
|
*
|
|
12546
|
-
*
|
|
12547
|
-
*
|
|
12548
|
-
*
|
|
12527
|
+
* In order to create a panel using {@link createOrUpdatePanel}, you need to create a panel ID first.
|
|
12528
|
+
*
|
|
12529
|
+
* @example
|
|
12530
|
+
* ```typescript
|
|
12531
|
+
* const panelId = await felt.createPanelId();
|
|
12532
|
+
* ```
|
|
12533
|
+
*/
|
|
12534
|
+
createPanelId(): Promise<string>;
|
|
12535
|
+
/**
|
|
12536
|
+
* Creates or updates a panel.
|
|
12537
|
+
*
|
|
12538
|
+
* Panels are rendered on map's right sidebar and are useful to extend Felt UI for your own use cases
|
|
12539
|
+
* (e.g. a form, a settings panel, etc.) using Felt UI elements (e.g. Text, Button, etc.).
|
|
12540
|
+
* This way it is possible to cover new use cases while keeping the user experience consistent with the rest of Felt.
|
|
12541
|
+
*
|
|
12542
|
+
* A panel is identified by its ID and must come from {@link createPanelId}.
|
|
12543
|
+
* Custom IDs are not supported in order to prevent conflicts with other panels.
|
|
12549
12544
|
*
|
|
12550
12545
|
* Panels have two sections:
|
|
12551
12546
|
* - `body` - Body of the panel, scrollable.
|
|
12552
12547
|
* - `footer` - It sticks to the bottom of the panel, useful to add submit buttons.
|
|
12553
12548
|
*
|
|
12554
|
-
*
|
|
12555
|
-
* specify a placement
|
|
12556
|
-
*
|
|
12557
|
-
* Once created, you can add elements to the panel by using the {@link createPanelElements} method or
|
|
12558
|
-
* perform partial updates of elements by using the {@link updatePanelElements} method.
|
|
12549
|
+
* Regarding panel placement, by default it is added to the end of the panels stack but you can
|
|
12550
|
+
* specify a different placement by using the `initialPlacement` parameter.
|
|
12551
|
+
* This placement cannot be updated later.
|
|
12559
12552
|
*
|
|
12560
|
-
* When adding a panel, its
|
|
12561
|
-
* It is recommended to provide an id for the panel and its elements to make
|
|
12553
|
+
* When adding a panel, its elements' ids are optional though it is recommended to make
|
|
12562
12554
|
* it easier to update or delete them later.
|
|
12563
12555
|
*
|
|
12556
|
+
* Once created, you can add elements to the panel by using the {@link createPanelElements} method,
|
|
12557
|
+
* perform partial updates of elements by using the {@link updatePanelElements} method or
|
|
12558
|
+
* delete elements by using the {@link deletePanelElements} method.
|
|
12559
|
+
*
|
|
12564
12560
|
* @param args - The arguments for the method.
|
|
12565
12561
|
* @param args.panel - The panel to add.
|
|
12566
|
-
* @param args.
|
|
12562
|
+
* @param args.initialPlacement - The placement of the panel when added. Optional. Defaults to `{ at: "end" }`.
|
|
12567
12563
|
* - `{ at: "start" }` - Add the panel to the start of the stack.
|
|
12568
12564
|
* - `{ at: "end" }` - Add the panel to the end of the stack.
|
|
12569
12565
|
* - `{ after: "panel-1" }` - Add the panel after the panel with the id `panel-1`.
|
|
@@ -12571,9 +12567,11 @@ interface UiController {
|
|
|
12571
12567
|
*
|
|
12572
12568
|
* @example
|
|
12573
12569
|
* ```typescript
|
|
12574
|
-
* await felt.
|
|
12570
|
+
* const id = await felt.createPanelId();
|
|
12571
|
+
*
|
|
12572
|
+
* await felt.createOrUpdatePanel({
|
|
12575
12573
|
* panel: {
|
|
12576
|
-
* id
|
|
12574
|
+
* id,
|
|
12577
12575
|
* title: "My Panel",
|
|
12578
12576
|
* body: [
|
|
12579
12577
|
* {
|
|
@@ -12596,32 +12594,11 @@ interface UiController {
|
|
|
12596
12594
|
* },
|
|
12597
12595
|
* ],
|
|
12598
12596
|
* },
|
|
12599
|
-
*
|
|
12600
|
-
* });
|
|
12601
|
-
* ```
|
|
12602
|
-
*/
|
|
12603
|
-
createPanel(args: CreatePanelParams): Promise<UIPanel>;
|
|
12604
|
-
/**
|
|
12605
|
-
* Updates a panel.
|
|
12606
|
-
*
|
|
12607
|
-
* Panel to update is identified by the `id` property.
|
|
12608
|
-
*
|
|
12609
|
-
* @remarks
|
|
12610
|
-
* Properties provided will override the existing properties.
|
|
12611
|
-
* Override is done at Panel level, so if you want to update a specific element,
|
|
12612
|
-
* you need to provide the entire element. For partial updates of elements, use
|
|
12613
|
-
* {@link updatePanelElements} instead.
|
|
12614
|
-
*
|
|
12615
|
-
* @param panel - The panel to update.
|
|
12616
|
-
* @example
|
|
12617
|
-
* ```typescript
|
|
12618
|
-
* await felt.updatePanel({
|
|
12619
|
-
* id: "panel-1",
|
|
12620
|
-
* title: "A new title for my panel", // only title changes
|
|
12597
|
+
* initialPlacement: { at: "start" }, // when added, the panel will be added to the start of the stack
|
|
12621
12598
|
* });
|
|
12622
12599
|
* ```
|
|
12623
12600
|
*/
|
|
12624
|
-
|
|
12601
|
+
createOrUpdatePanel(args: CreateOrUpdatePanelParams): Promise<UIPanel>;
|
|
12625
12602
|
/**
|
|
12626
12603
|
* Deletes a panel.
|
|
12627
12604
|
*
|
|
@@ -12657,7 +12634,7 @@ interface UiController {
|
|
|
12657
12634
|
* @example
|
|
12658
12635
|
* ```typescript
|
|
12659
12636
|
* await felt.createPanelElements({
|
|
12660
|
-
* panelId
|
|
12637
|
+
* panelId,
|
|
12661
12638
|
* elements: [
|
|
12662
12639
|
* {
|
|
12663
12640
|
* element: { type: "Text", content: "Hello, world!" },
|
|
@@ -12679,7 +12656,7 @@ interface UiController {
|
|
|
12679
12656
|
* @example
|
|
12680
12657
|
* ```typescript
|
|
12681
12658
|
* await felt.updatePanelElements({
|
|
12682
|
-
* panelId
|
|
12659
|
+
* panelId,
|
|
12683
12660
|
* elements: [
|
|
12684
12661
|
* {
|
|
12685
12662
|
* element: {
|
|
@@ -12702,7 +12679,7 @@ interface UiController {
|
|
|
12702
12679
|
* @example
|
|
12703
12680
|
* ```typescript
|
|
12704
12681
|
* await felt.deletePanelElements({
|
|
12705
|
-
* panelId
|
|
12682
|
+
* panelId,
|
|
12706
12683
|
* elements: ["element-1", "element-2"],
|
|
12707
12684
|
* });
|
|
12708
12685
|
* ```
|
|
@@ -13126,4 +13103,4 @@ interface FeltController extends ViewportController, UiController, LayersControl
|
|
|
13126
13103
|
iframe: HTMLIFrameElement | null;
|
|
13127
13104
|
}
|
|
13128
13105
|
|
|
13129
|
-
export { type LayerChangeCallbackParams as $, type TextElementUpdate as A, type ElementsController as B, type CircleElementCreate as C, type MapInteractionEvent as D, type Element as E, type FeltController as F, type GetElementGroupsConstraint as G, type HighlighterElementCreate as H, type ImageElementCreate as I, type InteractionsController as J, type CreateLayersFromGeoJsonParams as K, type LinkElementRead as L, type MarkerElementCreate as M, type NoteElementCreate as N, type DataOnlyLayer as O, type PathElementCreate as P, type FeltTiledVectorSource as Q, type GeoJsonDataVectorSource as R, type GeoJsonFileVectorSource as S, type TextElementCreate as T, type UiControlsOptions as U, type ViewportCenterZoom as V, type GeoJsonUrlVectorSource as W, type GetLayerGroupsConstraint as X, type GetLayersConstraint as Y, type GetRenderedFeaturesConstraint as Z, type Layer as _, type CircleElementRead as a, type LngLatTuple as a$, type LayerCommon as a0, type LayerGroup as a1, type LayerGroupChangeCallbackParams as a2, type LayerProcessingStatus as a3, type LegendItem as a4, type LegendItemChangeCallbackParams as a5, type LegendItemIdentifier as a6, type LegendItemsConstraint as a7, type RasterBand as a8, type RasterLayer as a9, type GetLayerCategoriesParams as aA, type GetLayerHistogramBin as aB, type GetLayerHistogramParams as aC, type GetLayerPrecomputedCalculationParams as aD, type GridConfig as aE, type GridType as aF, type MultiAggregationConfig as aG, type PrecomputedAggregationMethod as aH, type ValueConfiguration as aI, type LayersController as aJ, type MapDetails as aK, type MiscController as aL, type ElementGroupNode as aM, type ElementNode as aN, type EntityNode as aO, type FeatureNode as aP, type FeatureSelection as aQ, type LayerGroupNode as aR, type LayerNode as aS, type SelectionController as aT, type FeltBoundary as aU, type FeltZoom as aV, type GeoJsonFeature as aW, type GeoJsonGeometry as aX, type GeoJsonProperties as aY, type LatLng as aZ, type LineStringGeometry as a_, type RasterLayerSource as aa, type UpdateLayerParams as ab, type VectorLayer as ac, type LayerFeature as ad, type RasterValue as ae, type LayerSchema as af, type LayerSchemaAttribute as ag, type LayerSchemaBooleanAttribute as ah, type LayerSchemaCommonAttribute as ai, type LayerSchemaDateAttribute as aj, type LayerSchemaDateTimeAttribute as ak, type LayerSchemaNumericAttribute as al, type LayerSchemaTextAttribute as am, type FilterExpression as an, type FilterLogicGate as ao, type FilterTernary as ap, type Filters as aq, type GeometryFilter as ar, type LayerBoundaries as as, type LayerFilters as at, type AggregatedGridConfig as au, type AggregationConfig as av, type AggregationMethod as aw, type CountGridConfig as ax, type GetLayerCalculationParams as ay, type GetLayerCategoriesGroup as az, type CircleElementUpdate as b, type
|
|
13106
|
+
export { type LayerChangeCallbackParams as $, type TextElementUpdate as A, type ElementsController as B, type CircleElementCreate as C, type MapInteractionEvent as D, type Element as E, type FeltController as F, type GetElementGroupsConstraint as G, type HighlighterElementCreate as H, type ImageElementCreate as I, type InteractionsController as J, type CreateLayersFromGeoJsonParams as K, type LinkElementRead as L, type MarkerElementCreate as M, type NoteElementCreate as N, type DataOnlyLayer as O, type PathElementCreate as P, type FeltTiledVectorSource as Q, type GeoJsonDataVectorSource as R, type GeoJsonFileVectorSource as S, type TextElementCreate as T, type UiControlsOptions as U, type ViewportCenterZoom as V, type GeoJsonUrlVectorSource as W, type GetLayerGroupsConstraint as X, type GetLayersConstraint as Y, type GetRenderedFeaturesConstraint as Z, type Layer as _, type CircleElementRead as a, type LngLatTuple as a$, type LayerCommon as a0, type LayerGroup as a1, type LayerGroupChangeCallbackParams as a2, type LayerProcessingStatus as a3, type LegendItem as a4, type LegendItemChangeCallbackParams as a5, type LegendItemIdentifier as a6, type LegendItemsConstraint as a7, type RasterBand as a8, type RasterLayer as a9, type GetLayerCategoriesParams as aA, type GetLayerHistogramBin as aB, type GetLayerHistogramParams as aC, type GetLayerPrecomputedCalculationParams as aD, type GridConfig as aE, type GridType as aF, type MultiAggregationConfig as aG, type PrecomputedAggregationMethod as aH, type ValueConfiguration as aI, type LayersController as aJ, type MapDetails as aK, type MiscController as aL, type ElementGroupNode as aM, type ElementNode as aN, type EntityNode as aO, type FeatureNode as aP, type FeatureSelection as aQ, type LayerGroupNode as aR, type LayerNode as aS, type SelectionController as aT, type FeltBoundary as aU, type FeltZoom as aV, type GeoJsonFeature as aW, type GeoJsonGeometry as aX, type GeoJsonProperties as aY, type LatLng as aZ, type LineStringGeometry as a_, type RasterLayerSource as aa, type UpdateLayerParams as ab, type VectorLayer as ac, type LayerFeature as ad, type RasterValue as ae, type LayerSchema as af, type LayerSchemaAttribute as ag, type LayerSchemaBooleanAttribute as ah, type LayerSchemaCommonAttribute as ai, type LayerSchemaDateAttribute as aj, type LayerSchemaDateTimeAttribute as ak, type LayerSchemaNumericAttribute as al, type LayerSchemaTextAttribute as am, type FilterExpression as an, type FilterLogicGate as ao, type FilterTernary as ap, type Filters as aq, type GeometryFilter as ar, type LayerBoundaries as as, type LayerFilters as at, type AggregatedGridConfig as au, type AggregationConfig as av, type AggregationMethod as aw, type CountGridConfig as ax, type GetLayerCalculationParams as ay, type GetLayerCategoriesGroup as az, type CircleElementUpdate as b, type ViewportFitBoundsParams as b$, type MultiLineStringGeometry as b0, type MultiPointGeometry as b1, type MultiPolygonGeometry as b2, type PointGeometry as b3, type PolygonGeometry as b4, type SetVisibilityRequest as b5, type SortConfig as b6, type SortDirection as b7, type CircleToolSettings as b8, type ConfigurableToolType as b9, type UIButtonElementCreate as bA, type UIButtonElementUpdate as bB, type UITextElement as bC, type UITextElementCreate as bD, type UITextElementUpdate as bE, type UIFlexibleSpaceElement as bF, type UIFlexibleSpaceElementCreate as bG, type UIFlexibleSpaceElementUpdate as bH, type UIDividerElement as bI, type UIDividerElementCreate as bJ, type UIDividerElementUpdate as bK, type UITextInputElement as bL, type UITextInputElementCreate as bM, type UITextInputElementUpdate as bN, type UISelectElement as bO, type UISelectElementCreate as bP, type UISelectElementUpdate as bQ, type UIPanelElement as bR, type UIPanelElementCreate as bS, type UIPanelElementUpdate as bT, type UIGridContainerElement as bU, type UIGridContainerElementCreate as bV, type UIGridContainerElementUpdate as bW, type UIActionTriggerCreate as bX, type UiController as bY, type SetViewportCenterZoomParams as bZ, type ViewportConstraints as b_, type HighlighterToolSettings as ba, type InputToolSettings as bb, type LineToolSettings as bc, type MarkerToolSettings as bd, type NoteToolSettings as be, type PinToolSettings as bf, type PlaceFrame as bg, type PlaceSymbol as bh, type PolygonToolSettings as bi, type RouteToolSettings as bj, type TextToolSettings as bk, type ToolSettingsChangeEvent as bl, type ToolSettingsMap as bm, type ToolType as bn, type ToolsController as bo, type CreateActionTriggerParams as bp, type CreateOrUpdatePanelParams as bq, type CreatePanelElementsParams as br, type DeletePanelElementsParams as bs, type UiOnMapInteractionsOptions as bt, type UpdateActionTriggerParams as bu, type UpdatePanelElementsParams as bv, type PlacementForUIElement as bw, type UIPanel as bx, type UIPanelCreateOrUpdate as by, type UIButtonElement as bz, type ElementChangeCallbackParams as c, type ViewportState as c0, type ViewportController as c1, type UnwrapPromise as c2, uiActionTriggerSchema as c3, type UIPanelElementCreateClonable as c4, uiPanelCreateSchema as c5, type UIButtonElementCreateClonable as c6, type MakeClonableSchema as c7, type PromiseOrNot as c8, type UnionToIntersection as c9, type ElementCreate as d, type ElementGroup as e, type ElementGroupChangeCallbackParams as f, type ElementUpdate as g, type GetElementsConstraint as h, type HighlighterElementRead as i, type HighlighterElementUpdate as j, type ImageElementRead as k, type ImageElementUpdate as l, type MarkerElementRead as m, type MarkerElementUpdate as n, type NoteElementRead as o, type NoteElementUpdate as p, type PathElementRead as q, type PathElementUpdate as r, type PlaceElementCreate as s, type PlaceElementRead as t, type PlaceElementUpdate as u, type PolygonElementCreate as v, type PolygonElementRead as w, type PolygonElementUpdate as x, type TextElementRead as y, type zInfer as z };
|