@bikdotai/bik-component-library 0.0.858-beta.1 → 0.0.859-beta.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/README.md +4 -4
- package/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditor.js +23 -23
- package/dist/cjs/components/WhatsAppTextEditor/WhatsAppTextEditor.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/AiTextArea.js +1 -1
- package/dist/cjs/components/agent-builder/components/AiTextArea.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/ToolInstructionsField.js +2 -2
- package/dist/cjs/components/agent-builder/components/ToolInstructionsField.js.map +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsTrend.js.map +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/ChartLayout.js +2 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/ChartLayout.js.map +1 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.js +2 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.js.map +1 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.js +2 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.js.map +1 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/FunnelChart/funnelGeometry.js +2 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/FunnelChart/funnelGeometry.js.map +1 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js.map +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.model.js.map +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/chartPalette.js +2 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/chartPalette.js.map +1 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/formatChartValue.js +2 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/formatChartValue.js.map +1 -0
- package/dist/cjs/components/bik-chatbot/components/ChatWindow.js +20 -20
- package/dist/cjs/components/bik-chatbot/components/ChatWindow.js.map +1 -1
- package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js +2 -2
- package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js.map +1 -1
- package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js +2 -2
- package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js.map +1 -1
- package/dist/cjs/components/feature-announcements/MinorUpdatePopup.js +1 -1
- package/dist/cjs/components/feature-announcements/MinorUpdatePopup.js.map +1 -1
- package/dist/cjs/components/input/ChipInput.js +1 -1
- package/dist/cjs/components/input/ChipInput.js.map +1 -1
- package/dist/cjs/components/input/Input-helper.js +1 -1
- package/dist/cjs/components/input/Input-helper.js.map +1 -1
- package/dist/cjs/components/input/Input.js +1 -1
- package/dist/cjs/components/input/Input.js.map +1 -1
- package/dist/cjs/components/plans/SubscriptionPlanSelector.js +5 -5
- package/dist/cjs/components/plans/SubscriptionPlanSelector.js.map +1 -1
- package/dist/cjs/editor/BikEditor.js +1 -1
- package/dist/cjs/editor/BikEditor.js.map +1 -1
- package/dist/cjs/editor/BikEditor.utils.js +3 -3
- package/dist/cjs/editor/BikEditor.utils.js.map +1 -1
- package/dist/cjs/editor/extensions/buildExtensions.js +2 -2
- package/dist/cjs/editor/extensions/buildExtensions.js.map +1 -1
- package/dist/cjs/editor/extensions/htmlTagStrip/HtmlTagStripExtension.js +2 -0
- package/dist/cjs/editor/extensions/htmlTagStrip/HtmlTagStripExtension.js.map +1 -0
- package/dist/cjs/helpers/sanitize.js +2 -0
- package/dist/cjs/helpers/sanitize.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditor.js +144 -143
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditor.js.map +1 -1
- package/dist/esm/components/agent-builder/components/AiTextArea.js +24 -23
- package/dist/esm/components/agent-builder/components/AiTextArea.js.map +1 -1
- package/dist/esm/components/agent-builder/components/ToolInstructionsField.js +38 -37
- package/dist/esm/components/agent-builder/components/ToolInstructionsField.js.map +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.d.ts +3 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +182 -172
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.js.map +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/ChartLayout.d.ts +16 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/ChartLayout.js +69 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/ChartLayout.js.map +1 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.d.ts +3 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.js +166 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.js.map +1 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.model.d.ts +21 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.d.ts +3 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.js +176 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.js.map +1 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.model.d.ts +19 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/funnelGeometry.d.ts +23 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/funnelGeometry.js +48 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/funnelGeometry.js.map +1 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js.map +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.model.d.ts +1 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.model.js.map +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/chartPalette.d.ts +3 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/chartPalette.js +18 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/chartPalette.js.map +1 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/formatChartValue.d.ts +4 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/formatChartValue.js +13 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/formatChartValue.js.map +1 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/index.d.ts +4 -0
- package/dist/esm/components/bik-chatbot/components/ChatWindow.js +54 -53
- package/dist/esm/components/bik-chatbot/components/ChatWindow.js.map +1 -1
- package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js +346 -420
- package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js.map +1 -1
- package/dist/esm/components/feature-announcements/MajorUpdatePopup.js +35 -33
- package/dist/esm/components/feature-announcements/MajorUpdatePopup.js.map +1 -1
- package/dist/esm/components/feature-announcements/MinorUpdatePopup.js +48 -47
- package/dist/esm/components/feature-announcements/MinorUpdatePopup.js.map +1 -1
- package/dist/esm/components/feature-announcements/types/props.types.d.ts +2 -2
- package/dist/esm/components/input/ChipInput.js +41 -40
- package/dist/esm/components/input/ChipInput.js.map +1 -1
- package/dist/esm/components/input/Input-helper.d.ts +7 -0
- package/dist/esm/components/input/Input-helper.js +16 -25
- package/dist/esm/components/input/Input-helper.js.map +1 -1
- package/dist/esm/components/input/Input.js +59 -57
- package/dist/esm/components/input/Input.js.map +1 -1
- package/dist/esm/components/input/Input.model.d.ts +1 -0
- package/dist/esm/components/plans/SubscriptionPlanSelector.js +42 -40
- package/dist/esm/components/plans/SubscriptionPlanSelector.js.map +1 -1
- package/dist/esm/editor/BikEditor.js +221 -217
- package/dist/esm/editor/BikEditor.js.map +1 -1
- package/dist/esm/editor/BikEditor.utils.d.ts +1 -1
- package/dist/esm/editor/BikEditor.utils.js +141 -140
- package/dist/esm/editor/BikEditor.utils.js.map +1 -1
- package/dist/esm/editor/extensions/buildExtensions.js +35 -25
- package/dist/esm/editor/extensions/buildExtensions.js.map +1 -1
- package/dist/esm/editor/extensions/htmlTagStrip/HtmlTagStripExtension.d.ts +13 -0
- package/dist/esm/editor/extensions/htmlTagStrip/HtmlTagStripExtension.js +64 -0
- package/dist/esm/editor/extensions/htmlTagStrip/HtmlTagStripExtension.js.map +1 -0
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/sanitize.d.ts +32 -0
- package/dist/esm/helpers/sanitize.js +207 -0
- package/dist/esm/helpers/sanitize.js.map +1 -0
- package/dist/esm/icons/index.d.ts +1 -1
- package/dist/esm/index.js +429 -415
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolInstructionsField.js","sources":["../../../../../src/components/agent-builder/components/ToolInstructionsField.tsx"],"sourcesContent":["import { WandSparkles } from '@src/icons';\nimport React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { Button } from '@src/components/button';\nimport { TitleSmall } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport type { VariableListInterfaceV3 } from '../../variable-picker-v3/model';\nimport {\n\tAiTextAreaInput,\n\tAiTextAreaShell,\n\tFieldBlock,\n} from '../AgentBuilder.styled';\nimport { MentionEditor } from './MentionEditor';\n\ninterface ToolInstructionsFieldProps {\n\tlabel: string;\n\tvalue: string;\n\tonChange: (value: string) => void;\n\tmaxLength: number;\n\tplaceholder?: string;\n\tminHeight?: string;\n\t/** \"Improve with AI\" — resolves with rewritten text. Omit to hide the button. */\n\tonImprove?: (text: string) => Promise<string>;\n\t/**\n\t * Variable catalog. When non-empty the field upgrades from a plain textarea\n\t * to a variables-only `@` mention editor: typing `@` opens the variable\n\t * categories directly (Variables is the sole category, so the picker skips\n\t * the Tools / Sub-agent root), and picks render as chips persisted as\n\t * `{{variable:<name>}}` tokens.\n\t */\n\tvariablesData?: VariableListInterfaceV3[];\n\t'data-test'?: string;\n}\n\n/**\n * A labelled multiline field with an inline \"Improve with AI\" action pinned to\n * the bottom-left of the box (Figma: Rest API / Handover-to-email drawers). The\n * button is hidden when `onImprove` is omitted.\n */\nexport const ToolInstructionsField: React.FC<ToolInstructionsFieldProps> = ({\n\tlabel,\n\tvalue,\n\tonChange,\n\tmaxLength,\n\tplaceholder,\n\tminHeight = '120px',\n\tonImprove,\n\tvariablesData,\n\t...rest\n}) => {\n\tconst [focused, setFocused] = useState(false);\n\tconst [improving, setImproving] = useState(false);\n\t// Bumped when \"Improve with AI\" replaces the text externally — the mention\n\t// editor only reads `value` on (re)mount, so it must be remounted.\n\tconst [editorEpoch, setEditorEpoch] = useState(0);\n\n\tconst withVariables = (variablesData?.length ?? 0) > 0;\n\n\tconst handleImprove = async () => {\n\t\tif (!onImprove || improving || value.trim().length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tsetImproving(true);\n\t\ttry {\n\t\t\tonChange(await onImprove(value));\n\t\t\tif (withVariables) {\n\t\t\t\tsetEditorEpoch((e) => e + 1);\n\t\t\t}\n\t\t} finally {\n\t\t\tsetImproving(false);\n\t\t}\n\t};\n\n\tconst improveAction = onImprove ? (\n\t\t<ImproveRow>\n\t\t\t<Button\n\t\t\t\tdata-test={`${rest['data-test'] ?? 'tool'}-improve`}\n\t\t\t\tbuttonType=\"ai\"\n\t\t\t\tsize=\"small\"\n\t\t\t\tLeadingIcon={WandSparkles}\n\t\t\t\tbuttonText=\"Improve with AI\"\n\t\t\t\tisLoading={improving}\n\t\t\t\tdisabled={improving || value.trim().length === 0}\n\t\t\t\tonClick={handleImprove}\n\t\t\t/>\n\t\t</ImproveRow>\n\t) : undefined;\n\n\t// Variables enabled → the mention-editor variant. `mentionItems` / tool\n\t// hooks stay empty so Variables is the picker's ONLY category and `@` lands\n\t// straight in the variable list.\n\tif (withVariables) {\n\t\treturn (\n\t\t\t<MentionEditor\n\t\t\t\tdata-test={rest['data-test']}\n\t\t\t\tlabel={label}\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={onChange}\n\t\t\t\tmaxLength={maxLength}\n\t\t\t\tplaceholder={placeholder}\n\t\t\t\tminHeight={minHeight}\n\t\t\t\tresetKey={`improve-${editorEpoch}`}\n\t\t\t\tmentionItems={[]}\n\t\t\t\ttools={[]}\n\t\t\t\tvariablesData={variablesData}\n\t\t\t\t// Drawers get the same focused-field \"+ Add data\" affordance as the\n\t\t\t\t// main Step-3 editors.\n\t\t\t\taddDataButton\n\t\t\t\taction={improveAction}\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<FieldBlock>\n\t\t\t<TitleSmall color={COLORS.content.primary}>{label}</TitleSmall>\n\t\t\t<AiTextAreaShell focused={focused} minHeight={minHeight}>\n\t\t\t\t<AiTextAreaInput\n\t\t\t\t\tdata-test={rest['data-test']}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\tmaxLength={maxLength}\n\t\t\t\t\tonFocus={() => setFocused(true)}\n\t\t\t\t\tonBlur={() => setFocused(false)}\n\t\t\t\t\tonChange={(e) => onChange(e.target.value)}\n\t\t\t\t/>\n\t\t\t\t{improveAction}\n\t\t\t</AiTextAreaShell>\n\t\t</FieldBlock>\n\t);\n};\n\nconst ImproveRow = styled.div`\n\tdisplay: flex;\n\talign-items: center;\n`;\n"],"names":["ToolInstructionsField","label","value","onChange","maxLength","placeholder","minHeight","onImprove","variablesData","rest","focused","setFocused","useState","improving","setImproving","editorEpoch","setEditorEpoch","withVariables","handleImprove","e","improveAction","jsx","ImproveRow","Button","WandSparkles","MentionEditor","FieldBlock","TitleSmall","COLORS","jsxs","AiTextAreaShell","AiTextAreaInput","styled"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ToolInstructionsField.js","sources":["../../../../../src/components/agent-builder/components/ToolInstructionsField.tsx"],"sourcesContent":["import { stripHtmlTags } from '@src/helpers/sanitize';\nimport { WandSparkles } from '@src/icons';\nimport React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { Button } from '@src/components/button';\nimport { TitleSmall } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport type { VariableListInterfaceV3 } from '../../variable-picker-v3/model';\nimport {\n\tAiTextAreaInput,\n\tAiTextAreaShell,\n\tFieldBlock,\n} from '../AgentBuilder.styled';\nimport { MentionEditor } from './MentionEditor';\n\ninterface ToolInstructionsFieldProps {\n\tlabel: string;\n\tvalue: string;\n\tonChange: (value: string) => void;\n\tmaxLength: number;\n\tplaceholder?: string;\n\tminHeight?: string;\n\t/** \"Improve with AI\" — resolves with rewritten text. Omit to hide the button. */\n\tonImprove?: (text: string) => Promise<string>;\n\t/**\n\t * Variable catalog. When non-empty the field upgrades from a plain textarea\n\t * to a variables-only `@` mention editor: typing `@` opens the variable\n\t * categories directly (Variables is the sole category, so the picker skips\n\t * the Tools / Sub-agent root), and picks render as chips persisted as\n\t * `{{variable:<name>}}` tokens.\n\t */\n\tvariablesData?: VariableListInterfaceV3[];\n\t'data-test'?: string;\n}\n\n/**\n * A labelled multiline field with an inline \"Improve with AI\" action pinned to\n * the bottom-left of the box (Figma: Rest API / Handover-to-email drawers). The\n * button is hidden when `onImprove` is omitted.\n */\nexport const ToolInstructionsField: React.FC<ToolInstructionsFieldProps> = ({\n\tlabel,\n\tvalue,\n\tonChange,\n\tmaxLength,\n\tplaceholder,\n\tminHeight = '120px',\n\tonImprove,\n\tvariablesData,\n\t...rest\n}) => {\n\tconst [focused, setFocused] = useState(false);\n\tconst [improving, setImproving] = useState(false);\n\t// Bumped when \"Improve with AI\" replaces the text externally — the mention\n\t// editor only reads `value` on (re)mount, so it must be remounted.\n\tconst [editorEpoch, setEditorEpoch] = useState(0);\n\n\tconst withVariables = (variablesData?.length ?? 0) > 0;\n\n\tconst handleImprove = async () => {\n\t\tif (!onImprove || improving || value.trim().length === 0) {\n\t\t\treturn;\n\t\t}\n\t\tsetImproving(true);\n\t\ttry {\n\t\t\tonChange(await onImprove(value));\n\t\t\tif (withVariables) {\n\t\t\t\tsetEditorEpoch((e) => e + 1);\n\t\t\t}\n\t\t} finally {\n\t\t\tsetImproving(false);\n\t\t}\n\t};\n\n\tconst improveAction = onImprove ? (\n\t\t<ImproveRow>\n\t\t\t<Button\n\t\t\t\tdata-test={`${rest['data-test'] ?? 'tool'}-improve`}\n\t\t\t\tbuttonType=\"ai\"\n\t\t\t\tsize=\"small\"\n\t\t\t\tLeadingIcon={WandSparkles}\n\t\t\t\tbuttonText=\"Improve with AI\"\n\t\t\t\tisLoading={improving}\n\t\t\t\tdisabled={improving || value.trim().length === 0}\n\t\t\t\tonClick={handleImprove}\n\t\t\t/>\n\t\t</ImproveRow>\n\t) : undefined;\n\n\t// Variables enabled → the mention-editor variant. `mentionItems` / tool\n\t// hooks stay empty so Variables is the picker's ONLY category and `@` lands\n\t// straight in the variable list.\n\tif (withVariables) {\n\t\treturn (\n\t\t\t<MentionEditor\n\t\t\t\tdata-test={rest['data-test']}\n\t\t\t\tlabel={label}\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={onChange}\n\t\t\t\tmaxLength={maxLength}\n\t\t\t\tplaceholder={placeholder}\n\t\t\t\tminHeight={minHeight}\n\t\t\t\tresetKey={`improve-${editorEpoch}`}\n\t\t\t\tmentionItems={[]}\n\t\t\t\ttools={[]}\n\t\t\t\tvariablesData={variablesData}\n\t\t\t\t// Drawers get the same focused-field \"+ Add data\" affordance as the\n\t\t\t\t// main Step-3 editors.\n\t\t\t\taddDataButton\n\t\t\t\taction={improveAction}\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<FieldBlock>\n\t\t\t<TitleSmall color={COLORS.content.primary}>{label}</TitleSmall>\n\t\t\t<AiTextAreaShell focused={focused} minHeight={minHeight}>\n\t\t\t\t<AiTextAreaInput\n\t\t\t\t\tdata-test={rest['data-test']}\n\t\t\t\t\tvalue={value}\n\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\tmaxLength={maxLength}\n\t\t\t\t\tonFocus={() => setFocused(true)}\n\t\t\t\t\tonBlur={() => setFocused(false)}\n\t\t\t\t\tonChange={(e) => onChange(stripHtmlTags(e.target.value))}\n\t\t\t\t/>\n\t\t\t\t{improveAction}\n\t\t\t</AiTextAreaShell>\n\t\t</FieldBlock>\n\t);\n};\n\nconst ImproveRow = styled.div`\n\tdisplay: flex;\n\talign-items: center;\n`;\n"],"names":["ToolInstructionsField","label","value","onChange","maxLength","placeholder","minHeight","onImprove","variablesData","rest","focused","setFocused","useState","improving","setImproving","editorEpoch","setEditorEpoch","withVariables","handleImprove","e","improveAction","jsx","ImproveRow","Button","WandSparkles","MentionEditor","FieldBlock","TitleSmall","COLORS","jsxs","AiTextAreaShell","AiTextAreaInput","stripHtmlTags","styled"],"mappings":";;;;;;;;;;AAwCO,MAAMA,IAA8D,CAAC;AAAA,EAC3E,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,GAAGC;AACJ,MAAM;AACL,QAAM,CAACC,GAASC,CAAU,IAAIC,EAAS,EAAK,GACtC,CAACC,GAAWC,CAAY,IAAIF,EAAS,EAAK,GAG1C,CAACG,GAAaC,CAAc,IAAIJ,EAAS,CAAC,GAE1CK,KAAiBT,GAAe,UAAU,KAAK,GAE/CU,IAAgB,YAAY;AACjC,QAAI,GAACX,KAAaM,KAAaX,EAAM,KAAA,EAAO,WAAW,IAGvD;AAAA,MAAAY,EAAa,EAAI;AACjB,UAAI;AACH,QAAAX,EAAS,MAAMI,EAAUL,CAAK,CAAC,GAC3Be,KACHD,EAAe,CAACG,MAAMA,IAAI,CAAC;AAAA,MAE7B,UAAA;AACC,QAAAL,EAAa,EAAK;AAAA,MACnB;AAAA;AAAA,EACD,GAEMM,IAAgBb,IACrB,gBAAAc,EAACC,GAAA,EACA,UAAA,gBAAAD;AAAA,IAACE;AAAA,IAAA;AAAA,MACA,aAAW,GAAGd,EAAK,WAAW,KAAK,MAAM;AAAA,MACzC,YAAW;AAAA,MACX,MAAK;AAAA,MACL,aAAae;AAAAA,MACb,YAAW;AAAA,MACX,WAAWX;AAAA,MACX,UAAUA,KAAaX,EAAM,KAAA,EAAO,WAAW;AAAA,MAC/C,SAASgB;AAAA,IAAA;AAAA,EAAA,GAEX,IACG;AAKJ,SAAID,IAEF,gBAAAI;AAAA,IAACI;AAAA,IAAA;AAAA,MACA,aAAWhB,EAAK,WAAW;AAAA,MAC3B,OAAAR;AAAA,MACA,OAAAC;AAAA,MACA,UAAAC;AAAA,MACA,WAAAC;AAAA,MACA,aAAAC;AAAA,MACA,WAAAC;AAAA,MACA,UAAU,WAAWS,CAAW;AAAA,MAChC,cAAc,CAAA;AAAA,MACd,OAAO,CAAA;AAAA,MACP,eAAAP;AAAA,MAGA,eAAa;AAAA,MACb,QAAQY;AAAA,IAAA;AAAA,EAAA,sBAMTM,GAAA,EACA,UAAA;AAAA,IAAA,gBAAAL,EAACM,GAAA,EAAW,OAAOC,EAAO,QAAQ,SAAU,UAAA3B,GAAM;AAAA,IAClD,gBAAA4B,EAACC,GAAA,EAAgB,SAAApB,GAAkB,WAAAJ,GAClC,UAAA;AAAA,MAAA,gBAAAe;AAAA,QAACU;AAAA,QAAA;AAAA,UACA,aAAWtB,EAAK,WAAW;AAAA,UAC3B,OAAAP;AAAA,UACA,aAAAG;AAAA,UACA,WAAAD;AAAA,UACA,SAAS,MAAMO,EAAW,EAAI;AAAA,UAC9B,QAAQ,MAAMA,EAAW,EAAK;AAAA,UAC9B,UAAU,CAACQ,MAAMhB,EAAS6B,EAAcb,EAAE,OAAO,KAAK,CAAC;AAAA,QAAA;AAAA,MAAA;AAAA,MAEvDC;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACD;AAEF,GAEME,IAAaW,EAAO;AAAA;AAAA;AAAA;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { Placement } from '../tooltips';
|
|
2
3
|
export interface AnalyticsTrendInterface {
|
|
3
4
|
title: string;
|
|
4
5
|
value?: number | string;
|
|
@@ -10,6 +11,8 @@ export interface AnalyticsTrendInterface {
|
|
|
10
11
|
customRange?: Date[];
|
|
11
12
|
type?: 'vertical' | 'horizontal';
|
|
12
13
|
tooltip?: string;
|
|
14
|
+
tooltipPlacement?: Placement;
|
|
15
|
+
tooltipWidth?: number;
|
|
13
16
|
card?: boolean;
|
|
14
17
|
rightSeparator?: boolean;
|
|
15
18
|
size?: 'big' | 'small';
|
|
@@ -1,87 +1,89 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { ShimmerComponentStyled as
|
|
4
|
-
import
|
|
5
|
-
import { COLORS as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { BodyCaption as
|
|
10
|
-
import { truncateValueForInternationalStore as
|
|
11
|
-
import { AnalyticsTrendContainer as
|
|
12
|
-
import { Tooltip as
|
|
13
|
-
import { Tag as
|
|
14
|
-
const
|
|
15
|
-
title:
|
|
16
|
-
value:
|
|
17
|
-
trendPercent:
|
|
1
|
+
import { jsx as t, jsxs as f, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import tt, { useState as _, useEffect as q } from "react";
|
|
3
|
+
import { ShimmerComponentStyled as V } from "../shimmer/ShimmerComponent/ShimmerStyled.js";
|
|
4
|
+
import et from "../../utils/DateUtils.js";
|
|
5
|
+
import { COLORS as i } from "../../constants/Theme.js";
|
|
6
|
+
import rt from "../../assets/icons/arrow_down.svg.js";
|
|
7
|
+
import nt from "../../assets/icons/arrow_up.svg.js";
|
|
8
|
+
import ot from "../../assets/icons/info.svg.js";
|
|
9
|
+
import { BodyCaption as it, TitleLarge as lt, TitleMedium as at, Caption as m } from "../TypographyStyle.js";
|
|
10
|
+
import { truncateValueForInternationalStore as G, truncateValueForIndianStore as H } from "./chart/utils/calcPercentage.js";
|
|
11
|
+
import { AnalyticsTrendContainer as dt, IconContainer as ct } from "./CommonStyles.js";
|
|
12
|
+
import { Tooltip as z } from "../tooltips/Tooltip.js";
|
|
13
|
+
import { Tag as x } from "../tag/Tag.js";
|
|
14
|
+
const Tt = ({
|
|
15
|
+
title: c,
|
|
16
|
+
value: n,
|
|
17
|
+
trendPercent: r,
|
|
18
18
|
type: a = "horizontal",
|
|
19
|
-
timeline:
|
|
20
|
-
customRange:
|
|
21
|
-
tooltip:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
timeline: o,
|
|
20
|
+
customRange: y,
|
|
21
|
+
tooltip: u,
|
|
22
|
+
tooltipPlacement: T = "right",
|
|
23
|
+
tooltipWidth: C = 300,
|
|
24
|
+
card: h = !0,
|
|
25
|
+
rightSeparator: s = !1,
|
|
26
|
+
size: D = "big",
|
|
27
|
+
share: l = !1,
|
|
26
28
|
formatVal: A,
|
|
27
29
|
prefixSymbol: d,
|
|
28
|
-
trailingIcon:
|
|
30
|
+
trailingIcon: p,
|
|
29
31
|
onTrailIconClick: M,
|
|
30
|
-
iconTooltipBody:
|
|
31
|
-
funnelPercent:
|
|
32
|
-
isLoading:
|
|
33
|
-
trendRaw:
|
|
34
|
-
trendRawString:
|
|
35
|
-
suffixText:
|
|
36
|
-
trendStyle:
|
|
37
|
-
trendContainerStyle:
|
|
38
|
-
trendIconStyle:
|
|
39
|
-
containerStyle:
|
|
40
|
-
prevTrendDiff:
|
|
41
|
-
relativePercentageDiff:
|
|
42
|
-
isInternationalStore:
|
|
43
|
-
Icon:
|
|
44
|
-
iconContainerStyle:
|
|
45
|
-
tooltipTimelineText:
|
|
46
|
-
customTimelineText:
|
|
32
|
+
iconTooltipBody: b,
|
|
33
|
+
funnelPercent: g,
|
|
34
|
+
isLoading: e,
|
|
35
|
+
trendRaw: F,
|
|
36
|
+
trendRawString: N,
|
|
37
|
+
suffixText: $,
|
|
38
|
+
trendStyle: J,
|
|
39
|
+
trendContainerStyle: K,
|
|
40
|
+
trendIconStyle: S,
|
|
41
|
+
containerStyle: L,
|
|
42
|
+
prevTrendDiff: I,
|
|
43
|
+
relativePercentageDiff: W,
|
|
44
|
+
isInternationalStore: j,
|
|
45
|
+
Icon: v,
|
|
46
|
+
iconContainerStyle: Q,
|
|
47
|
+
tooltipTimelineText: E,
|
|
48
|
+
customTimelineText: O
|
|
47
49
|
}) => {
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
)} ${
|
|
51
|
-
|
|
52
|
-
)} ${
|
|
50
|
+
const R = D === "big" ? lt : at, U = typeof r < "u" ? r < 0 ? "negative" : r === 0 ? "neutral" : "positive" : void 0, w = typeof r < "u" ? l ? Math.round(r) : Math.abs(Math.round(r)) : void 0, X = () => typeof n > "u" ? "--" : typeof n == "number" && A ? n > 999 ? j ? `${d ?? ""}${G(
|
|
51
|
+
n
|
|
52
|
+
)} ${$ ?? ""}` : `${d ?? ""}${H(
|
|
53
|
+
n
|
|
54
|
+
)} ${$ ?? ""}` : `${d ?? ""}${new Intl.NumberFormat("en-IN", {
|
|
53
55
|
maximumFractionDigits: 2
|
|
54
|
-
}).format(
|
|
55
|
-
const
|
|
56
|
-
return
|
|
56
|
+
}).format(n)} ${$ ?? ""}` : `${d ?? ""}${n} ${$ ?? ""}`, Y = (Z) => {
|
|
57
|
+
const k = Math.abs(Z);
|
|
58
|
+
return k % 1 !== 0 ? `${k.toFixed(1)} %` : `${k} %`;
|
|
57
59
|
};
|
|
58
60
|
return /* @__PURE__ */ t(
|
|
59
|
-
|
|
61
|
+
dt,
|
|
60
62
|
{
|
|
61
|
-
card:
|
|
63
|
+
card: h,
|
|
62
64
|
style: {
|
|
63
|
-
...
|
|
65
|
+
...L
|
|
64
66
|
},
|
|
65
|
-
children: /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ f(
|
|
66
68
|
"div",
|
|
67
69
|
{
|
|
68
70
|
style: {
|
|
69
71
|
display: "flex",
|
|
70
72
|
flexDirection: "row",
|
|
71
|
-
gap:
|
|
72
|
-
borderRightWidth:
|
|
73
|
-
borderRightColor:
|
|
73
|
+
gap: v ? 12 : 4,
|
|
74
|
+
borderRightWidth: s ? 1 : 0,
|
|
75
|
+
borderRightColor: i.stroke.primary,
|
|
74
76
|
borderRightStyle: "solid",
|
|
75
|
-
paddingLeft:
|
|
76
|
-
paddingRight:
|
|
77
|
+
paddingLeft: h ? 0 : 24,
|
|
78
|
+
paddingRight: h ? 0 : 24,
|
|
77
79
|
height: "100%",
|
|
78
|
-
justifyContent:
|
|
80
|
+
justifyContent: v ? "flex-start" : "space-between",
|
|
79
81
|
alignItems: "center",
|
|
80
|
-
...
|
|
82
|
+
...K ?? {}
|
|
81
83
|
},
|
|
82
84
|
children: [
|
|
83
|
-
!!
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
+
!!v && /* @__PURE__ */ t(ct, { style: { ...Q }, children: /* @__PURE__ */ t(v, {}) }),
|
|
86
|
+
/* @__PURE__ */ f(
|
|
85
87
|
"div",
|
|
86
88
|
{
|
|
87
89
|
style: {
|
|
@@ -89,10 +91,10 @@ const wt = ({
|
|
|
89
91
|
flexDirection: "column",
|
|
90
92
|
gap: 4,
|
|
91
93
|
height: "100%",
|
|
92
|
-
...
|
|
94
|
+
...J ?? {}
|
|
93
95
|
},
|
|
94
96
|
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ f(
|
|
96
98
|
"div",
|
|
97
99
|
{
|
|
98
100
|
style: {
|
|
@@ -103,36 +105,44 @@ const wt = ({
|
|
|
103
105
|
},
|
|
104
106
|
children: [
|
|
105
107
|
/* @__PURE__ */ t(
|
|
106
|
-
|
|
108
|
+
it,
|
|
107
109
|
{
|
|
108
110
|
style: {
|
|
109
|
-
color:
|
|
111
|
+
color: i.content.secondary
|
|
110
112
|
},
|
|
111
|
-
children:
|
|
113
|
+
children: c
|
|
112
114
|
}
|
|
113
115
|
),
|
|
114
|
-
|
|
115
|
-
|
|
116
|
+
u && /* @__PURE__ */ t(
|
|
117
|
+
z,
|
|
116
118
|
{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
height: "100%"
|
|
121
|
-
},
|
|
119
|
+
body: u,
|
|
120
|
+
placement: T,
|
|
121
|
+
width: C,
|
|
122
122
|
children: /* @__PURE__ */ t(
|
|
123
|
-
|
|
123
|
+
"div",
|
|
124
124
|
{
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
style: {
|
|
126
|
+
display: "flex",
|
|
127
|
+
cursor: "pointer",
|
|
128
|
+
height: "100%"
|
|
129
|
+
},
|
|
130
|
+
children: /* @__PURE__ */ t(
|
|
131
|
+
ot,
|
|
132
|
+
{
|
|
133
|
+
color: i.content.primary,
|
|
134
|
+
height: 16,
|
|
135
|
+
width: 16
|
|
136
|
+
}
|
|
137
|
+
)
|
|
128
138
|
}
|
|
129
139
|
)
|
|
130
140
|
}
|
|
131
|
-
)
|
|
141
|
+
)
|
|
132
142
|
]
|
|
133
143
|
}
|
|
134
144
|
),
|
|
135
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ f(
|
|
136
146
|
"div",
|
|
137
147
|
{
|
|
138
148
|
style: {
|
|
@@ -140,94 +150,94 @@ const wt = ({
|
|
|
140
150
|
flexDirection: "row",
|
|
141
151
|
gap: 12,
|
|
142
152
|
alignItems: "center",
|
|
143
|
-
...
|
|
153
|
+
...l ? { justifyContent: "space-between" } : {}
|
|
144
154
|
},
|
|
145
155
|
children: [
|
|
146
|
-
|
|
147
|
-
!
|
|
148
|
-
|
|
156
|
+
e && /* @__PURE__ */ t(V, { width: 108, height: 26 }),
|
|
157
|
+
!e && /* @__PURE__ */ t(
|
|
158
|
+
R,
|
|
149
159
|
{
|
|
150
160
|
style: {
|
|
151
|
-
color:
|
|
161
|
+
color: i.content.primary
|
|
152
162
|
},
|
|
153
|
-
children:
|
|
163
|
+
children: X()
|
|
154
164
|
}
|
|
155
165
|
),
|
|
156
|
-
typeof
|
|
157
|
-
|
|
166
|
+
typeof W == "number" && /* @__PURE__ */ t(
|
|
167
|
+
x,
|
|
158
168
|
{
|
|
159
|
-
tagText: `${
|
|
169
|
+
tagText: `${W}%`,
|
|
160
170
|
theme: "light",
|
|
161
171
|
type: "neutral"
|
|
162
172
|
}
|
|
163
173
|
),
|
|
164
|
-
a === "horizontal" && !
|
|
165
|
-
|
|
174
|
+
a === "horizontal" && !e && !l && /* @__PURE__ */ t(
|
|
175
|
+
B,
|
|
166
176
|
{
|
|
167
|
-
timeline:
|
|
168
|
-
customRange:
|
|
169
|
-
percent:
|
|
170
|
-
direction:
|
|
171
|
-
trendRaw:
|
|
172
|
-
trendRawString:
|
|
177
|
+
timeline: o,
|
|
178
|
+
customRange: y,
|
|
179
|
+
percent: w,
|
|
180
|
+
direction: U,
|
|
181
|
+
trendRaw: F,
|
|
182
|
+
trendRawString: N,
|
|
173
183
|
prefixSymbol: d,
|
|
174
|
-
trendIconStyle:
|
|
175
|
-
isInternationalStore:
|
|
176
|
-
tooltipTimelineText:
|
|
177
|
-
customTimelineText:
|
|
184
|
+
trendIconStyle: S,
|
|
185
|
+
isInternationalStore: j,
|
|
186
|
+
tooltipTimelineText: E,
|
|
187
|
+
customTimelineText: O
|
|
178
188
|
}
|
|
179
189
|
),
|
|
180
|
-
|
|
181
|
-
a === "vertical" && !
|
|
182
|
-
|
|
190
|
+
e && !l && a === "horizontal" && /* @__PURE__ */ t(V, { height: 20, width: 141, marginTop: 6 }),
|
|
191
|
+
a === "vertical" && !e && typeof g < "u" && /* @__PURE__ */ t(
|
|
192
|
+
x,
|
|
183
193
|
{
|
|
184
|
-
tagText: `${
|
|
194
|
+
tagText: `${g} %`,
|
|
185
195
|
theme: "light",
|
|
186
196
|
type: "neutral"
|
|
187
197
|
}
|
|
188
198
|
),
|
|
189
|
-
|
|
190
|
-
!
|
|
191
|
-
|
|
199
|
+
l && !e && typeof w < "u" && /* @__PURE__ */ t(x, { tagText: `${w} %`, theme: "light", type: "neutral" }),
|
|
200
|
+
!l && !e && I && I != 0 ? /* @__PURE__ */ t(
|
|
201
|
+
x,
|
|
192
202
|
{
|
|
193
|
-
tagText:
|
|
203
|
+
tagText: Y(I),
|
|
194
204
|
theme: "light",
|
|
195
205
|
type: "neutral"
|
|
196
206
|
}
|
|
197
|
-
) : /* @__PURE__ */ t(
|
|
207
|
+
) : /* @__PURE__ */ t(P, {})
|
|
198
208
|
]
|
|
199
209
|
}
|
|
200
210
|
),
|
|
201
|
-
a === "vertical" && !
|
|
202
|
-
|
|
211
|
+
a === "vertical" && !e && !l && /* @__PURE__ */ t("div", { style: { marginTop: 10 }, children: /* @__PURE__ */ t(
|
|
212
|
+
B,
|
|
203
213
|
{
|
|
204
|
-
timeline:
|
|
205
|
-
customRange:
|
|
206
|
-
percent:
|
|
207
|
-
direction:
|
|
208
|
-
trendRaw:
|
|
209
|
-
trendRawString:
|
|
214
|
+
timeline: o,
|
|
215
|
+
customRange: y,
|
|
216
|
+
percent: w,
|
|
217
|
+
direction: U,
|
|
218
|
+
trendRaw: F,
|
|
219
|
+
trendRawString: N,
|
|
210
220
|
prefixSymbol: d,
|
|
211
|
-
trendIconStyle:
|
|
212
|
-
isInternationalStore:
|
|
213
|
-
tooltipTimelineText:
|
|
214
|
-
customTimelineText:
|
|
221
|
+
trendIconStyle: S,
|
|
222
|
+
isInternationalStore: j,
|
|
223
|
+
tooltipTimelineText: E,
|
|
224
|
+
customTimelineText: O
|
|
215
225
|
}
|
|
216
226
|
) }),
|
|
217
|
-
|
|
227
|
+
e && a === "vertical" && /* @__PURE__ */ t(V, { height: 20, width: 141, marginTop: 6 })
|
|
218
228
|
]
|
|
219
229
|
}
|
|
220
230
|
),
|
|
221
|
-
|
|
231
|
+
b && !e && /* @__PURE__ */ t(z, { body: b, placement: "right", children: p && /* @__PURE__ */ t(
|
|
222
232
|
"div",
|
|
223
233
|
{
|
|
224
234
|
"data-test": "analytics-trend-trailing-icon",
|
|
225
235
|
className: "icon--holder",
|
|
226
236
|
onClick: M,
|
|
227
|
-
children:
|
|
237
|
+
children: tt.createElement(p, {
|
|
228
238
|
height: 20,
|
|
229
239
|
width: 20,
|
|
230
|
-
color:
|
|
240
|
+
color: i.content.secondary
|
|
231
241
|
})
|
|
232
242
|
}
|
|
233
243
|
) })
|
|
@@ -236,42 +246,42 @@ const wt = ({
|
|
|
236
246
|
)
|
|
237
247
|
}
|
|
238
248
|
);
|
|
239
|
-
},
|
|
240
|
-
percent:
|
|
241
|
-
direction:
|
|
242
|
-
timeline:
|
|
249
|
+
}, B = ({
|
|
250
|
+
percent: c,
|
|
251
|
+
direction: n,
|
|
252
|
+
timeline: r,
|
|
243
253
|
customRange: a,
|
|
244
|
-
trendRaw:
|
|
245
|
-
trendRawString:
|
|
246
|
-
prefixSymbol:
|
|
247
|
-
trendIconStyle:
|
|
248
|
-
isInternationalStore:
|
|
249
|
-
tooltipTimelineText:
|
|
250
|
-
customTimelineText:
|
|
254
|
+
trendRaw: o,
|
|
255
|
+
trendRawString: y,
|
|
256
|
+
prefixSymbol: u,
|
|
257
|
+
trendIconStyle: T,
|
|
258
|
+
isInternationalStore: C,
|
|
259
|
+
tooltipTimelineText: h,
|
|
260
|
+
customTimelineText: s
|
|
251
261
|
}) => {
|
|
252
|
-
const
|
|
253
|
-
let
|
|
254
|
-
if (
|
|
255
|
-
return
|
|
256
|
-
|
|
257
|
-
) :
|
|
258
|
-
},
|
|
259
|
-
const
|
|
260
|
-
return typeof
|
|
261
|
-
}, [
|
|
262
|
-
|
|
263
|
-
), [p,
|
|
264
|
-
|
|
262
|
+
const D = () => {
|
|
263
|
+
let e = "--";
|
|
264
|
+
if (o)
|
|
265
|
+
return C ? e = String(
|
|
266
|
+
G(Math.abs(o))
|
|
267
|
+
) : e = String(H(Math.abs(o))), o < 0 ? "-" + e : e;
|
|
268
|
+
}, l = () => {
|
|
269
|
+
const e = ((o ?? 0) > 0 ? "+" : "") + (u ?? "");
|
|
270
|
+
return typeof o > "u" ? "--" : `${e ?? ""}${D()}`;
|
|
271
|
+
}, [A, d] = _(
|
|
272
|
+
l()
|
|
273
|
+
), [p, M] = _(
|
|
274
|
+
s || ""
|
|
265
275
|
);
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
276
|
+
q(() => {
|
|
277
|
+
s || M(
|
|
278
|
+
r === "today" ? "vs yesterday" : r === "yesterday" ? "vs 1 day before" : r === "7 days" ? "vs last 7 days" : r === "30 days" ? "vs last 30 days" : r === "custom" && a ? et.getAnalyticsCustomDateTimelineText(a) : ""
|
|
269
279
|
);
|
|
270
|
-
}, [
|
|
271
|
-
|
|
272
|
-
}, [
|
|
273
|
-
const
|
|
274
|
-
return /* @__PURE__ */
|
|
280
|
+
}, [r, a]), q(() => {
|
|
281
|
+
d(l());
|
|
282
|
+
}, [o]);
|
|
283
|
+
const b = n === "negative" ? rt : nt, g = n === "negative" ? i.background.negative.vibrant : n === "positive" ? i.background.positive.vibrant : i.content.placeholder;
|
|
284
|
+
return /* @__PURE__ */ f(
|
|
275
285
|
"div",
|
|
276
286
|
{
|
|
277
287
|
style: {
|
|
@@ -281,33 +291,33 @@ const wt = ({
|
|
|
281
291
|
flexWrap: "wrap"
|
|
282
292
|
},
|
|
283
293
|
children: [
|
|
284
|
-
typeof
|
|
285
|
-
|
|
294
|
+
typeof c == "number" && /* @__PURE__ */ t(
|
|
295
|
+
b,
|
|
286
296
|
{
|
|
287
297
|
color: g,
|
|
288
298
|
height: 16,
|
|
289
299
|
width: 16,
|
|
290
|
-
style: { marginRight: 2, ...
|
|
300
|
+
style: { marginRight: 2, ...T ?? {} }
|
|
291
301
|
}
|
|
292
302
|
),
|
|
293
|
-
typeof
|
|
294
|
-
|
|
303
|
+
typeof c == "number" && n && /* @__PURE__ */ f(m, { style: { color: g }, children: [
|
|
304
|
+
n === "neutral" ? 0 : c < 1e3 ? c : ">999",
|
|
295
305
|
"%"
|
|
296
306
|
] }),
|
|
297
|
-
!!
|
|
298
|
-
!
|
|
299
|
-
|
|
300
|
-
|
|
307
|
+
!!o && /* @__PURE__ */ t(m, { style: { marginLeft: 4, color: i.content.placeholder }, children: `(${A})` }),
|
|
308
|
+
!o && (y?.length || 0) > 0 && /* @__PURE__ */ t(m, { style: { marginLeft: 4, color: i.content.placeholder }, children: `${y}` }),
|
|
309
|
+
r && (h ? /* @__PURE__ */ t(z, { body: h, placement: "bottom", children: /* @__PURE__ */ t(
|
|
310
|
+
m,
|
|
301
311
|
{
|
|
302
|
-
style: { marginLeft: 4, color:
|
|
303
|
-
children:
|
|
312
|
+
style: { marginLeft: 4, color: i.content.placeholder },
|
|
313
|
+
children: s || p
|
|
304
314
|
}
|
|
305
|
-
) }) : /* @__PURE__ */ t(
|
|
315
|
+
) }) : /* @__PURE__ */ t(m, { style: { marginLeft: 4, color: i.content.placeholder }, children: s || p }))
|
|
306
316
|
]
|
|
307
317
|
}
|
|
308
318
|
);
|
|
309
319
|
};
|
|
310
320
|
export {
|
|
311
|
-
|
|
321
|
+
Tt as AnalyticsTrend
|
|
312
322
|
};
|
|
313
323
|
//# sourceMappingURL=AnalyticsTrend.js.map
|