@feathery/react 2.37.4 → 2.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/Form/index.d.ts.map +1 -1
- package/cjs/assistant/AssistantChat.d.ts +31 -0
- package/cjs/assistant/AssistantChat.d.ts.map +1 -0
- package/cjs/assistant/AssistantClient.d.ts +15 -0
- package/cjs/assistant/AssistantClient.d.ts.map +1 -0
- package/cjs/assistant/MarkdownText.d.ts +2 -1
- package/cjs/assistant/MarkdownText.d.ts.map +1 -1
- package/cjs/assistant/ToolStatus.d.ts +20 -3
- package/cjs/assistant/ToolStatus.d.ts.map +1 -1
- package/cjs/assistant/colors.d.ts +1 -0
- package/cjs/assistant/colors.d.ts.map +1 -1
- package/cjs/assistant/icons.d.ts +8 -0
- package/cjs/assistant/icons.d.ts.map +1 -1
- package/cjs/assistant/index.d.ts +3 -15
- package/cjs/assistant/index.d.ts.map +1 -1
- package/cjs/assistant/tools/clickElement.d.ts +16 -0
- package/cjs/assistant/tools/clickElement.d.ts.map +1 -0
- package/cjs/assistant/tools/panelRuntime.d.ts +91 -0
- package/cjs/assistant/tools/panelRuntime.d.ts.map +1 -0
- package/cjs/assistant/tools/setFieldValue.d.ts +32 -0
- package/cjs/assistant/tools/setFieldValue.d.ts.map +1 -0
- package/cjs/assistant/utils.d.ts +11 -5
- package/cjs/assistant/utils.d.ts.map +1 -1
- package/cjs/elements/basic/ImageElement.d.ts.map +1 -1
- package/cjs/elements/fields/index.d.ts +28 -23
- package/cjs/elements/fields/index.d.ts.map +1 -1
- package/cjs/elements/index.d.ts +66 -22
- package/cjs/elements/index.d.ts.map +1 -1
- package/cjs/fthry_AssistantChat.L8QqDrZ9.js +53283 -0
- package/cjs/{fthry_FormControl.BCawW2JY.js → fthry_FormControl.B6IeQ4Ds.js} +1 -1
- package/cjs/{fthry_InlineTooltip.DXAGdsG6.js → fthry_InlineTooltip.CHwGV2ye.js} +2 -2
- package/cjs/{fthry_Overlay.Dxddifgf.js → fthry_Overlay.BApTL35K.js} +1 -1
- package/cjs/{fthry_PaymentMethodField.BBn_I5Y-.js → fthry_PaymentMethodField.B4dRDX90.js} +4 -4
- package/cjs/{fthry_Placeholder.DgCge_qQ.js → fthry_Placeholder.DWR5nO5t.js} +1 -1
- package/cjs/{fthry_ShowEyeIcon.6chMT9tB.js → fthry_ShowEyeIcon.CrWpuKPG.js} +1 -1
- package/cjs/fthry_clsx.BtxeOLZW.js +5 -0
- package/cjs/fthry_highlighted-body-TPN3WLV5.CIRngtHJ.js +15 -0
- package/cjs/{fthry_index.DxstWM8L.js → fthry_index.7DwrYriA.js} +8 -8
- package/cjs/{fthry_index.DSS9EjkL.js → fthry_index.B9CMlFfK.js} +2 -2
- package/cjs/{fthry_index.b2DipouN.js → fthry_index.BBz67wEv.js} +5 -5
- package/cjs/{fthry_index.Co7zM36I.js → fthry_index.BEpOYeuD.js} +4 -4
- package/cjs/{fthry_index.D_1t-ApQ.js → fthry_index.BVr4Lcyo.js} +4 -105
- package/cjs/{fthry_index.WYWtukPG.js → fthry_index.Bde3s5tl.js} +5 -5
- package/cjs/{fthry_index.BrcBLxiN.js → fthry_index.Bq4ONiuv.js} +1 -1
- package/cjs/{fthry_index.CWvKP0U9.js → fthry_index.BwxSWwJZ.js} +3 -3
- package/cjs/{fthry_index.BCakShY6.js → fthry_index.BxTMSKYR.js} +6 -6
- package/cjs/{fthry_index.D-6wkDz2.js → fthry_index.C7zyqnbf.js} +5 -5
- package/cjs/{fthry_index.B2WATisk.js → fthry_index.CLqeg1q-.js} +5 -5
- package/cjs/{fthry_index.1G5WWnt8.js → fthry_index.Ca9y1U8W.js} +1 -1
- package/cjs/{fthry_index.Dsv-TeBu.js → fthry_index.CaQDsoPD.js} +670 -52197
- package/cjs/{fthry_index.C2MePzk3.js → fthry_index.CznkErSr.js} +24 -23
- package/cjs/{fthry_index.DzI22-a-.js → fthry_index.D7IlFInQ.js} +2 -2
- package/cjs/{fthry_index.Bg8trysI.js → fthry_index.DKe_zH6q.js} +1 -1
- package/cjs/{fthry_index.DAqPVi5Z.js → fthry_index.DYCg5RsQ.js} +3 -3
- package/cjs/{fthry_index.Y_UP_4ct.js → fthry_index.Dl1GeWM6.js} +4 -4
- package/cjs/{fthry_index.dFaOUdRp.js → fthry_index.Dly0rruo.js} +1 -1
- package/cjs/{fthry_index.DFi7wHj1.js → fthry_index.IxpG538L.js} +1 -1
- package/cjs/{fthry_index.4_yQ3xcB.js → fthry_index.TVlALn4r.js} +1 -1
- package/cjs/fthry_index.YyKms2Ty.js +109 -0
- package/cjs/{fthry_index.BvCKY-AY.js → fthry_index.fFWtGd8u.js} +1 -1
- package/cjs/{fthry_index.BCDEI_8h.js → fthry_index.qxBbMcVu.js} +6 -6
- package/cjs/{fthry_index.DclxO6k2.js → fthry_index.xHwcINEA.js} +1 -1
- package/cjs/{fthry_input.WfgR8fOH.js → fthry_input.C-RhGr8Z.js} +1 -1
- package/cjs/fthry_mermaid-O7DHMXV3.B40IiwEd.js +15 -0
- package/cjs/{fthry_script.B921m9AF.js → fthry_script.BUzm9HxD.js} +1 -1
- package/cjs/{fthry_styles.DyHc8mjo.js → fthry_styles.BD-5zYX4.js} +1 -1
- package/cjs/{fthry_useElementSize.Bx50W_pE.js → fthry_useElementSize.7Vh9Fjsi.js} +1 -1
- package/cjs/{fthry_useSalesforceSync.CCCfBjU1.js → fthry_useSalesforceSync.BYr2Zkyy.js} +1 -1
- package/cjs/{fthry_webfontloader.DxmcEISV.js → fthry_webfontloader.B3eO9SnD.js} +1 -1
- package/cjs/index.d.ts +67 -23
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js +1 -1
- package/cjs/utils/internalState.d.ts +4 -0
- package/cjs/utils/internalState.d.ts.map +1 -1
- package/dist/Form/index.d.ts.map +1 -1
- package/dist/assistant/AssistantChat.d.ts +31 -0
- package/dist/assistant/AssistantChat.d.ts.map +1 -0
- package/dist/assistant/AssistantClient.d.ts +15 -0
- package/dist/assistant/AssistantClient.d.ts.map +1 -0
- package/dist/assistant/MarkdownText.d.ts +2 -1
- package/dist/assistant/MarkdownText.d.ts.map +1 -1
- package/dist/assistant/ToolStatus.d.ts +20 -3
- package/dist/assistant/ToolStatus.d.ts.map +1 -1
- package/dist/assistant/colors.d.ts +1 -0
- package/dist/assistant/colors.d.ts.map +1 -1
- package/dist/assistant/icons.d.ts +8 -0
- package/dist/assistant/icons.d.ts.map +1 -1
- package/dist/assistant/index.d.ts +3 -15
- package/dist/assistant/index.d.ts.map +1 -1
- package/dist/assistant/tools/clickElement.d.ts +16 -0
- package/dist/assistant/tools/clickElement.d.ts.map +1 -0
- package/dist/assistant/tools/panelRuntime.d.ts +91 -0
- package/dist/assistant/tools/panelRuntime.d.ts.map +1 -0
- package/dist/assistant/tools/setFieldValue.d.ts +32 -0
- package/dist/assistant/tools/setFieldValue.d.ts.map +1 -0
- package/dist/assistant/utils.d.ts +11 -5
- package/dist/assistant/utils.d.ts.map +1 -1
- package/dist/elements/basic/ImageElement.d.ts.map +1 -1
- package/dist/elements/fields/index.d.ts +28 -23
- package/dist/elements/fields/index.d.ts.map +1 -1
- package/dist/elements/index.d.ts +66 -22
- package/dist/elements/index.d.ts.map +1 -1
- package/dist/fthry_AssistantChat.B4O7bQrp.js +53277 -0
- package/dist/{fthry_FormControl.76_0PuFC.js → fthry_FormControl.BEWaNHn3.js} +1 -1
- package/dist/{fthry_InlineTooltip.d3TjV-eF.js → fthry_InlineTooltip.CP92bAZA.js} +2 -2
- package/dist/{fthry_Overlay.C9ZwYfq9.js → fthry_Overlay.D_UvdjmJ.js} +1 -1
- package/dist/{fthry_PaymentMethodField.CA0KyKcm.js → fthry_PaymentMethodField.BiBx9LjH.js} +4 -4
- package/dist/{fthry_Placeholder.3BQCtk4i.js → fthry_Placeholder.CsY-scXc.js} +1 -1
- package/dist/{fthry_ShowEyeIcon.Bqj7gJGW.js → fthry_ShowEyeIcon.CN_11GCA.js} +1 -1
- package/dist/fthry_clsx.ChV9xqsO.js +3 -0
- package/dist/{fthry_highlighted-body-TPN3WLV5.uNKEZjAy.js → fthry_highlighted-body-TPN3WLV5.B91Jtsra.js} +4 -1
- package/dist/fthry_index.BFwgxX3L.js +107 -0
- package/dist/{fthry_index.C_22SPRt.js → fthry_index.BK2Hnx9K.js} +1 -1
- package/dist/{fthry_index.CET1YvDN.js → fthry_index.BXAOPQ-N.js} +5 -5
- package/dist/{fthry_index.ChBrRALN.js → fthry_index.BYoImnvU.js} +1 -1
- package/dist/{fthry_index.aJzVeSoS.js → fthry_index.BitwCfs0.js} +1 -1
- package/dist/{fthry_index.CpjiI4uf.js → fthry_index.BqX45OG8.js} +3 -3
- package/dist/{fthry_index.Brftvfe7.js → fthry_index.BwsOm7hb.js} +5 -5
- package/dist/{fthry_index.BlrxJyUS.js → fthry_index.CCXpngi5.js} +5 -5
- package/dist/{fthry_index.BvdLAZLu.js → fthry_index.CNjt1dpv.js} +1 -1
- package/dist/{fthry_index.Cbk-4lUW.js → fthry_index.CRbJuR5X.js} +7 -6
- package/dist/{fthry_index.BCWRiQGq.js → fthry_index.CUa6fIIV.js} +8 -8
- package/dist/{fthry_index.BmcdgXn3.js → fthry_index.D5kSN9-t.js} +2 -105
- package/dist/{fthry_index.DIIgA2I2.js → fthry_index.DHr6yAT3.js} +6 -6
- package/dist/{fthry_index.20OBT_43.js → fthry_index.DJwLQi_x.js} +1 -1
- package/dist/{fthry_index.g8KGIqrC.js → fthry_index.DTkLn4V9.js} +3 -3
- package/dist/{fthry_index.BvSqC2z2.js → fthry_index.DUEiyRBT.js} +4 -4
- package/dist/{fthry_index.Bbxtbp4a.js → fthry_index.DgVE4qW7.js} +673 -52202
- package/dist/{fthry_index.Dh3vrOA4.js → fthry_index.DtBZRH06.js} +5 -5
- package/dist/{fthry_index.CGjEfzIL.js → fthry_index.OjuYAGjs.js} +1 -1
- package/dist/{fthry_index.Dn8hTYS2.js → fthry_index.W8pRYyDi.js} +6 -6
- package/dist/{fthry_index.B2J5J4jS.js → fthry_index.ebPmN15E.js} +4 -4
- package/dist/{fthry_index.-pimdPng.js → fthry_index.k6djaqmS.js} +2 -2
- package/dist/{fthry_index.54Em8Q1w.js → fthry_index.slanwBPP.js} +1 -1
- package/dist/{fthry_index.DhichOKe.js → fthry_index.tw8xNWZc.js} +2 -2
- package/dist/{fthry_index.x1TUK-im.js → fthry_index.w7Nx6zNo.js} +1 -1
- package/dist/{fthry_input.Dj1IMwey.js → fthry_input.D94H5xWk.js} +1 -1
- package/dist/fthry_mermaid-O7DHMXV3.D_D0ytjk.js +9 -0
- package/dist/{fthry_script.BmwMDCAZ.js → fthry_script.C4MOLOaj.js} +1 -1
- package/dist/{fthry_styles.B6qGnHJ1.js → fthry_styles.BQL5_8xd.js} +1 -1
- package/dist/{fthry_useElementSize.BppSuCUN.js → fthry_useElementSize.C7pCjEY0.js} +1 -1
- package/dist/{fthry_useSalesforceSync.D0nLeVuk.js → fthry_useSalesforceSync.Bj6SvTIc.js} +1 -1
- package/dist/{fthry_webfontloader.D5C7-qaj.js → fthry_webfontloader.CT2fb2Df.js} +1 -1
- package/dist/index.d.ts +67 -23
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/internalState.d.ts +4 -0
- package/dist/utils/internalState.d.ts.map +1 -1
- package/package.json +2 -2
- package/umd/542.f1dbbbb062e82a2995e9.js +1 -0
- package/umd/602.1fde434923c6596acd40.js +1 -0
- package/umd/{AddressField.2d777eda22a67a0ed3a3.js → AddressField.c4188872f2a931394aa1.js} +1 -1
- package/umd/AssistantChat.2f8dbf760e2412585af9.js +1 -0
- package/umd/DropdownField.36bb515df8083884f0f3.js +1 -0
- package/umd/{DropdownMultiField.c8c926000cbed5ee771a.js → DropdownMultiField.72a44c0280217eeb5652.js} +1 -1
- package/umd/{PhoneField.6b9ad2d0d9387ef78a1f.js → PhoneField.8183bed71fa92767aa3a.js} +1 -1
- package/umd/{TextField.f5cc4a03e69d5872027b.js → TextField.28c59425e129e78a4551.js} +1 -1
- package/umd/index.js +1 -1
- package/cjs/fthry_highlighted-body-TPN3WLV5.DkI91-Zy.js +0 -12
- package/cjs/fthry_mermaid-O7DHMXV3.v4t8IYSq.js +0 -12
- package/dist/fthry_mermaid-O7DHMXV3.C5f8Q-rK.js +0 -6
- package/umd/DropdownField.1d440e016d425637032d.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as jsx, _ as __assign, c as __read, B as replaceTextVariables, s as isMobile, j as jsxs, q as Fragment, F as FORM_Z_INDEX } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
import { useState, useRef } from 'react';
|
|
3
|
-
import { O as Overlay, T as Tooltip } from './fthry_Overlay.
|
|
3
|
+
import { O as Overlay, T as Tooltip } from './fthry_Overlay.D_UvdjmJ.js';
|
|
4
4
|
|
|
5
5
|
function HelpIcon(_a) {
|
|
6
6
|
var _b = _a.cssStyles, cssStyles = _b === void 0 ? {} : _b, _c = _a.onClick, onClick = _c === void 0 ? function () { } : _c;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k as __rest, a as jsx, _ as __assign, F as FORM_Z_INDEX, c as __read, t as featheryDoc, p as featheryWindow, q as Fragment } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
import { useRef, useState, useCallback, useLayoutEffect, useEffect } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k as __rest, t as featheryDoc, j as jsxs, _ as __assign, v as getStripe, a as jsx, c as __read, u as useBorder, w as filterKeys, x as ERROR_COLOR } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
import React__default, { memo, useEffect, useState, useRef } from 'react';
|
|
3
|
-
import { P as PropTypes } from './fthry_index.
|
|
4
|
-
import { I as InlineTooltip } from './fthry_InlineTooltip.
|
|
3
|
+
import { P as PropTypes } from './fthry_index.DJwLQi_x.js';
|
|
4
|
+
import { I as InlineTooltip } from './fthry_InlineTooltip.CP92bAZA.js';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'react-dom/client';
|
|
7
7
|
import 'jszip';
|
|
8
8
|
import 'react-dom';
|
|
9
|
-
import './fthry_Overlay.
|
|
9
|
+
import './fthry_Overlay.D_UvdjmJ.js';
|
|
10
10
|
|
|
11
11
|
function ownKeys(object, enumerableOnly) {
|
|
12
12
|
var keys = Object.keys(object);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k as __rest, a as jsx, _ as __assign } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
|
|
3
3
|
function ShowEyeIcon$1(_a) {
|
|
4
4
|
var _b = _a.width, width = _b === void 0 ? 30 : _b, _c = _a.height, height = _c === void 0 ? 30 : _c, props = __rest(_a, ["width", "height"]);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
2
|
+
|
|
3
|
+
export { clsx as c };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { R as R$1, M as Mi, B as Bt } from './
|
|
1
|
+
import { R as R$1, M as Mi, B as Bt } from './fthry_AssistantChat.B4O7bQrp.js';
|
|
2
2
|
import { useContext, useState, useEffect } from 'react';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import './fthry_index.DgVE4qW7.js';
|
|
4
5
|
import 'react-dom/client';
|
|
5
6
|
import 'jszip';
|
|
6
7
|
import 'react-dom';
|
|
8
|
+
import './fthry_clsx.ChV9xqsO.js';
|
|
9
|
+
import './fthry_index.D5kSN9-t.js';
|
|
7
10
|
|
|
8
11
|
var R=({code:s,language:t,raw:e,className:h,startLine:d,...m})=>{let{shikiTheme:l}=useContext(R$1),o=Mi(),[p,i]=useState(e);return useEffect(()=>{if(!o){i(e);return}let r=o.highlight({code:s,language:t,themes:l},c=>{i(c);});r&&i(r);},[s,t,l,o,e]),jsx(Bt,{className:h,language:t,result:p,startLine:d,...m})};
|
|
9
12
|
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { u as useBorder, c as __read, a as jsx, _ as __assign, d as countryData, f as fieldValues, j as jsxs, h as hoverStylesGuard, e as css, g as __makeTemplateObject, G as Global, b as iosScrollOnFocus, r as resetStyles } from './fthry_index.DgVE4qW7.js';
|
|
2
|
+
import { useState, useRef, useEffect } from 'react';
|
|
3
|
+
import { I as InlineTooltip } from './fthry_InlineTooltip.CP92bAZA.js';
|
|
4
|
+
import { h as hasState, g as getStateOptions } from './fthry_index.D5kSN9-t.js';
|
|
5
|
+
import { u as useSalesforceSync } from './fthry_useSalesforceSync.Bj6SvTIc.js';
|
|
6
|
+
import 'react/jsx-runtime';
|
|
7
|
+
import 'react-dom/client';
|
|
8
|
+
import 'jszip';
|
|
9
|
+
import 'react-dom';
|
|
10
|
+
import './fthry_Overlay.D_UvdjmJ.js';
|
|
11
|
+
|
|
12
|
+
function DropdownField(_a) {
|
|
13
|
+
var _b, _c, _d;
|
|
14
|
+
var _e;
|
|
15
|
+
var element = _a.element, responsiveStyles = _a.responsiveStyles, fieldLabel = _a.fieldLabel, inlineError = _a.inlineError, _f = _a.required, required = _f === void 0 ? false : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.fieldVal, fieldVal = _h === void 0 ? '' : _h, _j = _a.repeatIndex, repeatIndex = _j === void 0 ? null : _j, _k = _a.countryCode, countryCode = _k === void 0 ? '' : _k, editMode = _a.editMode, rightToLeft = _a.rightToLeft, _l = _a.onChange, onChange = _l === void 0 ? function () { } : _l, _m = _a.setRef, setRef = _m === void 0 ? function () { } : _m, _o = _a.elementProps, elementProps = _o === void 0 ? {} : _o, children = _a.children;
|
|
16
|
+
var _p = useBorder({
|
|
17
|
+
element: element,
|
|
18
|
+
error: inlineError,
|
|
19
|
+
breakpoint: responsiveStyles.getMobileBreakpoint()
|
|
20
|
+
}), borderStyles = _p.borderStyles, customBorder = _p.customBorder;
|
|
21
|
+
var _q = __read(useState(false), 2), focused = _q[0], setFocused = _q[1];
|
|
22
|
+
var _r = __read(useState(null), 2), curCountry = _r[0], setCurCountry = _r[1];
|
|
23
|
+
var containerRef = useRef(null);
|
|
24
|
+
var servar = element.servar;
|
|
25
|
+
var short = servar.metadata.store_abbreviation;
|
|
26
|
+
var _s = useSalesforceSync(servar.metadata.salesforce_sync, editMode), dynamicOptions = _s.dynamicOptions, loadingDynamicOptions = _s.loadingDynamicOptions, shouldSalesforceSync = _s.shouldSalesforceSync;
|
|
27
|
+
useEffect(function () {
|
|
28
|
+
if (servar.type === 'gmap_state') {
|
|
29
|
+
var code = countryCode.toLowerCase() || servar.metadata.default_country;
|
|
30
|
+
if (code && fieldVal && !hasState(code, fieldVal, short, true)) {
|
|
31
|
+
fieldVal = '';
|
|
32
|
+
onChange({ target: { value: fieldVal } });
|
|
33
|
+
}
|
|
34
|
+
setCurCountry(code || 'us');
|
|
35
|
+
}
|
|
36
|
+
}, [countryCode, setCurCountry]);
|
|
37
|
+
var options;
|
|
38
|
+
if (shouldSalesforceSync) {
|
|
39
|
+
options = dynamicOptions.map(function (option) { return (jsx("option", __assign({ value: option.value }, { children: option.label }), option.value)); });
|
|
40
|
+
}
|
|
41
|
+
else if (servar.type === 'gmap_state') {
|
|
42
|
+
if (curCountry === null)
|
|
43
|
+
options = [];
|
|
44
|
+
else if (fieldVal && !hasState(curCountry, fieldVal, short)) {
|
|
45
|
+
// If user selected a country without states defined
|
|
46
|
+
options = [
|
|
47
|
+
jsx("option", __assign({ value: fieldVal }, { children: fieldVal }), fieldVal)
|
|
48
|
+
];
|
|
49
|
+
}
|
|
50
|
+
else
|
|
51
|
+
options = getStateOptions(curCountry, short, servar.metadata.include_territories);
|
|
52
|
+
}
|
|
53
|
+
else if (servar.type === 'gmap_country') {
|
|
54
|
+
var translation_1 = element.properties.translate || {};
|
|
55
|
+
options = countryData.map(function (_a) {
|
|
56
|
+
var countryCode = _a.countryCode, countryName = _a.countryName;
|
|
57
|
+
var val = servar.metadata.store_abbreviation
|
|
58
|
+
? countryCode
|
|
59
|
+
: countryName;
|
|
60
|
+
var label = translation_1[countryCode] || countryName;
|
|
61
|
+
return (jsx("option", __assign({ value: val }, { children: label }), countryCode));
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
var labels_1 = servar.metadata.option_labels;
|
|
66
|
+
var tooltips_1 = servar.metadata.option_tooltips;
|
|
67
|
+
if (repeatIndex !== null && ((_e = servar.metadata.repeat_options) === null || _e === void 0 ? void 0 : _e[repeatIndex])) {
|
|
68
|
+
var repeatOptions = servar.metadata.repeat_options[repeatIndex];
|
|
69
|
+
options = repeatOptions.map(function (option) {
|
|
70
|
+
var _a, _b, _c;
|
|
71
|
+
var value = (_a = option.value) !== null && _a !== void 0 ? _a : option;
|
|
72
|
+
var label = (_b = option.label) !== null && _b !== void 0 ? _b : option;
|
|
73
|
+
var tooltip = (_c = option.tooltip) !== null && _c !== void 0 ? _c : '';
|
|
74
|
+
return (jsx("option", __assign({ value: value, title: tooltip }, { children: label }), value));
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
options = servar.metadata.options.map(function (option, index) {
|
|
79
|
+
var _a, _b;
|
|
80
|
+
var label = labels_1 && labels_1[index] ? labels_1[index] : option;
|
|
81
|
+
var tooltip = (_a = tooltips_1 === null || tooltips_1 === void 0 ? void 0 : tooltips_1[index]) !== null && _a !== void 0 ? _a : '';
|
|
82
|
+
var allVals = ((_b = fieldValues[servar.key]) !== null && _b !== void 0 ? _b : []);
|
|
83
|
+
if (servar.repeated &&
|
|
84
|
+
servar.metadata.unique_repeat_options &&
|
|
85
|
+
option !== fieldVal &&
|
|
86
|
+
allVals.includes(option))
|
|
87
|
+
return null;
|
|
88
|
+
return (jsx("option", __assign({ value: option, title: tooltip }, { children: label }), "".concat(index).concat(option)));
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
var hasTooltip = !!element.properties.tooltipText;
|
|
93
|
+
var chevronPosition = hasTooltip ? 30 : 10;
|
|
94
|
+
responsiveStyles.applyFontStyles('field', !fieldVal);
|
|
95
|
+
return (jsxs("div", __assign({ ref: containerRef, css: __assign({ maxWidth: '100%', width: '100%', height: '100%', position: 'relative', pointerEvents: editMode ? 'none' : 'auto' }, responsiveStyles.getTarget('fc')) }, elementProps, { children: [children, fieldLabel, jsxs("div", __assign({ css: __assign(__assign(__assign({ position: 'relative', width: '100%', whiteSpace: 'nowrap',
|
|
96
|
+
// Prevent placeholder overflow
|
|
97
|
+
overflowX: 'clip' }, responsiveStyles.getTarget('sub-fc')), (disabled ? responsiveStyles.getTarget('disabled') : {})), { '&:hover': hoverStylesGuard(disabled
|
|
98
|
+
? {}
|
|
99
|
+
: __assign(__assign({}, responsiveStyles.getTarget('hover')), borderStyles.hover)), '&&': focused
|
|
100
|
+
? __assign(__assign({}, responsiveStyles.getTarget('active')), borderStyles.active) : {} }) }, { children: [jsx(Global, { styles: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n option {\n color: black;\n }\n "], ["\n option {\n color: black;\n }\n "]))) }), customBorder, jsxs("select", __assign({ css: __assign(__assign(__assign({}, resetStyles), responsiveStyles.getTarget('field')), (_b = { width: '100%', height: '100%', border: 'none', margin: 0, boxShadow: 'none', backgroundColor: 'transparent', appearance: 'none', WebkitAppearance: 'none', MozAppearance: 'none', backgroundImage: "url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M0 0.776454L0.970744 0L5 4.2094L9.02926 0L10 0.776454L5 6L0 0.776454Z' fill='%23".concat(element.styles.font_color, "'/></svg>\")"), backgroundRepeat: 'no-repeat', backgroundPosition: "".concat(rightToLeft ? 'left' : 'right', " ").concat(chevronPosition, "px center") }, _b[rightToLeft ? 'paddingLeft' : 'paddingRight'] = 30, _b.position = 'relative', _b)), id: servar.key, value: fieldVal !== null && fieldVal !== void 0 ? fieldVal : '', required: required, disabled: disabled || loadingDynamicOptions, "aria-label": element.properties.aria_label, onChange: onChange, onFocus: function (event) {
|
|
101
|
+
setFocused(true);
|
|
102
|
+
iosScrollOnFocus(event);
|
|
103
|
+
}, onBlur: function () { return setFocused(false); }, ref: setRef }, { children: [jsx("option", { value: '', disabled: required }, ''), options] })), jsx("span", __assign({ css: __assign(__assign(__assign((_c = { position: 'absolute', pointerEvents: 'none' }, _c[rightToLeft ? 'right' : 'left'] = '0.75rem', _c.transition = '0.2s ease all', _c.top = '50%', _c), responsiveStyles.getTarget('placeholder')), (fieldVal ? responsiveStyles.getTarget('placeholderFocus') : {})), (_d = {}, _d["input:focus + &"] = __assign(__assign({}, responsiveStyles.getTarget('placeholderFocus')), responsiveStyles.getTarget('placeholderActive')), _d)) }, { children: element.properties.placeholder || '' })), jsx(InlineTooltip, { containerRef: containerRef, id: element.id, text: element.properties.tooltipText, responsiveStyles: responsiveStyles, repeat: element.repeat })] }))] })));
|
|
104
|
+
}
|
|
105
|
+
var templateObject_1;
|
|
106
|
+
|
|
107
|
+
export { DropdownField as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __assign, h as hoverStylesGuard, j as jsxs,
|
|
1
|
+
import { _ as __assign, h as hoverStylesGuard, j as jsxs, a as jsx, b as iosScrollOnFocus } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-dom/client';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as __read, u as useBorder, j as jsxs, _ as __assign, h as hoverStylesGuard, a as jsx, b as iosScrollOnFocus, r as resetStyles, D as DROPDOWN_Z_INDEX, l as __awaiter, m as __generator, o as FeatheryClient, H as debounce } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
import { useRef, useEffect, memo, useState, useCallback } from 'react';
|
|
3
|
-
import { P as Placeholder } from './fthry_Placeholder.
|
|
4
|
-
import { I as InlineTooltip } from './fthry_InlineTooltip.
|
|
5
|
-
import { O as Overlay } from './fthry_Overlay.
|
|
6
|
-
import { u as useElementSize } from './fthry_useElementSize.
|
|
3
|
+
import { P as Placeholder } from './fthry_Placeholder.CsY-scXc.js';
|
|
4
|
+
import { I as InlineTooltip } from './fthry_InlineTooltip.CP92bAZA.js';
|
|
5
|
+
import { O as Overlay } from './fthry_Overlay.D_UvdjmJ.js';
|
|
6
|
+
import { u as useElementSize } from './fthry_useElementSize.C7pCjEY0.js';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import 'react-dom/client';
|
|
9
9
|
import 'jszip';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k as __rest, a as jsx, _ as __assign, j as jsxs, q as Fragment, c as __read, t as featheryDoc, f as fieldValues, z as stringifyWithNull, U as __values, L as __spreadArray } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as __read, j as jsxs$1, _ as __assign, a as jsx$1, F as FORM_Z_INDEX } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
import React__default, { useRef, useEffect, useCallback, useState, useMemo, Fragment } from 'react';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import 'react-dom/client';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as __read, a as jsx, q as Fragment, s as isMobile, j as jsxs, _ as __assign, F as FORM_Z_INDEX, b as iosScrollOnFocus } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
import { useState, useRef, useMemo } from 'react';
|
|
3
|
-
import { O as Overlay, T as Tooltip } from './fthry_Overlay.
|
|
4
|
-
import { applyCheckableInputStyles, composeCheckableInputStyle } from './fthry_index.
|
|
3
|
+
import { O as Overlay, T as Tooltip } from './fthry_Overlay.D_UvdjmJ.js';
|
|
4
|
+
import { applyCheckableInputStyles, composeCheckableInputStyle } from './fthry_index.BK2Hnx9K.js';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'react-dom/client';
|
|
7
7
|
import 'jszip';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { u as useBorder, c as __read, j as jsxs, _ as __assign, h as hoverStylesGuard, a as jsx, b as iosScrollOnFocus, F as FORM_Z_INDEX, r as resetStyles } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
import { memo, useState, useRef } from 'react';
|
|
3
|
-
import { P as Placeholder } from './fthry_Placeholder.
|
|
4
|
-
import { I as InlineTooltip } from './fthry_InlineTooltip.
|
|
5
|
-
import { S as ShowEyeIcon, a as ShowEyeIcon$1 } from './fthry_ShowEyeIcon.
|
|
3
|
+
import { P as Placeholder } from './fthry_Placeholder.CsY-scXc.js';
|
|
4
|
+
import { I as InlineTooltip } from './fthry_InlineTooltip.CP92bAZA.js';
|
|
5
|
+
import { S as ShowEyeIcon, a as ShowEyeIcon$1 } from './fthry_ShowEyeIcon.CN_11GCA.js';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
7
|
import 'react-dom/client';
|
|
8
8
|
import 'jszip';
|
|
9
9
|
import 'react-dom';
|
|
10
|
-
import './fthry_Overlay.
|
|
10
|
+
import './fthry_Overlay.D_UvdjmJ.js';
|
|
11
11
|
|
|
12
12
|
function PasswordField(_a) {
|
|
13
13
|
var _b;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a2 as stringify, a3 as rulesheet, a4 as COMMENT, a5 as middleware, a6 as RULESET, a7 as combine, a8 as match, a9 as serialize, aa as copy, ab as replace, ac as WEBKIT, ad as MOZ, ae as MS, af as KEYFRAMES, ag as DECLARATION, ah as dealloc, ai as alloc, aj as hash, ak as charat, al as strlen, am as indexof, an as next, ao as token, ap as from, aq as peek, ar as delimit, as as slice, at as position, au as compile, a as jsx$1, _ as __assign, j as jsxs, q as Fragment$1, k as __rest, c as __read, F as FORM_Z_INDEX, p as featheryWindow, t as featheryDoc, L as __spreadArray, U as __values, u as useBorder, D as DROPDOWN_Z_INDEX } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useState, useCallback, forwardRef, useContext, useLayoutEffect, useEffect, createContext, useRef, useMemo, Component, Fragment } from 'react';
|
|
4
|
-
import { I as InlineTooltip } from './fthry_InlineTooltip.
|
|
5
|
-
import { P as Placeholder$2 } from './fthry_Placeholder.
|
|
6
|
-
import { u as useSalesforceSync } from './fthry_useSalesforceSync.
|
|
7
|
-
import { T as Tooltip, O as Overlay } from './fthry_Overlay.
|
|
4
|
+
import { I as InlineTooltip } from './fthry_InlineTooltip.CP92bAZA.js';
|
|
5
|
+
import { P as Placeholder$2 } from './fthry_Placeholder.CsY-scXc.js';
|
|
6
|
+
import { u as useSalesforceSync } from './fthry_useSalesforceSync.Bj6SvTIc.js';
|
|
7
|
+
import { T as Tooltip, O as Overlay } from './fthry_Overlay.D_UvdjmJ.js';
|
|
8
8
|
import { createPortal } from 'react-dom';
|
|
9
9
|
import 'react/jsx-runtime';
|
|
10
10
|
import 'react-dom/client';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as jsx, _ as __assign, c as __read, j as jsxs, E as ErrorInput } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-dom/client';
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as jsx, G as Global, e as css, g as __makeTemplateObject, _ as __assign, c as __read, s as isMobile, p as featheryWindow, t as featheryDoc, u as useBorder, j as jsxs$1, h as hoverStylesGuard, r as resetStyles, k as __rest, av as formatDateString } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { useMemo, useLayoutEffect, cloneElement, createRef, Component, useRef, useCallback, useEffect, createElement, memo, useState } from 'react';
|
|
4
|
-
import { P as Placeholder } from './fthry_Placeholder.
|
|
5
|
-
import { I as InlineTooltip } from './fthry_InlineTooltip.
|
|
4
|
+
import { P as Placeholder } from './fthry_Placeholder.CsY-scXc.js';
|
|
5
|
+
import { I as InlineTooltip } from './fthry_InlineTooltip.CP92bAZA.js';
|
|
6
|
+
import { c as clsx } from './fthry_clsx.ChV9xqsO.js';
|
|
6
7
|
import { jsxs, jsx as jsx$1 } from 'react/jsx-runtime';
|
|
7
8
|
import * as ReactDOM from 'react-dom';
|
|
8
9
|
import ReactDOM__default from 'react-dom';
|
|
9
|
-
import { a as IMask, I as IMaskInput } from './fthry_input.
|
|
10
|
+
import { a as IMask, I as IMaskInput } from './fthry_input.D94H5xWk.js';
|
|
10
11
|
import 'react-dom/client';
|
|
11
12
|
import 'jszip';
|
|
12
|
-
import './fthry_Overlay.
|
|
13
|
-
import './fthry_index.
|
|
13
|
+
import './fthry_Overlay.D_UvdjmJ.js';
|
|
14
|
+
import './fthry_index.DJwLQi_x.js';
|
|
14
15
|
|
|
15
16
|
var PORTAL_CONTAINER_CLASS = '.react-datepicker__portal';
|
|
16
17
|
var DATEPICKER_PADDING_TOP_VALUE = '--datepicker-pad-top';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { j as jsxs, _ as __assign,
|
|
1
|
+
import { j as jsxs, _ as __assign, a as jsx, D as DROPDOWN_Z_INDEX, c as __read, u as useBorder, y as getFieldValue, z as stringifyWithNull, h as hoverStylesGuard, b as iosScrollOnFocus, F as FORM_Z_INDEX, r as resetStyles, A as emailPatternStr } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
import { memo, useRef, useState } from 'react';
|
|
3
|
-
import { P as Placeholder } from './fthry_Placeholder.
|
|
4
|
-
import { I as InlineTooltip } from './fthry_InlineTooltip.
|
|
5
|
-
import { O as Overlay } from './fthry_Overlay.
|
|
6
|
-
import { u as useElementSize } from './fthry_useElementSize.
|
|
7
|
-
import { S as ShowEyeIcon, a as ShowEyeIcon$1 } from './fthry_ShowEyeIcon.
|
|
8
|
-
import { I as IMaskInput } from './fthry_input.
|
|
3
|
+
import { P as Placeholder } from './fthry_Placeholder.CsY-scXc.js';
|
|
4
|
+
import { I as InlineTooltip } from './fthry_InlineTooltip.CP92bAZA.js';
|
|
5
|
+
import { O as Overlay } from './fthry_Overlay.D_UvdjmJ.js';
|
|
6
|
+
import { u as useElementSize } from './fthry_useElementSize.C7pCjEY0.js';
|
|
7
|
+
import { S as ShowEyeIcon, a as ShowEyeIcon$1 } from './fthry_ShowEyeIcon.CN_11GCA.js';
|
|
8
|
+
import { I as IMaskInput } from './fthry_input.D94H5xWk.js';
|
|
9
9
|
import 'react/jsx-runtime';
|
|
10
10
|
import 'react-dom/client';
|
|
11
11
|
import 'jszip';
|
|
12
12
|
import 'react-dom';
|
|
13
|
-
import './fthry_index.
|
|
13
|
+
import './fthry_index.DJwLQi_x.js';
|
|
14
14
|
|
|
15
15
|
function TextAutocomplete(_a) {
|
|
16
16
|
var _b = _a.allOptions, allOptions = _b === void 0 ? [] : _b, showOptions = _a.showOptions, _c = _a.onSelect, onSelect = _c === void 0 ? function () { } : _c, _d = _a.onHide, onHide = _d === void 0 ? function () { } : _d, _e = _a.onInputFocus, onInputFocus = _e === void 0 ? function () { } : _e, _f = _a.value, value = _f === void 0 ? '' : _f, containerRef = _a.containerRef, responsiveStyles = _a.responsiveStyles, listItemRef = _a.listItemRef, children = _a.children;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState, useRef, useEffect } from 'react';
|
|
3
|
-
import { I as InlineTooltip } from './fthry_InlineTooltip.d3TjV-eF.js';
|
|
4
|
-
import { u as useSalesforceSync } from './fthry_useSalesforceSync.D0nLeVuk.js';
|
|
5
|
-
import 'react/jsx-runtime';
|
|
6
|
-
import 'react-dom/client';
|
|
7
|
-
import 'jszip';
|
|
8
|
-
import 'react-dom';
|
|
9
|
-
import './fthry_Overlay.C9ZwYfq9.js';
|
|
1
|
+
import { a as jsx, _ as __assign } from './fthry_index.DgVE4qW7.js';
|
|
10
2
|
|
|
11
3
|
var ae = [
|
|
12
4
|
{ name: 'Abu Dhabi', code: 'AZ' },
|
|
@@ -1328,99 +1320,4 @@ function getStateOptions(country, shortcode, territories) {
|
|
|
1328
1320
|
});
|
|
1329
1321
|
}
|
|
1330
1322
|
|
|
1331
|
-
|
|
1332
|
-
var _b, _c, _d;
|
|
1333
|
-
var _e;
|
|
1334
|
-
var element = _a.element, responsiveStyles = _a.responsiveStyles, fieldLabel = _a.fieldLabel, inlineError = _a.inlineError, _f = _a.required, required = _f === void 0 ? false : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.fieldVal, fieldVal = _h === void 0 ? '' : _h, _j = _a.repeatIndex, repeatIndex = _j === void 0 ? null : _j, _k = _a.countryCode, countryCode = _k === void 0 ? '' : _k, editMode = _a.editMode, rightToLeft = _a.rightToLeft, _l = _a.onChange, onChange = _l === void 0 ? function () { } : _l, _m = _a.setRef, setRef = _m === void 0 ? function () { } : _m, _o = _a.elementProps, elementProps = _o === void 0 ? {} : _o, children = _a.children;
|
|
1335
|
-
var _p = useBorder({
|
|
1336
|
-
element: element,
|
|
1337
|
-
error: inlineError,
|
|
1338
|
-
breakpoint: responsiveStyles.getMobileBreakpoint()
|
|
1339
|
-
}), borderStyles = _p.borderStyles, customBorder = _p.customBorder;
|
|
1340
|
-
var _q = __read(useState(false), 2), focused = _q[0], setFocused = _q[1];
|
|
1341
|
-
var _r = __read(useState(null), 2), curCountry = _r[0], setCurCountry = _r[1];
|
|
1342
|
-
var containerRef = useRef(null);
|
|
1343
|
-
var servar = element.servar;
|
|
1344
|
-
var short = servar.metadata.store_abbreviation;
|
|
1345
|
-
var _s = useSalesforceSync(servar.metadata.salesforce_sync, editMode), dynamicOptions = _s.dynamicOptions, loadingDynamicOptions = _s.loadingDynamicOptions, shouldSalesforceSync = _s.shouldSalesforceSync;
|
|
1346
|
-
useEffect(function () {
|
|
1347
|
-
if (servar.type === 'gmap_state') {
|
|
1348
|
-
var code = countryCode.toLowerCase() || servar.metadata.default_country;
|
|
1349
|
-
if (code && fieldVal && !hasState(code, fieldVal, short, true)) {
|
|
1350
|
-
fieldVal = '';
|
|
1351
|
-
onChange({ target: { value: fieldVal } });
|
|
1352
|
-
}
|
|
1353
|
-
setCurCountry(code || 'us');
|
|
1354
|
-
}
|
|
1355
|
-
}, [countryCode, setCurCountry]);
|
|
1356
|
-
var options;
|
|
1357
|
-
if (shouldSalesforceSync) {
|
|
1358
|
-
options = dynamicOptions.map(function (option) { return (jsx("option", __assign({ value: option.value }, { children: option.label }), option.value)); });
|
|
1359
|
-
}
|
|
1360
|
-
else if (servar.type === 'gmap_state') {
|
|
1361
|
-
if (curCountry === null)
|
|
1362
|
-
options = [];
|
|
1363
|
-
else if (fieldVal && !hasState(curCountry, fieldVal, short)) {
|
|
1364
|
-
// If user selected a country without states defined
|
|
1365
|
-
options = [
|
|
1366
|
-
jsx("option", __assign({ value: fieldVal }, { children: fieldVal }), fieldVal)
|
|
1367
|
-
];
|
|
1368
|
-
}
|
|
1369
|
-
else
|
|
1370
|
-
options = getStateOptions(curCountry, short, servar.metadata.include_territories);
|
|
1371
|
-
}
|
|
1372
|
-
else if (servar.type === 'gmap_country') {
|
|
1373
|
-
var translation_1 = element.properties.translate || {};
|
|
1374
|
-
options = countryData.map(function (_a) {
|
|
1375
|
-
var countryCode = _a.countryCode, countryName = _a.countryName;
|
|
1376
|
-
var val = servar.metadata.store_abbreviation
|
|
1377
|
-
? countryCode
|
|
1378
|
-
: countryName;
|
|
1379
|
-
var label = translation_1[countryCode] || countryName;
|
|
1380
|
-
return (jsx("option", __assign({ value: val }, { children: label }), countryCode));
|
|
1381
|
-
});
|
|
1382
|
-
}
|
|
1383
|
-
else {
|
|
1384
|
-
var labels_1 = servar.metadata.option_labels;
|
|
1385
|
-
var tooltips_1 = servar.metadata.option_tooltips;
|
|
1386
|
-
if (repeatIndex !== null && ((_e = servar.metadata.repeat_options) === null || _e === void 0 ? void 0 : _e[repeatIndex])) {
|
|
1387
|
-
var repeatOptions = servar.metadata.repeat_options[repeatIndex];
|
|
1388
|
-
options = repeatOptions.map(function (option) {
|
|
1389
|
-
var _a, _b, _c;
|
|
1390
|
-
var value = (_a = option.value) !== null && _a !== void 0 ? _a : option;
|
|
1391
|
-
var label = (_b = option.label) !== null && _b !== void 0 ? _b : option;
|
|
1392
|
-
var tooltip = (_c = option.tooltip) !== null && _c !== void 0 ? _c : '';
|
|
1393
|
-
return (jsx("option", __assign({ value: value, title: tooltip }, { children: label }), value));
|
|
1394
|
-
});
|
|
1395
|
-
}
|
|
1396
|
-
else {
|
|
1397
|
-
options = servar.metadata.options.map(function (option, index) {
|
|
1398
|
-
var _a, _b;
|
|
1399
|
-
var label = labels_1 && labels_1[index] ? labels_1[index] : option;
|
|
1400
|
-
var tooltip = (_a = tooltips_1 === null || tooltips_1 === void 0 ? void 0 : tooltips_1[index]) !== null && _a !== void 0 ? _a : '';
|
|
1401
|
-
var allVals = ((_b = fieldValues[servar.key]) !== null && _b !== void 0 ? _b : []);
|
|
1402
|
-
if (servar.repeated &&
|
|
1403
|
-
servar.metadata.unique_repeat_options &&
|
|
1404
|
-
option !== fieldVal &&
|
|
1405
|
-
allVals.includes(option))
|
|
1406
|
-
return null;
|
|
1407
|
-
return (jsx("option", __assign({ value: option, title: tooltip }, { children: label }), "".concat(index).concat(option)));
|
|
1408
|
-
});
|
|
1409
|
-
}
|
|
1410
|
-
}
|
|
1411
|
-
var hasTooltip = !!element.properties.tooltipText;
|
|
1412
|
-
var chevronPosition = hasTooltip ? 30 : 10;
|
|
1413
|
-
responsiveStyles.applyFontStyles('field', !fieldVal);
|
|
1414
|
-
return (jsxs("div", __assign({ ref: containerRef, css: __assign({ maxWidth: '100%', width: '100%', height: '100%', position: 'relative', pointerEvents: editMode ? 'none' : 'auto' }, responsiveStyles.getTarget('fc')) }, elementProps, { children: [children, fieldLabel, jsxs("div", __assign({ css: __assign(__assign(__assign({ position: 'relative', width: '100%', whiteSpace: 'nowrap',
|
|
1415
|
-
// Prevent placeholder overflow
|
|
1416
|
-
overflowX: 'clip' }, responsiveStyles.getTarget('sub-fc')), (disabled ? responsiveStyles.getTarget('disabled') : {})), { '&:hover': hoverStylesGuard(disabled
|
|
1417
|
-
? {}
|
|
1418
|
-
: __assign(__assign({}, responsiveStyles.getTarget('hover')), borderStyles.hover)), '&&': focused
|
|
1419
|
-
? __assign(__assign({}, responsiveStyles.getTarget('active')), borderStyles.active) : {} }) }, { children: [jsx(Global, { styles: css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n option {\n color: black;\n }\n "], ["\n option {\n color: black;\n }\n "]))) }), customBorder, jsxs("select", __assign({ css: __assign(__assign(__assign({}, resetStyles), responsiveStyles.getTarget('field')), (_b = { width: '100%', height: '100%', border: 'none', margin: 0, boxShadow: 'none', backgroundColor: 'transparent', appearance: 'none', WebkitAppearance: 'none', MozAppearance: 'none', backgroundImage: "url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M0 0.776454L0.970744 0L5 4.2094L9.02926 0L10 0.776454L5 6L0 0.776454Z' fill='%23".concat(element.styles.font_color, "'/></svg>\")"), backgroundRepeat: 'no-repeat', backgroundPosition: "".concat(rightToLeft ? 'left' : 'right', " ").concat(chevronPosition, "px center") }, _b[rightToLeft ? 'paddingLeft' : 'paddingRight'] = 30, _b.position = 'relative', _b)), id: servar.key, value: fieldVal !== null && fieldVal !== void 0 ? fieldVal : '', required: required, disabled: disabled || loadingDynamicOptions, "aria-label": element.properties.aria_label, onChange: onChange, onFocus: function (event) {
|
|
1420
|
-
setFocused(true);
|
|
1421
|
-
iosScrollOnFocus(event);
|
|
1422
|
-
}, onBlur: function () { return setFocused(false); }, ref: setRef }, { children: [jsx("option", { value: '', disabled: required }, ''), options] })), jsx("span", __assign({ css: __assign(__assign(__assign((_c = { position: 'absolute', pointerEvents: 'none' }, _c[rightToLeft ? 'right' : 'left'] = '0.75rem', _c.transition = '0.2s ease all', _c.top = '50%', _c), responsiveStyles.getTarget('placeholder')), (fieldVal ? responsiveStyles.getTarget('placeholderFocus') : {})), (_d = {}, _d["input:focus + &"] = __assign(__assign({}, responsiveStyles.getTarget('placeholderFocus')), responsiveStyles.getTarget('placeholderActive')), _d)) }, { children: element.properties.placeholder || '' })), jsx(InlineTooltip, { containerRef: containerRef, id: element.id, text: element.properties.tooltipText, responsiveStyles: responsiveStyles, repeat: element.repeat })] }))] })));
|
|
1423
|
-
}
|
|
1424
|
-
var templateObject_1;
|
|
1425
|
-
|
|
1426
|
-
export { DropdownField as default };
|
|
1323
|
+
export { getStateOptions as g, hasState as h, stateMap as s };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { j as jsxs, _ as __assign,
|
|
1
|
+
import { j as jsxs, _ as __assign, a as jsx, b as iosScrollOnFocus, r as resetStyles } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
import { useRef, useMemo, useEffect } from 'react';
|
|
3
|
-
import { F as FormControl } from './fthry_FormControl.
|
|
4
|
-
import { applyCheckableInputStyles, composeCheckableInputStyle, applyHeightWidthMarginByFontSize } from './fthry_index.
|
|
5
|
-
import { I as InlineTooltip } from './fthry_InlineTooltip.
|
|
6
|
-
import { u as useSalesforceSync } from './fthry_useSalesforceSync.
|
|
3
|
+
import { F as FormControl } from './fthry_FormControl.BEWaNHn3.js';
|
|
4
|
+
import { applyCheckableInputStyles, composeCheckableInputStyle, applyHeightWidthMarginByFontSize } from './fthry_index.BK2Hnx9K.js';
|
|
5
|
+
import { I as InlineTooltip } from './fthry_InlineTooltip.CP92bAZA.js';
|
|
6
|
+
import { u as useSalesforceSync } from './fthry_useSalesforceSync.Bj6SvTIc.js';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import 'react-dom/client';
|
|
9
9
|
import 'jszip';
|
|
10
10
|
import 'react-dom';
|
|
11
|
-
import './fthry_Overlay.
|
|
11
|
+
import './fthry_Overlay.D_UvdjmJ.js';
|
|
12
12
|
|
|
13
13
|
var applyCheckboxGroupStyles = function (element, responsiveStyles) {
|
|
14
14
|
responsiveStyles.addTargets('checkboxGroup');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as featheryDoc, Z as devicePixelRatio, C as getDefaultExportFromCjs, c as __read, j as jsxs, a as jsx, _ as __assign, q as Fragment, l as __awaiter, m as __generator, $ as toBase64, H as debounce, a0 as MODAL_Z_INDEX, N as CloseIcon, a1 as dataURLToFile, F as FORM_Z_INDEX, E as ErrorInput } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
import React__default, { Component, forwardRef, useState, useRef, useImperativeHandle, useEffect, useCallback, Suspense } from 'react';
|
|
3
|
-
import { P as PropTypes } from './fthry_index.
|
|
3
|
+
import { P as PropTypes } from './fthry_index.DJwLQi_x.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react-dom/client';
|
|
6
6
|
import 'jszip';
|
|
@@ -1477,7 +1477,7 @@ function SignatureField(_a) {
|
|
|
1477
1477
|
useEffect(function () {
|
|
1478
1478
|
if (!global.webfontloaderPromise)
|
|
1479
1479
|
global.webfontloaderPromise = import(
|
|
1480
|
-
/* webpackChunkName: "webfontloader" */ './fthry_webfontloader.
|
|
1480
|
+
/* webpackChunkName: "webfontloader" */ './fthry_webfontloader.CT2fb2Df.js').then(function (n) { return n.w; });
|
|
1481
1481
|
global.webfontloaderPromise.then(function (WebFont) {
|
|
1482
1482
|
WebFont.load({ google: { families: ['La Belle Aurore'] } });
|
|
1483
1483
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as __read, u as useBorder, j as jsxs, _ as __assign, h as hoverStylesGuard, a as jsx, r as resetStyles } from './fthry_index.DgVE4qW7.js';
|
|
2
2
|
import { memo, useState, useRef } from 'react';
|
|
3
|
-
import { P as Placeholder } from './fthry_Placeholder.
|
|
4
|
-
import { I as InlineTooltip } from './fthry_InlineTooltip.
|
|
3
|
+
import { P as Placeholder } from './fthry_Placeholder.CsY-scXc.js';
|
|
4
|
+
import { I as InlineTooltip } from './fthry_InlineTooltip.CP92bAZA.js';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import 'react-dom/client';
|
|
7
7
|
import 'jszip';
|
|
8
8
|
import 'react-dom';
|
|
9
|
-
import './fthry_Overlay.
|
|
9
|
+
import './fthry_Overlay.D_UvdjmJ.js';
|
|
10
10
|
|
|
11
11
|
function TextArea(_a) {
|
|
12
12
|
var element = _a.element, responsiveStyles = _a.responsiveStyles, fieldLabel = _a.fieldLabel, _b = _a.elementProps, elementProps = _b === void 0 ? {} : _b, _c = _a.required, required = _c === void 0 ? false : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, editMode = _a.editMode, _e = _a.onChange, onChange = _e === void 0 ? function () { } : _e, _f = _a.setRef, setRef = _f === void 0 ? function () { } : _f, _g = _a.rawValue, rawValue = _g === void 0 ? '' : _g, inlineError = _a.inlineError, _h = _a.repeatIndex, repeatIndex = _h === void 0 ? null : _h, children = _a.children;
|