@verdocs/web-sdk 4.0.7 → 4.0.8
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/cjs/verdocs-button_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-floating-menu.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-loader.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
- package/dist/collection/components/controls/verdocs-floating-menu/verdocs-floating-menu.js +1 -6
- package/dist/collection/components/controls/verdocs-help-icon/verdocs-help-icon.js +1 -4
- package/dist/collection/components/controls/verdocs-loader/verdocs-loader.js +1 -4
- package/dist/collection/components/controls/verdocs-organization-card/verdocs-organization-card.js +1 -4
- package/dist/collection/components/controls/verdocs-pagination/verdocs-pagination.js +1 -4
- package/dist/collection/components/controls/verdocs-portal/verdocs-portal.js +1 -9
- package/dist/collection/components/controls/verdocs-progress-bar/verdocs-progress-bar.js +1 -4
- package/dist/components/verdocs-floating-menu.js +1 -1
- package/dist/components/verdocs-help-icon2.js +1 -1
- package/dist/components/verdocs-loader2.js +1 -1
- package/dist/components/verdocs-organization-card.js +1 -1
- package/dist/components/verdocs-pagination2.js +1 -1
- package/dist/components/verdocs-portal2.js +1 -1
- package/dist/components/verdocs-progress-bar2.js +1 -1
- package/dist/custom-elements.json +2134 -0
- package/dist/docs.json +9 -14
- package/dist/esm/verdocs-button_3.entry.js +1 -1
- package/dist/esm/verdocs-checkbox_5.entry.js +1 -1
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/verdocs-floating-menu.entry.js +1 -1
- package/dist/esm/verdocs-loader.entry.js +1 -1
- package/dist/esm/verdocs-organization-card.entry.js +1 -1
- package/dist/esm/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-button_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -1
- package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-floating-menu.entry.js +1 -1
- package/dist/esm-es5/verdocs-loader.entry.js +1 -1
- package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/types/components/controls/verdocs-floating-menu/verdocs-floating-menu.d.ts +0 -5
- package/dist/types/components/controls/verdocs-help-icon/verdocs-help-icon.d.ts +0 -3
- package/dist/types/components/controls/verdocs-loader/verdocs-loader.d.ts +0 -3
- package/dist/types/components/controls/verdocs-organization-card/verdocs-organization-card.d.ts +0 -3
- package/dist/types/components/controls/verdocs-pagination/verdocs-pagination.d.ts +0 -3
- package/dist/types/components/controls/verdocs-portal/verdocs-portal.d.ts +0 -8
- package/dist/types/components/controls/verdocs-progress-bar/verdocs-progress-bar.d.ts +0 -3
- package/dist/types/components.d.ts +0 -112
- package/dist/verdocs-web-sdk/{p-5b9c0b5d.system.entry.js → p-0e44d592.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5bc622c5.entry.js → p-14fe476a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b952113a.entry.js → p-3102c8fb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-322fa613.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-7d035035.system.entry.js → p-3999bace.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8a0fd8b4.system.entry.js → p-44acae9e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fd064f80.entry.js → p-4ae82766.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6fe0d270.entry.js → p-6d52b500.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c22eccdd.entry.js → p-7aacdd81.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9746816b.system.entry.js → p-8164d8bf.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-69ea5cb9.system.entry.js → p-8bb229dd.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9a780e51.system.entry.js → p-91483dea.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9f7a6ff6.entry.js → p-9e86a14a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c3abfbb5.system.entry.js → p-ac9b5e3f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5cc3dcb2.entry.js → p-c81bc939.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
@@ -4,11 +4,6 @@ export interface IOption {
|
|
4
4
|
icon: string;
|
5
5
|
tooltip: string;
|
6
6
|
}
|
7
|
-
/**
|
8
|
-
* Floating Action Button style menu. For proper placement, this should be added to the DOM inside a container that is set to
|
9
|
-
* `overflow-y: scroll;`. The component will detect that placement and position itself in the bottom-right corner on top of the
|
10
|
-
* container. It will be absolutely positioned so it will be unaffected by scrolling the container.
|
11
|
-
*/
|
12
7
|
export declare class VerdocsFloatingMenu {
|
13
8
|
el: HTMLElement;
|
14
9
|
/**
|
@@ -1,12 +1,4 @@
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
2
|
-
/**
|
3
|
-
* Display a child component in a "portal", popping it out of the main DOM tree
|
4
|
-
* to allow it to escape the bounds set by its parent.
|
5
|
-
* @credit https://github.com/tomas-teston/stencil-portal for the basic
|
6
|
-
* technique. This has been altered in a few ways to make it more friendly
|
7
|
-
* to cases where there may be multiple portals on the page and provide more
|
8
|
-
* alignment options for the child to be displayed.
|
9
|
-
*/
|
10
2
|
export declare class VerdocsPortal {
|
11
3
|
private portal;
|
12
4
|
private element;
|
@@ -893,20 +893,12 @@ export namespace Components {
|
|
893
893
|
*/
|
894
894
|
"endpoint": VerdocsEndpoint;
|
895
895
|
}
|
896
|
-
/**
|
897
|
-
* Floating Action Button style menu. For proper placement, this should be added to the DOM inside a container that is set to
|
898
|
-
* `overflow-y: scroll;`. The component will detect that placement and position itself in the bottom-right corner on top of the
|
899
|
-
* container. It will be absolutely positioned so it will be unaffected by scrolling the container.
|
900
|
-
*/
|
901
896
|
interface VerdocsFloatingMenu {
|
902
897
|
/**
|
903
898
|
* The role that this contact will be assigned to.
|
904
899
|
*/
|
905
900
|
"options": IOption[];
|
906
901
|
}
|
907
|
-
/**
|
908
|
-
* Displays a simple help icon. Upon hover or focus, a tooltip will be displayed with help text.
|
909
|
-
*/
|
910
902
|
interface VerdocsHelpIcon {
|
911
903
|
/**
|
912
904
|
* Optional icon to display. If not supplied, a standard help icon will be shown.
|
@@ -966,9 +958,6 @@ export namespace Components {
|
|
966
958
|
*/
|
967
959
|
"steps": number;
|
968
960
|
}
|
969
|
-
/**
|
970
|
-
* Animated loader placeholder. There are currently no configuration options for this control.
|
971
|
-
*/
|
972
961
|
interface VerdocsLoader {
|
973
962
|
}
|
974
963
|
/**
|
@@ -994,18 +983,12 @@ export namespace Components {
|
|
994
983
|
*/
|
995
984
|
"showCancel": boolean;
|
996
985
|
}
|
997
|
-
/**
|
998
|
-
* Display a small summary card describing an organization
|
999
|
-
*/
|
1000
986
|
interface VerdocsOrganizationCard {
|
1001
987
|
/**
|
1002
988
|
* The organization to display
|
1003
989
|
*/
|
1004
990
|
"organization": IOrganization;
|
1005
991
|
}
|
1006
|
-
/**
|
1007
|
-
* Display a drop-down menu of quick filter options.
|
1008
|
-
*/
|
1009
992
|
interface VerdocsPagination {
|
1010
993
|
/**
|
1011
994
|
* The total number of items.
|
@@ -1020,14 +1003,6 @@ export namespace Components {
|
|
1020
1003
|
*/
|
1021
1004
|
"selectedPage": number;
|
1022
1005
|
}
|
1023
|
-
/**
|
1024
|
-
* Display a child component in a "portal", popping it out of the main DOM tree
|
1025
|
-
* to allow it to escape the bounds set by its parent.
|
1026
|
-
* @credit https://github.com/tomas-teston/stencil-portal for the basic
|
1027
|
-
* technique. This has been altered in a few ways to make it more friendly
|
1028
|
-
* to cases where there may be multiple portals on the page and provide more
|
1029
|
-
* alignment options for the child to be displayed.
|
1030
|
-
*/
|
1031
1006
|
interface VerdocsPortal {
|
1032
1007
|
/**
|
1033
1008
|
* Horizontal alignment.
|
@@ -1057,9 +1032,6 @@ export namespace Components {
|
|
1057
1032
|
*/
|
1058
1033
|
"templateId": string | null;
|
1059
1034
|
}
|
1060
|
-
/**
|
1061
|
-
* Displays a summary of a template
|
1062
|
-
*/
|
1063
1035
|
interface VerdocsProgressBar {
|
1064
1036
|
/**
|
1065
1037
|
* Optional label to display above the bar
|
@@ -2592,11 +2564,6 @@ declare global {
|
|
2592
2564
|
interface HTMLVerdocsFloatingMenuElementEventMap {
|
2593
2565
|
"optionSelected": IOption;
|
2594
2566
|
}
|
2595
|
-
/**
|
2596
|
-
* Floating Action Button style menu. For proper placement, this should be added to the DOM inside a container that is set to
|
2597
|
-
* `overflow-y: scroll;`. The component will detect that placement and position itself in the bottom-right corner on top of the
|
2598
|
-
* container. It will be absolutely positioned so it will be unaffected by scrolling the container.
|
2599
|
-
*/
|
2600
2567
|
interface HTMLVerdocsFloatingMenuElement extends Components.VerdocsFloatingMenu, HTMLStencilElement {
|
2601
2568
|
addEventListener<K extends keyof HTMLVerdocsFloatingMenuElementEventMap>(type: K, listener: (this: HTMLVerdocsFloatingMenuElement, ev: VerdocsFloatingMenuCustomEvent<HTMLVerdocsFloatingMenuElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
2602
2569
|
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
@@ -2611,9 +2578,6 @@ declare global {
|
|
2611
2578
|
prototype: HTMLVerdocsFloatingMenuElement;
|
2612
2579
|
new (): HTMLVerdocsFloatingMenuElement;
|
2613
2580
|
};
|
2614
|
-
/**
|
2615
|
-
* Displays a simple help icon. Upon hover or focus, a tooltip will be displayed with help text.
|
2616
|
-
*/
|
2617
2581
|
interface HTMLVerdocsHelpIconElement extends Components.VerdocsHelpIcon, HTMLStencilElement {
|
2618
2582
|
}
|
2619
2583
|
var HTMLVerdocsHelpIconElement: {
|
@@ -2665,9 +2629,6 @@ declare global {
|
|
2665
2629
|
prototype: HTMLVerdocsKbaDialogElement;
|
2666
2630
|
new (): HTMLVerdocsKbaDialogElement;
|
2667
2631
|
};
|
2668
|
-
/**
|
2669
|
-
* Animated loader placeholder. There are currently no configuration options for this control.
|
2670
|
-
*/
|
2671
2632
|
interface HTMLVerdocsLoaderElement extends Components.VerdocsLoader, HTMLStencilElement {
|
2672
2633
|
}
|
2673
2634
|
var HTMLVerdocsLoaderElement: {
|
@@ -2697,9 +2658,6 @@ declare global {
|
|
2697
2658
|
prototype: HTMLVerdocsOkDialogElement;
|
2698
2659
|
new (): HTMLVerdocsOkDialogElement;
|
2699
2660
|
};
|
2700
|
-
/**
|
2701
|
-
* Display a small summary card describing an organization
|
2702
|
-
*/
|
2703
2661
|
interface HTMLVerdocsOrganizationCardElement extends Components.VerdocsOrganizationCard, HTMLStencilElement {
|
2704
2662
|
}
|
2705
2663
|
var HTMLVerdocsOrganizationCardElement: {
|
@@ -2709,9 +2667,6 @@ declare global {
|
|
2709
2667
|
interface HTMLVerdocsPaginationElementEventMap {
|
2710
2668
|
"selectPage": {selectedPage: number};
|
2711
2669
|
}
|
2712
|
-
/**
|
2713
|
-
* Display a drop-down menu of quick filter options.
|
2714
|
-
*/
|
2715
2670
|
interface HTMLVerdocsPaginationElement extends Components.VerdocsPagination, HTMLStencilElement {
|
2716
2671
|
addEventListener<K extends keyof HTMLVerdocsPaginationElementEventMap>(type: K, listener: (this: HTMLVerdocsPaginationElement, ev: VerdocsPaginationCustomEvent<HTMLVerdocsPaginationElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
2717
2672
|
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
@@ -2729,14 +2684,6 @@ declare global {
|
|
2729
2684
|
interface HTMLVerdocsPortalElementEventMap {
|
2730
2685
|
"clickAway": void;
|
2731
2686
|
}
|
2732
|
-
/**
|
2733
|
-
* Display a child component in a "portal", popping it out of the main DOM tree
|
2734
|
-
* to allow it to escape the bounds set by its parent.
|
2735
|
-
* @credit https://github.com/tomas-teston/stencil-portal for the basic
|
2736
|
-
* technique. This has been altered in a few ways to make it more friendly
|
2737
|
-
* to cases where there may be multiple portals on the page and provide more
|
2738
|
-
* alignment options for the child to be displayed.
|
2739
|
-
*/
|
2740
2687
|
interface HTMLVerdocsPortalElement extends Components.VerdocsPortal, HTMLStencilElement {
|
2741
2688
|
addEventListener<K extends keyof HTMLVerdocsPortalElementEventMap>(type: K, listener: (this: HTMLVerdocsPortalElement, ev: VerdocsPortalCustomEvent<HTMLVerdocsPortalElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
2742
2689
|
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
@@ -2773,9 +2720,6 @@ declare global {
|
|
2773
2720
|
prototype: HTMLVerdocsPreviewElement;
|
2774
2721
|
new (): HTMLVerdocsPreviewElement;
|
2775
2722
|
};
|
2776
|
-
/**
|
2777
|
-
* Displays a summary of a template
|
2778
|
-
*/
|
2779
2723
|
interface HTMLVerdocsProgressBarElement extends Components.VerdocsProgressBar, HTMLStencilElement {
|
2780
2724
|
}
|
2781
2725
|
var HTMLVerdocsProgressBarElement: {
|
@@ -4753,11 +4697,6 @@ declare namespace LocalJSX {
|
|
4753
4697
|
*/
|
4754
4698
|
"onFileSelected"?: (event: VerdocsFileChooserCustomEvent<{file: File | null}>) => void;
|
4755
4699
|
}
|
4756
|
-
/**
|
4757
|
-
* Floating Action Button style menu. For proper placement, this should be added to the DOM inside a container that is set to
|
4758
|
-
* `overflow-y: scroll;`. The component will detect that placement and position itself in the bottom-right corner on top of the
|
4759
|
-
* container. It will be absolutely positioned so it will be unaffected by scrolling the container.
|
4760
|
-
*/
|
4761
4700
|
interface VerdocsFloatingMenu {
|
4762
4701
|
/**
|
4763
4702
|
* Event fired when a menu option is clicked. Web Component events need to be "composed" to cross the Shadow DOM and be received by parent frameworks.
|
@@ -4768,9 +4707,6 @@ declare namespace LocalJSX {
|
|
4768
4707
|
*/
|
4769
4708
|
"options"?: IOption[];
|
4770
4709
|
}
|
4771
|
-
/**
|
4772
|
-
* Displays a simple help icon. Upon hover or focus, a tooltip will be displayed with help text.
|
4773
|
-
*/
|
4774
4710
|
interface VerdocsHelpIcon {
|
4775
4711
|
/**
|
4776
4712
|
* Optional icon to display. If not supplied, a standard help icon will be shown.
|
@@ -4846,9 +4782,6 @@ declare namespace LocalJSX {
|
|
4846
4782
|
*/
|
4847
4783
|
"steps"?: number;
|
4848
4784
|
}
|
4849
|
-
/**
|
4850
|
-
* Animated loader placeholder. There are currently no configuration options for this control.
|
4851
|
-
*/
|
4852
4785
|
interface VerdocsLoader {
|
4853
4786
|
}
|
4854
4787
|
/**
|
@@ -4882,18 +4815,12 @@ declare namespace LocalJSX {
|
|
4882
4815
|
*/
|
4883
4816
|
"showCancel"?: boolean;
|
4884
4817
|
}
|
4885
|
-
/**
|
4886
|
-
* Display a small summary card describing an organization
|
4887
|
-
*/
|
4888
4818
|
interface VerdocsOrganizationCard {
|
4889
4819
|
/**
|
4890
4820
|
* The organization to display
|
4891
4821
|
*/
|
4892
4822
|
"organization"?: IOrganization;
|
4893
4823
|
}
|
4894
|
-
/**
|
4895
|
-
* Display a drop-down menu of quick filter options.
|
4896
|
-
*/
|
4897
4824
|
interface VerdocsPagination {
|
4898
4825
|
/**
|
4899
4826
|
* The total number of items.
|
@@ -4912,14 +4839,6 @@ declare namespace LocalJSX {
|
|
4912
4839
|
*/
|
4913
4840
|
"selectedPage"?: number;
|
4914
4841
|
}
|
4915
|
-
/**
|
4916
|
-
* Display a child component in a "portal", popping it out of the main DOM tree
|
4917
|
-
* to allow it to escape the bounds set by its parent.
|
4918
|
-
* @credit https://github.com/tomas-teston/stencil-portal for the basic
|
4919
|
-
* technique. This has been altered in a few ways to make it more friendly
|
4920
|
-
* to cases where there may be multiple portals on the page and provide more
|
4921
|
-
* alignment options for the child to be displayed.
|
4922
|
-
*/
|
4923
4842
|
interface VerdocsPortal {
|
4924
4843
|
/**
|
4925
4844
|
* Horizontal alignment.
|
@@ -4954,9 +4873,6 @@ declare namespace LocalJSX {
|
|
4954
4873
|
*/
|
4955
4874
|
"templateId"?: string | null;
|
4956
4875
|
}
|
4957
|
-
/**
|
4958
|
-
* Displays a summary of a template
|
4959
|
-
*/
|
4960
4876
|
interface VerdocsProgressBar {
|
4961
4877
|
/**
|
4962
4878
|
* Optional label to display above the bar
|
@@ -6244,15 +6160,7 @@ declare module "@stencil/core" {
|
|
6244
6160
|
*/
|
6245
6161
|
"verdocs-field-timestamp": LocalJSX.VerdocsFieldTimestamp & JSXBase.HTMLAttributes<HTMLVerdocsFieldTimestampElement>;
|
6246
6162
|
"verdocs-file-chooser": LocalJSX.VerdocsFileChooser & JSXBase.HTMLAttributes<HTMLVerdocsFileChooserElement>;
|
6247
|
-
/**
|
6248
|
-
* Floating Action Button style menu. For proper placement, this should be added to the DOM inside a container that is set to
|
6249
|
-
* `overflow-y: scroll;`. The component will detect that placement and position itself in the bottom-right corner on top of the
|
6250
|
-
* container. It will be absolutely positioned so it will be unaffected by scrolling the container.
|
6251
|
-
*/
|
6252
6163
|
"verdocs-floating-menu": LocalJSX.VerdocsFloatingMenu & JSXBase.HTMLAttributes<HTMLVerdocsFloatingMenuElement>;
|
6253
|
-
/**
|
6254
|
-
* Displays a simple help icon. Upon hover or focus, a tooltip will be displayed with help text.
|
6255
|
-
*/
|
6256
6164
|
"verdocs-help-icon": LocalJSX.VerdocsHelpIcon & JSXBase.HTMLAttributes<HTMLVerdocsHelpIconElement>;
|
6257
6165
|
/**
|
6258
6166
|
* Display a dialog that allows the user to specify an initials image, either by using a signature-font-generated image
|
@@ -6265,9 +6173,6 @@ declare module "@stencil/core" {
|
|
6265
6173
|
* It can also be dismissed by clicking the background overlay.
|
6266
6174
|
*/
|
6267
6175
|
"verdocs-kba-dialog": LocalJSX.VerdocsKbaDialog & JSXBase.HTMLAttributes<HTMLVerdocsKbaDialogElement>;
|
6268
|
-
/**
|
6269
|
-
* Animated loader placeholder. There are currently no configuration options for this control.
|
6270
|
-
*/
|
6271
6176
|
"verdocs-loader": LocalJSX.VerdocsLoader & JSXBase.HTMLAttributes<HTMLVerdocsLoaderElement>;
|
6272
6177
|
/**
|
6273
6178
|
* Display a simple text dialog box with an Ok button. This adds a partially-transparent overlay and screen-centered dialog
|
@@ -6275,22 +6180,8 @@ declare module "@stencil/core" {
|
|
6275
6180
|
* It can also be dismissed by clicking the background overlay.
|
6276
6181
|
*/
|
6277
6182
|
"verdocs-ok-dialog": LocalJSX.VerdocsOkDialog & JSXBase.HTMLAttributes<HTMLVerdocsOkDialogElement>;
|
6278
|
-
/**
|
6279
|
-
* Display a small summary card describing an organization
|
6280
|
-
*/
|
6281
6183
|
"verdocs-organization-card": LocalJSX.VerdocsOrganizationCard & JSXBase.HTMLAttributes<HTMLVerdocsOrganizationCardElement>;
|
6282
|
-
/**
|
6283
|
-
* Display a drop-down menu of quick filter options.
|
6284
|
-
*/
|
6285
6184
|
"verdocs-pagination": LocalJSX.VerdocsPagination & JSXBase.HTMLAttributes<HTMLVerdocsPaginationElement>;
|
6286
|
-
/**
|
6287
|
-
* Display a child component in a "portal", popping it out of the main DOM tree
|
6288
|
-
* to allow it to escape the bounds set by its parent.
|
6289
|
-
* @credit https://github.com/tomas-teston/stencil-portal for the basic
|
6290
|
-
* technique. This has been altered in a few ways to make it more friendly
|
6291
|
-
* to cases where there may be multiple portals on the page and provide more
|
6292
|
-
* alignment options for the child to be displayed.
|
6293
|
-
*/
|
6294
6185
|
"verdocs-portal": LocalJSX.VerdocsPortal & JSXBase.HTMLAttributes<HTMLVerdocsPortalElement>;
|
6295
6186
|
/**
|
6296
6187
|
* Display a template preview experience. This will display the template's attached
|
@@ -6298,9 +6189,6 @@ declare module "@stencil/core" {
|
|
6298
6189
|
* by recipient, and will be read-only (cannot be filled, moved, or altered).
|
6299
6190
|
*/
|
6300
6191
|
"verdocs-preview": LocalJSX.VerdocsPreview & JSXBase.HTMLAttributes<HTMLVerdocsPreviewElement>;
|
6301
|
-
/**
|
6302
|
-
* Displays a summary of a template
|
6303
|
-
*/
|
6304
6192
|
"verdocs-progress-bar": LocalJSX.VerdocsProgressBar & JSXBase.HTMLAttributes<HTMLVerdocsProgressBarElement>;
|
6305
6193
|
/**
|
6306
6194
|
* Display a drop-down menu of quick filter options.
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./p-e748b2d2.system.js"],(function(t){"use strict";var o,e,n,i,r;return{setters:[function(t){o=t.r;e=t.c;n=t.h;i=t.g;r=t.H}],execute:function(){var a="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-floating-menu{display:none}#verdocs-floating-menu{position:absolute;width:56px;height:56px;display:-ms-flexbox;display:flex;-ms-flex:0 0 fit-content;flex:0 0 fit-content}#verdocs-floating-menu:not(.force-closed):hover{height:500px}#verdocs-floating-menu:not(.force-closed):hover .trigger{-webkit-box-shadow:0 10px 25px #4c56cb;box-shadow:0 10px 25px #4c56cb;-webkit-transform:translatey(2px);transform:translatey(2px);-webkit-transition:all 0.3s;transition:all 0.3s}#verdocs-floating-menu:not(.force-closed):hover .options{display:-ms-flexbox;display:flex}#verdocs-floating-menu:not(.force-closed):hover .options .option{-webkit-animation:vfm-appear 0.1s forwards 0.2s;animation:vfm-appear 0.1s forwards 0.2s}#verdocs-floating-menu .trigger{position:absolute;width:56px;height:56px;background:#654dcb;bottom:0;border-radius:50%;left:0;right:0;margin:auto;color:white;line-height:52px;text-align:center;font-size:44px;z-index:100;-webkit-box-shadow:0 10px 25px -5px #4c56cb;box-shadow:0 10px 25px -5px #4c56cb;cursor:pointer;-webkit-transition:all 0.3s;transition:all 0.3s}#verdocs-floating-menu .options{width:56px;-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 fit-content;flex:0 0 fit-content;position:absolute;bottom:70px;display:none}#verdocs-floating-menu .option{background:#654dcb;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:50%;width:36px;height:36px;margin:5px auto;color:white;font-weight:500;text-align:center;line-height:36px;opacity:0}#verdocs-floating-menu verdocs-toolbar-icon .icon{display:-ms-flexbox;display:flex}#verdocs-floating-menu verdocs-toolbar-icon .icon svg{fill:#ffffff}@-webkit-keyframes vfm-appear{0%{opacity:0}30%{-webkit-transform:scale(0.4);transform:scale(0.4);opacity:0.3}70%{-webkit-transform:scale(1.2);transform:scale(1.2);opacity:0.6}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes vfm-appear{0%{opacity:0}30%{-webkit-transform:scale(0.4);transform:scale(0.4);opacity:0.3}70%{-webkit-transform:scale(1.2);transform:scale(1.2);opacity:0.6}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}";var s=a;var c=function(t){var o=/(auto|scroll)/;var e=function(t,o){if(t.parentNode===null){return o}return e(t.parentNode,o.concat([t]))};var n=function(t,o){return getComputedStyle(t,null).getPropertyValue(o)};var i=function(t){return n(t,"overflow")+n(t,"overflow-y")+n(t,"overflow-x")};var r=function(t){return o.test(i(t))};var a=function(t){if(!(t instanceof HTMLElement||t instanceof SVGElement)){return}var o=e(t.parentNode,[]);for(var n=0;n<o.length;n+=1){if(r(o[n])){return o[n]}}return document.scrollingElement||document.documentElement};return a(t)};var l=t("verdocs_floating_menu",function(){function t(t){o(this,t);this.optionSelected=e(this,"optionSelected",7);this.menuContainer=null;this.scrollParent=null;this.scrollParentParent=null;this.options=[]}t.prototype.componentDidLoad=function(){this.menuContainer=document.createElement("div");this.menuContainer.id="verdocs-floating-menu";var t=document.createElement("div");t.className="trigger";t.innerText="+";this.menuContainer.append(t);t=document.createElement("div");t.className="options";this.menuContainer.append(t);var o=this.handleSelect.bind(this);this.options.forEach((function(e){var n=document.createElement("div");n.className="option";n.addEventListener("click",(function(){return o(e)}));t.append(n);var i=document.createElement("verdocs-toolbar-icon");i.setAttribute("icon",e.icon);i.setAttribute("text",e.tooltip);i.setAttribute("placement","left");n.append(i)}));document.body.append(this.menuContainer);this.scrollParent=c(this.el);if(this.scrollParent){this.scrollParentParent=this.scrollParent.parentElement;this.repositionTrigger(this.scrollParent)}};t.prototype.disconnectedCallback=function(){var t;(t=this.menuContainer)===null||t===void 0?void 0:t.remove()};t.prototype.handleSelect=function(t){var o;(o=this.optionSelected)===null||o===void 0?void 0:o.emit(t);var e=document.getElementById("verdocs-floating-menu");if(e){e.className="force-closed";setTimeout((function(){e.className=""}),100)}};t.prototype.repositionTrigger=function(t){var o=t.parentElement;if(o){var e=o.getBoundingClientRect();var n=document.getElementById("verdocs-floating-menu");if(n){n.style.bottom="".concat(document.documentElement.clientHeight-(document.documentElement.scrollTop+e.bottom)+10,"px");n.style.left="".concat(e.right-80,"px")}}};t.prototype.render=function(){return n(r,{key:"
|
1
|
+
System.register(["./p-e748b2d2.system.js"],(function(t){"use strict";var o,e,n,i,r;return{setters:[function(t){o=t.r;e=t.c;n=t.h;i=t.g;r=t.H}],execute:function(){var a="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-floating-menu{display:none}#verdocs-floating-menu{position:absolute;width:56px;height:56px;display:-ms-flexbox;display:flex;-ms-flex:0 0 fit-content;flex:0 0 fit-content}#verdocs-floating-menu:not(.force-closed):hover{height:500px}#verdocs-floating-menu:not(.force-closed):hover .trigger{-webkit-box-shadow:0 10px 25px #4c56cb;box-shadow:0 10px 25px #4c56cb;-webkit-transform:translatey(2px);transform:translatey(2px);-webkit-transition:all 0.3s;transition:all 0.3s}#verdocs-floating-menu:not(.force-closed):hover .options{display:-ms-flexbox;display:flex}#verdocs-floating-menu:not(.force-closed):hover .options .option{-webkit-animation:vfm-appear 0.1s forwards 0.2s;animation:vfm-appear 0.1s forwards 0.2s}#verdocs-floating-menu .trigger{position:absolute;width:56px;height:56px;background:#654dcb;bottom:0;border-radius:50%;left:0;right:0;margin:auto;color:white;line-height:52px;text-align:center;font-size:44px;z-index:100;-webkit-box-shadow:0 10px 25px -5px #4c56cb;box-shadow:0 10px 25px -5px #4c56cb;cursor:pointer;-webkit-transition:all 0.3s;transition:all 0.3s}#verdocs-floating-menu .options{width:56px;-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 fit-content;flex:0 0 fit-content;position:absolute;bottom:70px;display:none}#verdocs-floating-menu .option{background:#654dcb;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:50%;width:36px;height:36px;margin:5px auto;color:white;font-weight:500;text-align:center;line-height:36px;opacity:0}#verdocs-floating-menu verdocs-toolbar-icon .icon{display:-ms-flexbox;display:flex}#verdocs-floating-menu verdocs-toolbar-icon .icon svg{fill:#ffffff}@-webkit-keyframes vfm-appear{0%{opacity:0}30%{-webkit-transform:scale(0.4);transform:scale(0.4);opacity:0.3}70%{-webkit-transform:scale(1.2);transform:scale(1.2);opacity:0.6}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes vfm-appear{0%{opacity:0}30%{-webkit-transform:scale(0.4);transform:scale(0.4);opacity:0.3}70%{-webkit-transform:scale(1.2);transform:scale(1.2);opacity:0.6}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}";var s=a;var c=function(t){var o=/(auto|scroll)/;var e=function(t,o){if(t.parentNode===null){return o}return e(t.parentNode,o.concat([t]))};var n=function(t,o){return getComputedStyle(t,null).getPropertyValue(o)};var i=function(t){return n(t,"overflow")+n(t,"overflow-y")+n(t,"overflow-x")};var r=function(t){return o.test(i(t))};var a=function(t){if(!(t instanceof HTMLElement||t instanceof SVGElement)){return}var o=e(t.parentNode,[]);for(var n=0;n<o.length;n+=1){if(r(o[n])){return o[n]}}return document.scrollingElement||document.documentElement};return a(t)};var l=t("verdocs_floating_menu",function(){function t(t){o(this,t);this.optionSelected=e(this,"optionSelected",7);this.menuContainer=null;this.scrollParent=null;this.scrollParentParent=null;this.options=[]}t.prototype.componentDidLoad=function(){this.menuContainer=document.createElement("div");this.menuContainer.id="verdocs-floating-menu";var t=document.createElement("div");t.className="trigger";t.innerText="+";this.menuContainer.append(t);t=document.createElement("div");t.className="options";this.menuContainer.append(t);var o=this.handleSelect.bind(this);this.options.forEach((function(e){var n=document.createElement("div");n.className="option";n.addEventListener("click",(function(){return o(e)}));t.append(n);var i=document.createElement("verdocs-toolbar-icon");i.setAttribute("icon",e.icon);i.setAttribute("text",e.tooltip);i.setAttribute("placement","left");n.append(i)}));document.body.append(this.menuContainer);this.scrollParent=c(this.el);if(this.scrollParent){this.scrollParentParent=this.scrollParent.parentElement;this.repositionTrigger(this.scrollParent)}};t.prototype.disconnectedCallback=function(){var t;(t=this.menuContainer)===null||t===void 0?void 0:t.remove()};t.prototype.handleSelect=function(t){var o;(o=this.optionSelected)===null||o===void 0?void 0:o.emit(t);var e=document.getElementById("verdocs-floating-menu");if(e){e.className="force-closed";setTimeout((function(){e.className=""}),100)}};t.prototype.repositionTrigger=function(t){var o=t.parentElement;if(o){var e=o.getBoundingClientRect();var n=document.getElementById("verdocs-floating-menu");if(n){n.style.bottom="".concat(document.documentElement.clientHeight-(document.documentElement.scrollTop+e.bottom)+10,"px");n.style.left="".concat(e.right-80,"px")}}};t.prototype.render=function(){return n(r,{key:"5a96af4115dc0383751e35ac6b889689fc5256d0"})};Object.defineProperty(t.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});return t}());l.style=s}}}));
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,h as t,H as i,c as o,g as s}from"./p-73a6f972.js";import{VerdocsEndpoint as r,updateField as l,deleteField as a}from"@verdocs/js-sdk";import{g as d,u as c}from"./p-05cfdd58.js";import{g as n}from"./p-17801797.js";import{g as p}from"./p-f070e923.js";import{S as h}from"./p-fd97809c.js";import"./p-00b37c9a.js";import"./p-f3b47dfc.js";const f=class{constructor(t){e(this,t),this.checked=!1,this.name="",this.label="",this.value="",this.theme="light",this.disabled=!1}render(){return t(i,{key:"419474760206bae27e0ad8f578a0fb0d97702791",class:{disabled:this.disabled,[this.theme]:!0}},t("label",{key:"4cb5190cdc28bec1528637bfeeb130d392ce4347"},t("input",{key:"f032febf516c10b0540094f058a59031ce2c706b",type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),t("span",{key:"c089f80a6a1060d775c1a13d8cbe8a577287f329"},this.label)))}};f.style='@charset "UTF-8";@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-checkbox{line-height:18px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:20px;height:20px;-ms-flex-negative:0;flex-shrink:0;margin-right:8px;line-height:20px;border-radius:2px;border-style:solid;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:"✓";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}';const u=class{constructor(t){e(this,t),this.message=""}render(){return t(i,{key:"af86792a4a2d09d2242645a1a8db657c5cd984bf"},t("div",{key:"52096cd84877537d50bea3e0e7a424e5d352c566",class:"inner"},this.message))}};u.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-component-error{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';const b=class{constructor(t){e(this,t),this.clickAway=o(this,"clickAway",7),this.moved=!1,this.anchor=void 0,this.voffset=0,this.align="left"}handleScroll(){this.calculatePosition()}handleResize(){this.calculatePosition()}handleClick(e){var t;this.element.contains(e.target)||null===(t=this.clickAway)||void 0===t||t.emit()}calculateLeft(){const e=document.getElementById(this.anchor);if(!e)return 0;const t=e.getBoundingClientRect();return"left"===this.align?Math.max(t.left,0):"right"===this.align?Math.max(t.left+t.width-this.portal.offsetWidth,0):Math.max(t.left-this.portal.offsetWidth/2+t.width/2,0)}calculateTop(){const e=document.getElementById(this.anchor);return e?e.getBoundingClientRect().bottom+this.voffset:0}calculatePosition(){this.portal.style.top=`${this.calculateTop()}px`,this.portal.style.left=`${this.calculateLeft()}px`}componentWillLoad(){var e;const t=`${this.anchor}-portal`;null===(e=document.getElementById(t))||void 0===e||e.remove(),this.portal=document.createElement("div"),this.portal.setAttribute("id",t),this.portal.style.zIndex="10001",this.portal.style.position="absolute",document.body.append(this.portal)}componentDidLoad(){this.portal.appendChild(this.element),this.calculatePosition()}disconnectedCallback(){this.moved?this.portal.remove():this.moved=!0}render(){return t(i,{key:"80b497808d7c72fdb5786712abdd50d98f0ab160",ref:e=>this.element=e},t("slot",{key:"d52fd1a7acd0d7f301ca2c9ba81b406a0107c3a0"}))}};b.style="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}";const m=class{constructor(t){e(this,t),this.value="",this.label="",this.options=void 0,this.disabled=!1}render(){return t(i,{key:"a353e008560aed3f922fc52d5c091d88cbe099a3",class:"input-field"},t("label",{key:"90a9b8244853fa2083f0d7fb1672ed204ed22a4c"},this.label?t("div",{class:"input-label"},this.label+":"):t("div",null),t("select",{key:"a68e1ea7b9f9b6f375b2d6c1df859708acc79bea",class:"input-element",disabled:this.disabled},this.options.map((e=>t("option",{value:e.value,selected:e.value===this.value},e.label))))))}};m.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-select-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-select-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;border:1px solid #cccccc;border-radius:4px;background:#ffffff;color:#092c4c;width:100%;font-size:16px;height:28px;padding:2px 8px}verdocs-select-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}';const v=e=>e.charAt(0).toUpperCase()+e.slice(1),x='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>',g='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>';function k(){const e=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1);return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}const y=class{constructor(t){e(this,t),this.close=o(this,"close",7),this.delete=o(this,"delete",7),this.settingsChanged=o(this,"settingsChanged",7),this.sdkError=o(this,"sdkError",7),this.templateStore=null,this.fieldStore=null,this.roleStore=null,this.endpoint=r.getDefault(),this.templateId="",this.fieldName="",this.helpText="",this.dirty=!1,this.loading=!0,this.setting=null,this.label="",this.type="textbox",this.name="",this.required=!1,this.roleName="",this.group="",this.fieldType="",this.options=[],this.placeholder="",this.value="",this.leading=0,this.showingHelp=!1}async componentWillLoad(){var e,t,i,o,s,r,l;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[FIELD PROPERTIES] Missing required template ID ${this.templateId}`);if(!this.fieldName)return void console.error("[FIELD PROPERTIES] Missing required field name");if(!this.endpoint.session)return void console.log("[FIELD PROPERTIES] Unable to start builder session, must be authenticated");this.templateStore=await p(this.endpoint,this.templateId),this.fieldStore=await d(this.templateId),this.roleStore=await n(this.templateId);const s=this.fieldStore.get("fields").find((e=>e.name===this.fieldName));s?console.log("props",s):console.log(`[FIELD PROPERTIES] Unable to find field "${this.fieldName}" in fields`),this.type=s.type,this.name=s.name,this.label=s.label,this.group=s.name,this.roleName=s.role_name,this.required=s.required,this.fieldType=s.type,this.placeholder=(null===(e=s.settings)||void 0===e?void 0:e.placeholder)||"",this.value=(null===(t=s.settings)||void 0===t?void 0:t.result)||"",this.leading=(null===(i=s.settings)||void 0===i?void 0:i.leading)||0,this.setting=s.settings||{},this.options=(null===(o=s.settings)||void 0===o?void 0:o.options)||[],this.dirty=!1,this.loading=!1,console.log("Displaying settings for",this.setting)}catch(e){console.log("[FIELD PROPERTIES] Error loading template",e),this.loading=!1,null===(s=this.sdkError)||void 0===s||s.emit(new h(e.message,null===(r=e.response)||void 0===r?void 0:r.status,null===(l=e.response)||void 0===l?void 0:l.data))}}handleCancel(e){var t,i,o,s,r;e.stopPropagation();const l=this.fieldStore.get("fields").find((e=>e.name===this.fieldName));l&&(this.name=l.name,this.label=l.label,this.roleName=l.role_name,this.required=l.required,this.placeholder=(null===(t=l.settings)||void 0===t?void 0:t.placeholder)||"",this.value=(null===(i=l.settings)||void 0===i?void 0:i.result)||"",this.leading=(null===(o=l.settings)||void 0===o?void 0:o.leading)||0),this.dirty=!1,null===(s=this.close)||void 0===s||s.emit(),null===(r=document.getElementById("verdocs-template-field-properties"))||void 0===r||r.remove()}handleSave(e){e.stopPropagation();const t={name:this.name,label:this.label||null,required:this.required,role_name:this.roleName};"checkbox_group"===this.type||"radio_button_group"===this.type?(t.settings=this.setting,t.settings.options=this.options):"textarea"===this.type||"textbox"===this.type?(t.settings={...this.setting},t.settings.result=(this.value||"").trim()):"dropdown"===this.type&&(t.settings={x:this.setting.x,y:this.setting.y,options:this.options}),console.log("FP: Will update",this.fieldName,t),l(this.endpoint,this.templateId,this.fieldName,t).then((e=>{var i,o,s;this.dirty=!1,c(this.fieldStore,this.fieldName,e),null===(i=this.settingsChanged)||void 0===i||i.emit({fieldName:this.fieldName,settings:t,field:e}),null===(o=this.close)||void 0===o||o.emit(),null===(s=document.getElementById("verdocs-template-field-properties"))||void 0===s||s.remove()})).catch((()=>{console.log("Field update failed",e)}))}handleAddOption(e){e.stopPropagation();const t={name:this.name,required:this.required,role_name:this.roleName};this.options.push("radio_button_group"===this.type?{id:k(),value:`Option ${this.options.length+1}`,selected:!1,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20}:{id:k(),value:`Option ${this.options.length+1}`,checked:!1,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20}),t.settings={...this.setting},delete t.settings.result,t.settings.options=[...this.options],l(this.endpoint,this.templateId,this.fieldName,t).then((e=>{var i,o,s;this.dirty=!1,c(this.fieldStore,this.fieldName,e),this.fieldName=e.name,null===(i=this.settingsChanged)||void 0===i||i.emit({fieldName:this.fieldName,settings:t,field:e}),null===(o=this.close)||void 0===o||o.emit(),null===(s=document.getElementById("verdocs-template-field-properties"))||void 0===s||s.remove()})).catch((()=>{console.log("Field update failed",e)}))}async handleDelete(e){e.stopPropagation(),window.confirm("Are you sure you wish to remove this field? This action cannot be undone.")&&a(this.endpoint,this.templateId,this.fieldName).then((()=>{var e,t;this.fieldStore.set("fields",this.fieldStore.get("fields").filter((e=>e.name!==this.fieldName))),null===(e=this.delete)||void 0===e||e.emit({templateId:this.templateId,roleName:this.roleName}),null===(t=document.getElementById("verdocs-template-field-properties"))||void 0===t||t.remove()})).catch((e=>{console.log("[FIELD PROPERTIES] Deletion error",e)}))}render(){var e;return this.endpoint.session?this.endpoint.session&&this.fieldStore.get("fields").some((e=>e.name===this.fieldName))?this.helpText&&this.showingHelp?t(i,null,t("h6",null,v(this.fieldType)," Settings ",t("div",{style:{flex:"1"}}),t("div",{class:"help-icon",innerHTML:g,onClick:()=>this.showingHelp=!1})),t("p",{class:"instructions",innerHTML:this.helpText})):t(i,{id:"verdocs-template-field-properties"},t("h6",null,v(this.fieldType.replace(/_/g," "))," Settings ",t("div",{style:{flex:"1"}}),this.helpText&&t("div",{class:"help-icon",innerHTML:g,onClick:()=>this.showingHelp=!0})),t("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},t("div",{class:"row"},t("verdocs-text-input",{id:"verdocs-field-name",label:"Field Name",value:this.name,autocomplete:"off",placeholder:"Field Name...",onInput:e=>{this.name=e.target.value,this.dirty=!0}})),t("div",{class:"row"},t("verdocs-text-input",{id:"verdocs-field-label",label:"Optional Label",value:this.label,autocomplete:"off",placeholder:"Optional Label...",onInput:e=>{this.label=e.target.value,this.dirty=!0}})),t("div",{class:"row"},t("div",{class:"input-label"},"Role:"),t("verdocs-select-input",{value:this.roleName,options:null===(e=this.roleStore.state)||void 0===e?void 0:e.roles.map((e=>({label:e.name,value:e.name}))),onInput:e=>{this.roleName=e.target.value,this.dirty=!0}})),["textbox","textarea"].includes(this.type)&&t("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},t("verdocs-text-input",{id:"verdocs-field-value",label:"Value",value:this.value,autocomplete:"off",placeholder:"Pre-defined value...",onInput:e=>{this.value=e.target.value,this.dirty=!0}})),["textbox","textarea"].includes(this.type)&&t("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},t("verdocs-text-input",{id:"verdocs-field-placeholder",label:"Placeholder",value:this.placeholder,autocomplete:"off",placeholder:"Placeholder...",onInput:e=>{this.placeholder=e.target.value,this.dirty=!0}})),t("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},t("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Required"),t("verdocs-checkbox",{id:"verdocs-is-required",name:"is-required",checked:this.required,value:"on",onInput:e=>{this.required=e.target.checked,this.dirty=!0}})),["checkbox_group","radio_button_group"].includes(this.type)&&t("verdocs-button",{size:"small",onClick:e=>this.handleAddOption(e),label:"Add Option"}),["dropdown"].includes(this.type)&&t("div",{class:"options"},t("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px",textAlign:"center",fontWeight:"700",fontSize:"14px",justifyContent:"center",backgroundColor:"#333333",padding:"5px 8px",color:"#ffffff"}},"Options"),t("div",{class:"row-header"},t("h6",null,"ID"),t("h6",null,"Label"),t("div",{style:{width:"34px"}})),this.options.map(((e,i)=>t("div",{class:"row option-row",key:i},t("verdocs-text-input",{id:`verdocs-option-id-${e.id}`,value:e.id,placeholder:"Unique ID",onInput:e=>{this.options[i].id=e.target.value,this.dirty=!0}}),t("verdocs-text-input",{id:`verdocs-option-value-${e.id}`,value:e.value,placeholder:"Display value",onInput:e=>{this.options[i].value=e.target.value,this.dirty=!0}}),t("button",{innerHTML:x,class:"remove-button",onClick:()=>{this.options=this.options.filter((t=>t.id!==e.id)),this.dirty=!0}})))),t("div",{class:"row-header"},t("button",{class:"add-option-button",onClick:()=>{this.options=[...this.options,{id:`option-${this.options.length+1}`,value:`Option ${this.options.length+1}`}],this.dirty=!0}},"Add Option"))),t("div",{class:"buttons"},t("button",{class:"delete-button",disabled:this.dirty,onClick:e=>this.handleDelete(e),innerHTML:x}),t("div",{style:{flex:"1"}}),t("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),t("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):t(i,{class:"empty"}):t(i,null,t("verdocs-component-error",{message:"You must be authenticated to use this module."}))}get el(){return s(this)}};y.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-field-properties{padding:20px;display:block;border-radius:4px;background:#ffffff;border:1px solid #ccc;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:2px 2px 10px 0px rgba(0, 0, 0, 0.1215686275);box-shadow:2px 2px 10px 0px rgba(0, 0, 0, 0.1215686275)}verdocs-template-field-properties .buttons{display:-ms-flexbox;display:flex;margin-top:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-field-properties .buttons verdocs-button{margin-left:16px}verdocs-template-field-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-field-properties verdocs-text-input{margin:0;-ms-flex:1;flex:1}verdocs-template-field-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .delete-button:active{background:#f3f3f3}verdocs-template-field-properties .delete-button svg{width:24px;height:24px}verdocs-template-field-properties h6{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:bold;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;color:#092c4c}verdocs-template-field-properties h6 .help-icon{opacity:0.5}verdocs-template-field-properties h6 .help-icon:hover{opacity:1;cursor:pointer}verdocs-template-field-properties .row-header{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties .row-header h6{margin-bottom:0}verdocs-template-field-properties .row-header verdocs-help-icon{-webkit-transform:scale(0.85);transform:scale(0.85)}verdocs-template-field-properties .row-header verdocs-help-icon svg{margin-bottom:-5px}verdocs-template-field-properties .row-header .add-button{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-field-properties .row-header .add-button:hover{opacity:1}verdocs-template-field-properties .row-header .add-button svg{width:32px;height:32px}verdocs-template-field-properties .option-row{margin:15px 0}verdocs-template-field-properties .option-row .remove-button{height:28px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .option-row .remove-button:active{background:#f3f3f3}verdocs-template-field-properties .option-row .remove-button:hover svg{stroke:rgb(165, 0, 33)}verdocs-template-field-properties .option-row .remove-button svg{width:20px;height:20px;stroke:#333333}verdocs-template-field-properties .options{background:#f3f3f3;padding:0 0 10px 0}verdocs-template-field-properties .options .row-header,verdocs-template-field-properties .options .option-row{padding:0 10px}verdocs-template-field-properties .options .add-option-button{border-radius:5px;border:1px solid #cccccc;background:#46497d;color:#ffffff;padding:3px 8px}verdocs-template-field-properties .options .option-row .input-element{font-size:14px}verdocs-template-field-properties .options verdocs-help-icon{opacity:1;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-field-properties .options verdocs-help-icon svg{fill:#ffffff}';export{f as verdocs_checkbox,u as verdocs_component_error,b as verdocs_portal,m as verdocs_select_input,y as verdocs_template_field_properties}
|
1
|
+
import{r as e,h as t,H as i,c as o,g as s}from"./p-73a6f972.js";import{VerdocsEndpoint as r,updateField as l,deleteField as a}from"@verdocs/js-sdk";import{g as d,u as c}from"./p-05cfdd58.js";import{g as n}from"./p-17801797.js";import{g as p}from"./p-f070e923.js";import{S as h}from"./p-fd97809c.js";import"./p-00b37c9a.js";import"./p-f3b47dfc.js";const f=class{constructor(t){e(this,t),this.checked=!1,this.name="",this.label="",this.value="",this.theme="light",this.disabled=!1}render(){return t(i,{key:"419474760206bae27e0ad8f578a0fb0d97702791",class:{disabled:this.disabled,[this.theme]:!0}},t("label",{key:"4cb5190cdc28bec1528637bfeeb130d392ce4347"},t("input",{key:"f032febf516c10b0540094f058a59031ce2c706b",type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),t("span",{key:"c089f80a6a1060d775c1a13d8cbe8a577287f329"},this.label)))}};f.style='@charset "UTF-8";@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-checkbox{line-height:18px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:20px;height:20px;-ms-flex-negative:0;flex-shrink:0;margin-right:8px;line-height:20px;border-radius:2px;border-style:solid;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:"✓";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}';const u=class{constructor(t){e(this,t),this.message=""}render(){return t(i,{key:"af86792a4a2d09d2242645a1a8db657c5cd984bf"},t("div",{key:"52096cd84877537d50bea3e0e7a424e5d352c566",class:"inner"},this.message))}};u.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-component-error{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';const b=class{constructor(t){e(this,t),this.clickAway=o(this,"clickAway",7),this.moved=!1,this.anchor=void 0,this.voffset=0,this.align="left"}handleScroll(){this.calculatePosition()}handleResize(){this.calculatePosition()}handleClick(e){var t;this.element.contains(e.target)||null===(t=this.clickAway)||void 0===t||t.emit()}calculateLeft(){const e=document.getElementById(this.anchor);if(!e)return 0;const t=e.getBoundingClientRect();return"left"===this.align?Math.max(t.left,0):"right"===this.align?Math.max(t.left+t.width-this.portal.offsetWidth,0):Math.max(t.left-this.portal.offsetWidth/2+t.width/2,0)}calculateTop(){const e=document.getElementById(this.anchor);return e?e.getBoundingClientRect().bottom+this.voffset:0}calculatePosition(){this.portal.style.top=`${this.calculateTop()}px`,this.portal.style.left=`${this.calculateLeft()}px`}componentWillLoad(){var e;const t=`${this.anchor}-portal`;null===(e=document.getElementById(t))||void 0===e||e.remove(),this.portal=document.createElement("div"),this.portal.setAttribute("id",t),this.portal.style.zIndex="10001",this.portal.style.position="absolute",document.body.append(this.portal)}componentDidLoad(){this.portal.appendChild(this.element),this.calculatePosition()}disconnectedCallback(){this.moved?this.portal.remove():this.moved=!0}render(){return t(i,{key:"fe50082da1b3228d1492330d3cea3536af919794",ref:e=>this.element=e},t("slot",{key:"6b5dcf7d19c5de30eed63bb6e568bf0054930a0f"}))}};b.style="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}";const m=class{constructor(t){e(this,t),this.value="",this.label="",this.options=void 0,this.disabled=!1}render(){return t(i,{key:"a353e008560aed3f922fc52d5c091d88cbe099a3",class:"input-field"},t("label",{key:"90a9b8244853fa2083f0d7fb1672ed204ed22a4c"},this.label?t("div",{class:"input-label"},this.label+":"):t("div",null),t("select",{key:"a68e1ea7b9f9b6f375b2d6c1df859708acc79bea",class:"input-element",disabled:this.disabled},this.options.map((e=>t("option",{value:e.value,selected:e.value===this.value},e.label))))))}};m.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-select-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-select-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;border:1px solid #cccccc;border-radius:4px;background:#ffffff;color:#092c4c;width:100%;font-size:16px;height:28px;padding:2px 8px}verdocs-select-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}';const v=e=>e.charAt(0).toUpperCase()+e.slice(1),x='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>',g='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>';function k(){const e=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1);return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}const y=class{constructor(t){e(this,t),this.close=o(this,"close",7),this.delete=o(this,"delete",7),this.settingsChanged=o(this,"settingsChanged",7),this.sdkError=o(this,"sdkError",7),this.templateStore=null,this.fieldStore=null,this.roleStore=null,this.endpoint=r.getDefault(),this.templateId="",this.fieldName="",this.helpText="",this.dirty=!1,this.loading=!0,this.setting=null,this.label="",this.type="textbox",this.name="",this.required=!1,this.roleName="",this.group="",this.fieldType="",this.options=[],this.placeholder="",this.value="",this.leading=0,this.showingHelp=!1}async componentWillLoad(){var e,t,i,o,s,r,l;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[FIELD PROPERTIES] Missing required template ID ${this.templateId}`);if(!this.fieldName)return void console.error("[FIELD PROPERTIES] Missing required field name");if(!this.endpoint.session)return void console.log("[FIELD PROPERTIES] Unable to start builder session, must be authenticated");this.templateStore=await p(this.endpoint,this.templateId),this.fieldStore=await d(this.templateId),this.roleStore=await n(this.templateId);const s=this.fieldStore.get("fields").find((e=>e.name===this.fieldName));s?console.log("props",s):console.log(`[FIELD PROPERTIES] Unable to find field "${this.fieldName}" in fields`),this.type=s.type,this.name=s.name,this.label=s.label,this.group=s.name,this.roleName=s.role_name,this.required=s.required,this.fieldType=s.type,this.placeholder=(null===(e=s.settings)||void 0===e?void 0:e.placeholder)||"",this.value=(null===(t=s.settings)||void 0===t?void 0:t.result)||"",this.leading=(null===(i=s.settings)||void 0===i?void 0:i.leading)||0,this.setting=s.settings||{},this.options=(null===(o=s.settings)||void 0===o?void 0:o.options)||[],this.dirty=!1,this.loading=!1,console.log("Displaying settings for",this.setting)}catch(e){console.log("[FIELD PROPERTIES] Error loading template",e),this.loading=!1,null===(s=this.sdkError)||void 0===s||s.emit(new h(e.message,null===(r=e.response)||void 0===r?void 0:r.status,null===(l=e.response)||void 0===l?void 0:l.data))}}handleCancel(e){var t,i,o,s,r;e.stopPropagation();const l=this.fieldStore.get("fields").find((e=>e.name===this.fieldName));l&&(this.name=l.name,this.label=l.label,this.roleName=l.role_name,this.required=l.required,this.placeholder=(null===(t=l.settings)||void 0===t?void 0:t.placeholder)||"",this.value=(null===(i=l.settings)||void 0===i?void 0:i.result)||"",this.leading=(null===(o=l.settings)||void 0===o?void 0:o.leading)||0),this.dirty=!1,null===(s=this.close)||void 0===s||s.emit(),null===(r=document.getElementById("verdocs-template-field-properties"))||void 0===r||r.remove()}handleSave(e){e.stopPropagation();const t={name:this.name,label:this.label||null,required:this.required,role_name:this.roleName};"checkbox_group"===this.type||"radio_button_group"===this.type?(t.settings=this.setting,t.settings.options=this.options):"textarea"===this.type||"textbox"===this.type?(t.settings={...this.setting},t.settings.result=(this.value||"").trim()):"dropdown"===this.type&&(t.settings={x:this.setting.x,y:this.setting.y,options:this.options}),console.log("FP: Will update",this.fieldName,t),l(this.endpoint,this.templateId,this.fieldName,t).then((e=>{var i,o,s;this.dirty=!1,c(this.fieldStore,this.fieldName,e),null===(i=this.settingsChanged)||void 0===i||i.emit({fieldName:this.fieldName,settings:t,field:e}),null===(o=this.close)||void 0===o||o.emit(),null===(s=document.getElementById("verdocs-template-field-properties"))||void 0===s||s.remove()})).catch((()=>{console.log("Field update failed",e)}))}handleAddOption(e){e.stopPropagation();const t={name:this.name,required:this.required,role_name:this.roleName};this.options.push("radio_button_group"===this.type?{id:k(),value:`Option ${this.options.length+1}`,selected:!1,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20}:{id:k(),value:`Option ${this.options.length+1}`,checked:!1,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20}),t.settings={...this.setting},delete t.settings.result,t.settings.options=[...this.options],l(this.endpoint,this.templateId,this.fieldName,t).then((e=>{var i,o,s;this.dirty=!1,c(this.fieldStore,this.fieldName,e),this.fieldName=e.name,null===(i=this.settingsChanged)||void 0===i||i.emit({fieldName:this.fieldName,settings:t,field:e}),null===(o=this.close)||void 0===o||o.emit(),null===(s=document.getElementById("verdocs-template-field-properties"))||void 0===s||s.remove()})).catch((()=>{console.log("Field update failed",e)}))}async handleDelete(e){e.stopPropagation(),window.confirm("Are you sure you wish to remove this field? This action cannot be undone.")&&a(this.endpoint,this.templateId,this.fieldName).then((()=>{var e,t;this.fieldStore.set("fields",this.fieldStore.get("fields").filter((e=>e.name!==this.fieldName))),null===(e=this.delete)||void 0===e||e.emit({templateId:this.templateId,roleName:this.roleName}),null===(t=document.getElementById("verdocs-template-field-properties"))||void 0===t||t.remove()})).catch((e=>{console.log("[FIELD PROPERTIES] Deletion error",e)}))}render(){var e;return this.endpoint.session?this.endpoint.session&&this.fieldStore.get("fields").some((e=>e.name===this.fieldName))?this.helpText&&this.showingHelp?t(i,null,t("h6",null,v(this.fieldType)," Settings ",t("div",{style:{flex:"1"}}),t("div",{class:"help-icon",innerHTML:g,onClick:()=>this.showingHelp=!1})),t("p",{class:"instructions",innerHTML:this.helpText})):t(i,{id:"verdocs-template-field-properties"},t("h6",null,v(this.fieldType.replace(/_/g," "))," Settings ",t("div",{style:{flex:"1"}}),this.helpText&&t("div",{class:"help-icon",innerHTML:g,onClick:()=>this.showingHelp=!0})),t("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},t("div",{class:"row"},t("verdocs-text-input",{id:"verdocs-field-name",label:"Field Name",value:this.name,autocomplete:"off",placeholder:"Field Name...",onInput:e=>{this.name=e.target.value,this.dirty=!0}})),t("div",{class:"row"},t("verdocs-text-input",{id:"verdocs-field-label",label:"Optional Label",value:this.label,autocomplete:"off",placeholder:"Optional Label...",onInput:e=>{this.label=e.target.value,this.dirty=!0}})),t("div",{class:"row"},t("div",{class:"input-label"},"Role:"),t("verdocs-select-input",{value:this.roleName,options:null===(e=this.roleStore.state)||void 0===e?void 0:e.roles.map((e=>({label:e.name,value:e.name}))),onInput:e=>{this.roleName=e.target.value,this.dirty=!0}})),["textbox","textarea"].includes(this.type)&&t("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},t("verdocs-text-input",{id:"verdocs-field-value",label:"Value",value:this.value,autocomplete:"off",placeholder:"Pre-defined value...",onInput:e=>{this.value=e.target.value,this.dirty=!0}})),["textbox","textarea"].includes(this.type)&&t("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},t("verdocs-text-input",{id:"verdocs-field-placeholder",label:"Placeholder",value:this.placeholder,autocomplete:"off",placeholder:"Placeholder...",onInput:e=>{this.placeholder=e.target.value,this.dirty=!0}})),t("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},t("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Required"),t("verdocs-checkbox",{id:"verdocs-is-required",name:"is-required",checked:this.required,value:"on",onInput:e=>{this.required=e.target.checked,this.dirty=!0}})),["checkbox_group","radio_button_group"].includes(this.type)&&t("verdocs-button",{size:"small",onClick:e=>this.handleAddOption(e),label:"Add Option"}),["dropdown"].includes(this.type)&&t("div",{class:"options"},t("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px",textAlign:"center",fontWeight:"700",fontSize:"14px",justifyContent:"center",backgroundColor:"#333333",padding:"5px 8px",color:"#ffffff"}},"Options"),t("div",{class:"row-header"},t("h6",null,"ID"),t("h6",null,"Label"),t("div",{style:{width:"34px"}})),this.options.map(((e,i)=>t("div",{class:"row option-row",key:i},t("verdocs-text-input",{id:`verdocs-option-id-${e.id}`,value:e.id,placeholder:"Unique ID",onInput:e=>{this.options[i].id=e.target.value,this.dirty=!0}}),t("verdocs-text-input",{id:`verdocs-option-value-${e.id}`,value:e.value,placeholder:"Display value",onInput:e=>{this.options[i].value=e.target.value,this.dirty=!0}}),t("button",{innerHTML:x,class:"remove-button",onClick:()=>{this.options=this.options.filter((t=>t.id!==e.id)),this.dirty=!0}})))),t("div",{class:"row-header"},t("button",{class:"add-option-button",onClick:()=>{this.options=[...this.options,{id:`option-${this.options.length+1}`,value:`Option ${this.options.length+1}`}],this.dirty=!0}},"Add Option"))),t("div",{class:"buttons"},t("button",{class:"delete-button",disabled:this.dirty,onClick:e=>this.handleDelete(e),innerHTML:x}),t("div",{style:{flex:"1"}}),t("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),t("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)})))):t(i,{class:"empty"}):t(i,null,t("verdocs-component-error",{message:"You must be authenticated to use this module."}))}get el(){return s(this)}};y.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-field-properties{padding:20px;display:block;border-radius:4px;background:#ffffff;border:1px solid #ccc;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:2px 2px 10px 0px rgba(0, 0, 0, 0.1215686275);box-shadow:2px 2px 10px 0px rgba(0, 0, 0, 0.1215686275)}verdocs-template-field-properties .buttons{display:-ms-flexbox;display:flex;margin-top:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-field-properties .buttons verdocs-button{margin-left:16px}verdocs-template-field-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-field-properties verdocs-text-input{margin:0;-ms-flex:1;flex:1}verdocs-template-field-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .delete-button:active{background:#f3f3f3}verdocs-template-field-properties .delete-button svg{width:24px;height:24px}verdocs-template-field-properties h6{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:bold;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;color:#092c4c}verdocs-template-field-properties h6 .help-icon{opacity:0.5}verdocs-template-field-properties h6 .help-icon:hover{opacity:1;cursor:pointer}verdocs-template-field-properties .row-header{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties .row-header h6{margin-bottom:0}verdocs-template-field-properties .row-header verdocs-help-icon{-webkit-transform:scale(0.85);transform:scale(0.85)}verdocs-template-field-properties .row-header verdocs-help-icon svg{margin-bottom:-5px}verdocs-template-field-properties .row-header .add-button{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-field-properties .row-header .add-button:hover{opacity:1}verdocs-template-field-properties .row-header .add-button svg{width:32px;height:32px}verdocs-template-field-properties .option-row{margin:15px 0}verdocs-template-field-properties .option-row .remove-button{height:28px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .option-row .remove-button:active{background:#f3f3f3}verdocs-template-field-properties .option-row .remove-button:hover svg{stroke:rgb(165, 0, 33)}verdocs-template-field-properties .option-row .remove-button svg{width:20px;height:20px;stroke:#333333}verdocs-template-field-properties .options{background:#f3f3f3;padding:0 0 10px 0}verdocs-template-field-properties .options .row-header,verdocs-template-field-properties .options .option-row{padding:0 10px}verdocs-template-field-properties .options .add-option-button{border-radius:5px;border:1px solid #cccccc;background:#46497d;color:#ffffff;padding:3px 8px}verdocs-template-field-properties .options .option-row .input-element{font-size:14px}verdocs-template-field-properties .options verdocs-help-icon{opacity:1;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-field-properties .options verdocs-help-icon svg{fill:#ffffff}';export{f as verdocs_checkbox,u as verdocs_component_error,b as verdocs_portal,m as verdocs_select_input,y as verdocs_template_field_properties}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,c as o,h as r,H as s}from"./p-73a6f972.js";import{VerdocsEndpoint as
|
1
|
+
import{r as e,c as o,h as r,H as s}from"./p-73a6f972.js";import{VerdocsEndpoint as l}from"@verdocs/js-sdk";import{u as c}from"./p-b0766439.js";const a=class{constructor(r){e(this,r),this.fileSelected=o(this,"fileSelected",7),this.endpoint=l.getDefault(),this.file=void 0}handleFileChanged(e){var o,r;this.file=(null===(o=e.target.files)||void 0===o?void 0:o[0])||null,null===(r=this.fileSelected)||void 0===r||r.emit({file:this.file}),console.debug("[CHOOSER] Selected file",this.file)}handleSelectFile(e){var o,r;e.stopPropagation(),this.file=null,null===(o=this.fileSelected)||void 0===o||o.emit({file:null}),null===(r=document.getElementById("verdocs-file-chooser"))||void 0===r||r.click()}render(){const e=this.file?"Select a different file":"Select a file from your computer";return r(s,{key:"870f83d51356099942aeb7f50680bff38b946e74"},r("input",{key:"a4177207b2d87dd1d7e26093b93e36858a296f65",type:"file",multiple:!0,id:"verdocs-file-chooser",accept:"application/pdf,.pdf,.doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",style:{display:"none"},onChange:e=>this.handleFileChanged(e)}),r("div",{key:"57e6c23406d1a12bc7b426fe76469c83925692ed",class:"upload-box"},r("div",{key:"6b05c0bc019af781b632b91761e96b48a7e99623",class:"selected-filename"},this.file?this.file.name:"Drag a file here"),r("div",{key:"b1ab95cb7d5a19c2d5c3e3a48c073a954bbed454",class:"or-prefer"},this.file?c:"Or, if you prefer..."),r("verdocs-button",{key:"bec299eef4e98464c0cd76180c8b2af875ee6243",label:e,size:"small",onClick:e=>this.handleSelectFile(e)})))}};a.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-file-chooser{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-file-chooser .upload-box{text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;padding:40px 15px;color:rgba(0, 0, 0, 0.54)}verdocs-file-chooser .upload-box svg{width:64px;height:64px;fill:#5c6575}verdocs-file-chooser .selected-filename{font-size:20px;font-weight:bold;overflow-wrap:anywhere}verdocs-file-chooser .or-prefer{height:20px;margin:20px 0;font-size:16px}';const i=class{constructor(o){e(this,o),this.label="",this.showPercent=!1,this.percent=0}render(){const e=Math.ceil(100*Math.min(this.percent,100)/100);return r(s,{key:"3bdafa75c9908d839f4798cca904ef0d87e77e79"},r("div",{key:"37306b18904d0824c8169911023fd0d11db83c3f",class:"labels"},this.label&&r("div",{key:"1cc24f6fa43f35802f20ebdd5fecbfd9497bab03",class:"label"},this.label),this.showPercent&&r("div",{key:"d380b895f79be2c234a3ef492c67e2f1e79e0502",class:"label"},this.percent,"%")),r("div",{key:"10301a56898976fe9ade194691de5f96f5af3ca9",class:"bar"},r("div",{key:"f7b764b7869b07a1e206294562840302c89fa2ef",class:"slider",style:{width:`${e}%`}})))}};i.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-progress-bar{font-family:"Inter", "Barlow", sans-serif;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-progress-bar .labels{display:-ms-flexbox;display:flex;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-progress-bar .labels .label{display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;color:#33364b}verdocs-progress-bar .bar{display:-ms-flexbox;display:flex;-ms-flex:0 0 10px;flex:0 0 10px;border-radius:5px;background-color:#cccccc}verdocs-progress-bar .bar .slider{display:-ms-flexbox;display:flex;border-radius:5px;background-color:#55bc81}';export{a as verdocs_file_chooser,i as verdocs_progress_bar}
|