@servicetitan/marketing-ui 5.10.0 → 5.11.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/dist/components/charts/line-chart/stores/line-chart.store.js.map +1 -1
- package/dist/components/charts/line-chart/stores/svg.store.js.map +1 -1
- package/dist/components/image-cropper/image-cropper.js.map +1 -1
- package/dist/components/ui/title-popover/title-popover.js.map +1 -1
- package/dist/utils/date/date-range-picker-state.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/charts/line-chart/stores/line-chart.store.ts"],"sourcesContent":["import { injectable } from '@servicetitan/react-ioc';\nimport { action, observable, makeObservable } from 'mobx';\nimport {\n LineChartDisplay,\n LineChartDisplayValueFormat,\n LineChartMetricValues,\n LineChartPeriod,\n LineChartProps,\n LineChartResolution,\n} from '../utils/interfaces';\nimport { defaultDisplay } from '../utils/const';\nimport { ChartMetric, SideMetricsSettings } from '../utils/internal-interfaces';\nimport { getFormatter } from '../utils/formatters';\n\nconst getSideMetricsSettings = (\n metrics: ChartMetric[],\n values: LineChartMetricValues[],\n range?: number,\n title?: string,\n format?: LineChartDisplayValueFormat\n): SideMetricsSettings | undefined => {\n let maxRange = range ?? 0;\n const lineBarMetricIDs = metrics\n .filter(m => m.type === 'line' || m.type === 'bar' || m.type === 'grouped-bar')\n .map(m => m.id);\n const stackedBarMetricIDs = metrics.filter(m => m.type === 'stacked-bar').map(m => m.id);\n\n if (!maxRange) {\n maxRange = values.reduce(\n (sum, metricValues) =>\n lineBarMetricIDs.includes(metricValues.metricId)\n ? Math.max(\n sum,\n metricValues.values.reduce((acc, v) => Math.max(acc, v), 0)\n )\n : sum,\n 0\n );\n }\n\n if (stackedBarMetricIDs.length) {\n const stackChartMetricValues = values\n .filter(metricValues => stackedBarMetricIDs.includes(metricValues.metricId))\n .map(metric => metric.values);\n\n const summedStackedMetrics = stackChartMetricValues[0]?.map((value, i) =>\n stackChartMetricValues.reduce((sum, metricValues) => sum + metricValues[i], 0)\n );\n\n if (summedStackedMetrics?.length) {\n maxRange = Math.max(...summedStackedMetrics, maxRange);\n }\n }\n\n if (!maxRange) {\n if (!lineBarMetricIDs.length && !stackedBarMetricIDs.length) {\n return undefined;\n }\n\n maxRange = 10;\n }\n\n maxRange = Math.max(maxRange, 10);\n\n if (format === 'moneyShort' && maxRange > 1000 && maxRange < 10000) {\n maxRange = 10000;\n }\n\n const sums = [];\n const step = maxRange / 10;\n const formatter = getFormatter(format);\n\n for (let i = 0; i < 10; i++) {\n sums.push(formatter(maxRange - i * step));\n }\n\n const width = title ? 64 : 48;\n\n return { maxRange, maxValue: 1.1 * maxRange, title: title ?? '', values: sums, width };\n};\n\n@injectable()\nexport class LineChartStore {\n @observable isInit = false;\n @observable display: LineChartDisplay = defaultDisplay();\n @observable metrics: ChartMetric[] = [];\n @observable periods: LineChartPeriod[] = [];\n @observable resolution: LineChartResolution = 'day';\n\n @observable left?: SideMetricsSettings;\n @observable right?: SideMetricsSettings;\n\n @observable hoveredIndex = -1;\n\n constructor() {\n makeObservable(this);\n }\n\n @action init = (props: LineChartProps) => {\n this.display = {\n ...defaultDisplay(),\n ...(props.display ?? {}),\n };\n\n this.metrics = props.metrics.map(m => {\n const mv = props.metricValues.find(mv => mv.metricId === m.id);\n\n return {\n ...m,\n isRight: !!m.isRight,\n type: m.type ?? 'line',\n opts: m.opts ?? {},\n values: mv?.values ?? [],\n valuesOpts: mv?.opts,\n };\n });\n\n this.left = getSideMetricsSettings(\n this.metrics.filter(m => !m.isRight),\n props.metricValues,\n props.maxRange,\n props.titleY,\n this.display.yLeftFormat\n );\n this.right = getSideMetricsSettings(\n this.metrics.filter(m => m.isRight),\n props.metricValues,\n props.maxRangeRight,\n props.titleYRight,\n this.display.yRightFormat\n );\n\n this.resolution = props.resolution;\n this.periods = props.periods || [];\n this.hoveredIndex = -1;\n this.isInit = true;\n };\n\n @action setHoveredIndex = (index: number, isHovered: boolean) => {\n if (isHovered) {\n this.hoveredIndex = index;\n } else if (index === this.hoveredIndex) {\n this.hoveredIndex = -1;\n }\n };\n}\n"],"names":["injectable","action","observable","makeObservable","LineChartDisplay","LineChartResolution","defaultDisplay","SideMetricsSettings","getFormatter","getSideMetricsSettings","metrics","values","range","title","format","maxRange","lineBarMetricIDs","filter","m","type","map","id","stackedBarMetricIDs","reduce","sum","metricValues","includes","metricId","Math","max","acc","v","length","stackChartMetricValues","metric","summedStackedMetrics","value","i","undefined","sums","step","formatter","push","width","maxValue","LineChartStore","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/charts/line-chart/stores/line-chart.store.ts"],"sourcesContent":["import { injectable } from '@servicetitan/react-ioc';\nimport { action, observable, makeObservable } from 'mobx';\nimport {\n LineChartDisplay,\n LineChartDisplayValueFormat,\n LineChartMetricValues,\n LineChartPeriod,\n LineChartProps,\n LineChartResolution,\n} from '../utils/interfaces';\nimport { defaultDisplay } from '../utils/const';\nimport { ChartMetric, SideMetricsSettings } from '../utils/internal-interfaces';\nimport { getFormatter } from '../utils/formatters';\n\nconst getSideMetricsSettings = (\n metrics: ChartMetric[],\n values: LineChartMetricValues[],\n range?: number,\n title?: string,\n format?: LineChartDisplayValueFormat\n): SideMetricsSettings | undefined => {\n let maxRange = range ?? 0;\n const lineBarMetricIDs = metrics\n .filter(m => m.type === 'line' || m.type === 'bar' || m.type === 'grouped-bar')\n .map(m => m.id);\n const stackedBarMetricIDs = metrics.filter(m => m.type === 'stacked-bar').map(m => m.id);\n\n if (!maxRange) {\n maxRange = values.reduce(\n (sum, metricValues) =>\n lineBarMetricIDs.includes(metricValues.metricId)\n ? Math.max(\n sum,\n metricValues.values.reduce((acc, v) => Math.max(acc, v), 0)\n )\n : sum,\n 0\n );\n }\n\n if (stackedBarMetricIDs.length) {\n const stackChartMetricValues = values\n .filter(metricValues => stackedBarMetricIDs.includes(metricValues.metricId))\n .map(metric => metric.values);\n\n const summedStackedMetrics = stackChartMetricValues[0]?.map((value, i) =>\n stackChartMetricValues.reduce((sum, metricValues) => sum + metricValues[i], 0)\n );\n\n if (summedStackedMetrics?.length) {\n maxRange = Math.max(...summedStackedMetrics, maxRange);\n }\n }\n\n if (!maxRange) {\n if (!lineBarMetricIDs.length && !stackedBarMetricIDs.length) {\n return undefined;\n }\n\n maxRange = 10;\n }\n\n maxRange = Math.max(maxRange, 10);\n\n if (format === 'moneyShort' && maxRange > 1000 && maxRange < 10000) {\n maxRange = 10000;\n }\n\n const sums = [];\n const step = maxRange / 10;\n const formatter = getFormatter(format);\n\n for (let i = 0; i < 10; i++) {\n sums.push(formatter(maxRange - i * step));\n }\n\n const width = title ? 64 : 48;\n\n return { maxRange, maxValue: 1.1 * maxRange, title: title ?? '', values: sums, width };\n};\n\n@injectable()\nexport class LineChartStore {\n @observable isInit = false;\n @observable display: LineChartDisplay = defaultDisplay();\n @observable metrics: ChartMetric[] = [];\n @observable periods: LineChartPeriod[] = [];\n @observable resolution: LineChartResolution = 'day';\n\n @observable left?: SideMetricsSettings;\n @observable right?: SideMetricsSettings;\n\n @observable hoveredIndex = -1;\n\n constructor() {\n makeObservable(this);\n }\n\n @action init = (props: LineChartProps) => {\n this.display = {\n ...defaultDisplay(),\n ...(props.display ?? {}),\n };\n\n this.metrics = props.metrics.map(m => {\n const mv = props.metricValues.find(mv => mv.metricId === m.id);\n\n return {\n ...m,\n isRight: !!m.isRight,\n type: m.type ?? 'line',\n opts: m.opts ?? {},\n values: mv?.values ?? [],\n valuesOpts: mv?.opts,\n };\n });\n\n this.left = getSideMetricsSettings(\n this.metrics.filter(m => !m.isRight),\n props.metricValues,\n props.maxRange,\n props.titleY,\n this.display.yLeftFormat\n );\n this.right = getSideMetricsSettings(\n this.metrics.filter(m => m.isRight),\n props.metricValues,\n props.maxRangeRight,\n props.titleYRight,\n this.display.yRightFormat\n );\n\n this.resolution = props.resolution;\n this.periods = props.periods || [];\n this.hoveredIndex = -1;\n this.isInit = true;\n };\n\n @action setHoveredIndex = (index: number, isHovered: boolean) => {\n if (isHovered) {\n this.hoveredIndex = index;\n } else if (index === this.hoveredIndex) {\n this.hoveredIndex = -1;\n }\n };\n}\n"],"names":["injectable","action","observable","makeObservable","LineChartDisplay","LineChartResolution","defaultDisplay","SideMetricsSettings","getFormatter","getSideMetricsSettings","metrics","values","range","title","format","maxRange","lineBarMetricIDs","filter","m","type","map","id","stackedBarMetricIDs","reduce","sum","metricValues","includes","metricId","Math","max","acc","v","length","stackChartMetricValues","metric","summedStackedMetrics","value","i","undefined","sums","step","formatter","push","width","maxValue","LineChartStore","isInit","display","periods","resolution","left","right","hoveredIndex","init","props","mv","find","isRight","opts","valuesOpts","titleY","yLeftFormat","maxRangeRight","titleYRight","yRightFormat","setHoveredIndex","index","isHovered"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,UAAU,QAAQ,0BAA0B;AACrD,SAASC,MAAM,EAAEC,UAAU,EAAEC,cAAc,QAAQ,OAAO;AAC1D,SACIC,gBAAgB,EAKhBC,mBAAmB,QAChB,sBAAsB;AAC7B,SAASC,cAAc,QAAQ,iBAAiB;AAChD,SAAsBC,mBAAmB,QAAQ,+BAA+B;AAChF,SAASC,YAAY,QAAQ,sBAAsB;AAEnD,MAAMC,yBAAyB,CAC3BC,SACAC,QACAC,OACAC,OACAC;IAEA,IAAIC,WAAWH,kBAAAA,mBAAAA,QAAS;IACxB,MAAMI,mBAAmBN,QACpBO,MAAM,CAACC,CAAAA,IAAKA,EAAEC,IAAI,KAAK,UAAUD,EAAEC,IAAI,KAAK,SAASD,EAAEC,IAAI,KAAK,eAChEC,GAAG,CAACF,CAAAA,IAAKA,EAAEG,EAAE;IAClB,MAAMC,sBAAsBZ,QAAQO,MAAM,CAACC,CAAAA,IAAKA,EAAEC,IAAI,KAAK,eAAeC,GAAG,CAACF,CAAAA,IAAKA,EAAEG,EAAE;IAEvF,IAAI,CAACN,UAAU;QACXA,WAAWJ,OAAOY,MAAM,CACpB,CAACC,KAAKC,eACFT,i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AI,CAACV,KAAK,GAAG1C,uBACT,IAAI,CAACC,OAAO,CAACO,MAAM,CAACC,CAAAA,IAAKA,EAAEuC,OAAO,GAClCH,MAAM7B,YAAY,EAClB6B,MAAMQ,aAAa,EACnBR,MAAMS,WAAW,EACjB,IAAI,CAAChB,OAAO,CAACiB,YAAY;YAG7B,IAAI,CAACf,UAAU,GAAGK,MAAML,UAAU;YAClC,IAAI,CAACD,OAAO,GAAGM,MAAMN,OAAO,IAAI,EAAE;YAClC,IAAI,CAACI,YAAY,GAAG,CAAC;YACrB,IAAI,CAACN,MAAM,GAAG;QAClB;QAEA,uBAAQmB,mBAAkB,CAACC,OAAeC;YACtC,IAAIA,WAAW;gBACX,IAAI,CAACf,YAAY,GAAGc;YACxB,OAAO,IAAIA,UAAU,IAAI,CAACd,YAAY,EAAE;gBACpC,IAAI,CAACA,YAAY,GAAG,CAAC;YACzB;QACJ;QAjDIjD,eAAe,IAAI;IACvB;AAiDJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/charts/line-chart/stores/svg.store.ts"],"sourcesContent":["import { injectable } from '@servicetitan/react-ioc';\nimport { action, observable, makeObservable } from 'mobx';\nimport { ChartMetric } from '../utils/internal-interfaces';\n\nconst barRelativeWidth = 0.8;\nconst maxBarWidth = 7;\n\n@injectable()\nexport class SvgStore {\n @observable key = 0;\n @observable length = 1;\n @observable xOffset = 0;\n @observable barWidth = 0;\n\n private fullBarWidth = 0;\n private maxValueLeft = 0;\n private maxValueRight = 0;\n\n constructor() {\n makeObservable(this);\n }\n\n @action init = (\n length: number,\n metrics: ChartMetric[],\n maxValueLeft: number,\n maxValueRight: number\n ) => {\n this.length = length || 1;\n this.key = Date.now();\n\n const hasBars = !!metrics.filter(\n m => m.type === 'bar' || m.type === 'stacked-bar' || m.type === 'grouped-bar'\n ).length;\n\n if (hasBars) {\n this.fullBarWidth = 100 / this.length;\n this.xOffset = this.fullBarWidth / 2;\n } else {\n this.fullBarWidth = 100 / (this.length - 1);\n this.xOffset = 0;\n }\n\n this.barWidth = Math.min(barRelativeWidth * this.fullBarWidth, maxBarWidth);\n this.maxValueLeft = maxValueLeft;\n this.maxValueRight = maxValueRight;\n };\n\n periodX(index: number): number {\n return this.xOffset + this.fullBarWidth * index;\n }\n\n periodY(m: ChartMetric, ind: number): number {\n const value = ind < 0 || ind >= m.values.length ? 0 : m.values[ind];\n const maxValue = m.isRight ? this.maxValueRight : this.maxValueLeft;\n\n return value && maxValue ? (100 * value) / maxValue : 0;\n }\n\n fpx = (val: number): string => {\n return val.toFixed(1);\n };\n\n fpy = (val: number): string => {\n return (100 - val).toFixed(1);\n };\n}\n"],"names":["injectable","action","observable","makeObservable","barRelativeWidth","maxBarWidth","SvgStore","periodX","index","xOffset","fullBarWidth","periodY","m","ind","value","values","length","maxValue","isRight","maxValueRight","maxValueLeft","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/charts/line-chart/stores/svg.store.ts"],"sourcesContent":["import { injectable } from '@servicetitan/react-ioc';\nimport { action, observable, makeObservable } from 'mobx';\nimport { ChartMetric } from '../utils/internal-interfaces';\n\nconst barRelativeWidth = 0.8;\nconst maxBarWidth = 7;\n\n@injectable()\nexport class SvgStore {\n @observable key = 0;\n @observable length = 1;\n @observable xOffset = 0;\n @observable barWidth = 0;\n\n private fullBarWidth = 0;\n private maxValueLeft = 0;\n private maxValueRight = 0;\n\n constructor() {\n makeObservable(this);\n }\n\n @action init = (\n length: number,\n metrics: ChartMetric[],\n maxValueLeft: number,\n maxValueRight: number\n ) => {\n this.length = length || 1;\n this.key = Date.now();\n\n const hasBars = !!metrics.filter(\n m => m.type === 'bar' || m.type === 'stacked-bar' || m.type === 'grouped-bar'\n ).length;\n\n if (hasBars) {\n this.fullBarWidth = 100 / this.length;\n this.xOffset = this.fullBarWidth / 2;\n } else {\n this.fullBarWidth = 100 / (this.length - 1);\n this.xOffset = 0;\n }\n\n this.barWidth = Math.min(barRelativeWidth * this.fullBarWidth, maxBarWidth);\n this.maxValueLeft = maxValueLeft;\n this.maxValueRight = maxValueRight;\n };\n\n periodX(index: number): number {\n return this.xOffset + this.fullBarWidth * index;\n }\n\n periodY(m: ChartMetric, ind: number): number {\n const value = ind < 0 || ind >= m.values.length ? 0 : m.values[ind];\n const maxValue = m.isRight ? this.maxValueRight : this.maxValueLeft;\n\n return value && maxValue ? (100 * value) / maxValue : 0;\n }\n\n fpx = (val: number): string => {\n return val.toFixed(1);\n };\n\n fpy = (val: number): string => {\n return (100 - val).toFixed(1);\n };\n}\n"],"names":["injectable","action","observable","makeObservable","barRelativeWidth","maxBarWidth","SvgStore","periodX","index","xOffset","fullBarWidth","periodY","m","ind","value","values","length","maxValue","isRight","maxValueRight","maxValueLeft","key","barWidth","init","metrics","Date","now","hasBars","filter","type","Math","min","fpx","val","toFixed","fpy"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,UAAU,QAAQ,0BAA0B;AACrD,SAASC,MAAM,EAAEC,UAAU,EAAEC,cAAc,QAAQ,OAAO;AAG1D,MAAMC,mBAAmB;AACzB,MAAMC,cAAc;AAGpB,OAAO,MAAMC;IAwCTC,QAAQC,KAAa,EAAU;QAC3B,OAAO,IAAI,CAACC,OAAO,GAAG,IAAI,CAACC,YAAY,GAAGF;IAC9C;IAEAG,QAAQC,CAAc,EAAEC,GAAW,EAAU;QACzC,MAAMC,QAAQD,MAAM,KAAKA,OAAOD,EAAEG,MAAM,CAACC,MAAM,GAAG,IAAIJ,EAAEG,MAAM,CAACF,IAAI;QACnE,MAAMI,WAAWL,EAAEM,OAAO,GAAG,IAAI,CAACC,aAAa,GAAG,IAAI,CAACC,YAAY;QAEnE,OAAON,SAASG,WAAW,AAAC,MAAMH,QAASG,WAAW;IAC1D;IAvCA,aAAc;QATd,uBAAYI,OAAM;QAClB,uBAAYL,UAAS;QACrB,uBAAYP,WAAU;QACtB,uBAAYa,YAAW;QAEvB,uBAAQZ,gBAAe;QACvB,uBAAQU,gBAAe;QACvB,uBAAQD,iBAAgB;QAMxB,uBAAQI,QAAO,CACXP,QACAQ,SACAJ,cACAD;YAEA,IAAI,CAACH,MAAM,GAAGA,UAAU;YACxB,IAAI,CAACK,GAAG,GAAGI,KAAKC,GAAG;YAEnB,MAAMC,UAAU,CAAC,CAACH,QAAQI,MAAM,CAC5BhB,CAAAA,IAAKA,EAAEiB,IAAI,KAAK,SAASjB,EAAEiB,IAAI,KAAK,iBAAiBjB,EAAEiB,IAAI,KAAK,eAClEb,MAAM;YAER,IAAIW,SAAS;gBACT,IAAI,CAACjB,YAAY,GAAG,MAAM,IAAI,CAACM,MAAM;gBACrC,IAAI,CAACP,OAAO,GAAG,IAAI,CAACC,YAAY,GAAG;YACvC,OAAO;gBACH,IAAI,CAACA,YAAY,GAAG,MAAO,CAAA,IAAI,CAACM,MAAM,GAAG,CAAA;gBACzC,IAAI,CAACP,OAAO,GAAG;YACnB;YAEA,IAAI,CAACa,QAAQ,GAAGQ,KAAKC,GAAG,CAAC3B,mBAAmB,IAAI,CAACM,YAAY,EAAEL;YAC/D,IAAI,CAACe,YAAY,GAAGA;YACpB,IAAI,CAACD,aAAa,GAAGA;QACzB;QAaAa,uBAAAA,OAAM,CAACC;YACH,OAAOA,IAAIC,OAAO,CAAC;QACvB;QAEAC,uBAAAA,OAAM,CAACF;YACH,OAAO,AAAC,CAAA,MAAMA,GAAE,EAAGC,OAAO,CAAC;QAC/B;QA9CI/B,eAAe,IAAI;IACvB;AA8CJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/image-cropper/image-cropper.tsx"],"sourcesContent":["import { Component } from 'react';\nimport { observable, action, makeObservable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport ReactCrop, { Crop } from 'react-image-crop';\nimport 'react-image-crop/dist/ReactCrop.css';\n\ninterface ImageCropperProps {\n file: File;\n crop: {\n width: number;\n height: number;\n };\n}\n\n@observer\nexport class ImageCropper extends Component<ImageCropperProps> {\n @observable private src?: string;\n @observable private crop?: Crop;\n @observable private image?: HTMLImageElement;\n\n constructor(props: ImageCropperProps) {\n super(props);\n makeObservable(this);\n }\n\n getCroppedImg = (type: string, fileName: string) =>\n new Promise<File | undefined>(resolve => {\n if (!this.image || !this.crop) {\n resolve(undefined);\n return;\n }\n\n const { x, y } = this.crop;\n if (x == null || y == null) {\n resolve(undefined);\n return;\n }\n\n const { width, height } = this.props.crop;\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n resolve(undefined);\n return;\n }\n\n ctx.drawImage(\n this.image,\n x * (this.image.naturalWidth / this.image.width),\n y * (this.image.naturalHeight / this.image.height),\n width,\n height,\n 0,\n 0,\n width,\n height\n );\n\n canvas.toBlob(\n blob => {\n const result = blob ? new File([blob], fileName) : undefined;\n resolve(result);\n },\n type,\n 1\n );\n });\n\n @action\n componentDidMount() {\n return (this.src = URL.createObjectURL(this.props.file));\n }\n\n componentWillUnmount() {\n if (this.src) {\n URL.revokeObjectURL(this.src);\n }\n }\n\n render() {\n return this.src ? (\n <ReactCrop\n locked\n src={this.src}\n crop={this.crop}\n onChange={this.handleChange}\n onImageLoaded={this.handleImageLoaded}\n />\n ) : null;\n }\n\n @action\n private handleChange = (crop: Crop) => (this.crop = crop);\n\n @action\n private handleImageLoaded = (image: HTMLImageElement) => {\n this.image = image;\n this.crop = {\n unit: 'px',\n x: 0,\n y: 0,\n width: this.props.crop.width * (image.width / image.naturalWidth),\n height: this.props.crop.height * (image.height / image.naturalHeight),\n };\n\n return false;\n };\n}\n"],"names":["Component","observable","action","makeObservable","observer","ReactCrop","Crop","ImageCropper","componentDidMount","src","URL","createObjectURL","props","file","componentWillUnmount","revokeObjectURL","render","locked","crop","onChange","handleChange","onImageLoaded","handleImageLoaded","
|
|
1
|
+
{"version":3,"sources":["../../../src/components/image-cropper/image-cropper.tsx"],"sourcesContent":["import { Component } from 'react';\nimport { observable, action, makeObservable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport ReactCrop, { Crop } from 'react-image-crop';\nimport 'react-image-crop/dist/ReactCrop.css';\n\ninterface ImageCropperProps {\n file: File;\n crop: {\n width: number;\n height: number;\n };\n}\n\n@observer\nexport class ImageCropper extends Component<ImageCropperProps> {\n @observable private src?: string;\n @observable private crop?: Crop;\n @observable private image?: HTMLImageElement;\n\n constructor(props: ImageCropperProps) {\n super(props);\n makeObservable(this);\n }\n\n getCroppedImg = (type: string, fileName: string) =>\n new Promise<File | undefined>(resolve => {\n if (!this.image || !this.crop) {\n resolve(undefined);\n return;\n }\n\n const { x, y } = this.crop;\n if (x == null || y == null) {\n resolve(undefined);\n return;\n }\n\n const { width, height } = this.props.crop;\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n resolve(undefined);\n return;\n }\n\n ctx.drawImage(\n this.image,\n x * (this.image.naturalWidth / this.image.width),\n y * (this.image.naturalHeight / this.image.height),\n width,\n height,\n 0,\n 0,\n width,\n height\n );\n\n canvas.toBlob(\n blob => {\n const result = blob ? new File([blob], fileName) : undefined;\n resolve(result);\n },\n type,\n 1\n );\n });\n\n @action\n componentDidMount() {\n return (this.src = URL.createObjectURL(this.props.file));\n }\n\n componentWillUnmount() {\n if (this.src) {\n URL.revokeObjectURL(this.src);\n }\n }\n\n render() {\n return this.src ? (\n <ReactCrop\n locked\n src={this.src}\n crop={this.crop}\n onChange={this.handleChange}\n onImageLoaded={this.handleImageLoaded}\n />\n ) : null;\n }\n\n @action\n private handleChange = (crop: Crop) => (this.crop = crop);\n\n @action\n private handleImageLoaded = (image: HTMLImageElement) => {\n this.image = image;\n this.crop = {\n unit: 'px',\n x: 0,\n y: 0,\n width: this.props.crop.width * (image.width / image.naturalWidth),\n height: this.props.crop.height * (image.height / image.naturalHeight),\n };\n\n return false;\n };\n}\n"],"names":["Component","observable","action","makeObservable","observer","ReactCrop","Crop","ImageCropper","componentDidMount","src","URL","createObjectURL","props","file","componentWillUnmount","revokeObjectURL","render","locked","crop","onChange","handleChange","onImageLoaded","handleImageLoaded","image","getCroppedImg","type","fileName","Promise","resolve","undefined","x","y","width","height","canvas","document","createElement","ctx","getContext","drawImage","naturalWidth","naturalHeight","toBlob","blob","result","File","unit"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,SAAS,QAAQ,QAAQ;AAClC,SAASC,UAAU,EAAEC,MAAM,EAAEC,cAAc,QAAQ,OAAO;AAC1D,SAASC,QAAQ,QAAQ,aAAa;AACtC,OAAOC,aAAaC,IAAI,QAAQ,mBAAmB;AACnD,OAAO,sCAAsC;AAW7C,OAAO,MAAMC,qBAAqBP;IAwD9BQ,oBAAoB;QAChB,OAAQ,IAAI,CAACC,GAAG,GAAGC,IAAIC,eAAe,CAAC,IAAI,CAACC,KAAK,CAACC,IAAI;IAC1D;IAEAC,uBAAuB;QACnB,IAAI,IAAI,CAACL,GAAG,EAAE;YACVC,IAAIK,eAAe,CAAC,IAAI,CAACN,GAAG;QAChC;IACJ;IAEAO,SAAS;QACL,OAAO,IAAI,CAACP,GAAG,iBACX,KAACJ;YACGY,MAAM;YACNR,KAAK,IAAI,CAACA,GAAG;YACbS,MAAM,IAAI,CAACA,IAAI;YACfC,UAAU,IAAI,CAACC,YAAY;YAC3BC,eAAe,IAAI,CAACC,iBAAiB;aAEzC;IACR;IAvEA,YAAYV,KAAwB,CAAE;QAClC,KAAK,CAACA,QALV,uBAAoBH,OAApB,KAAA,IACA,uBAAoBS,QAApB,KAAA,IACA,uBAAoBK,SAApB,KAAA,IAOAC,uBAAAA,iBAAgB,CAACC,MAAcC,WAC3B,IAAIC,QAA0BC,CAAAA;gBAC1B,IAAI,CAAC,IAAI,CAACL,KAAK,IAAI,CAAC,IAAI,CAACL,IAAI,EAAE;oBAC3BU,QAAQC;oBACR;gBACJ;gBAEA,MAAM,EAAEC,CAAC,EAAEC,CAAC,EAAE,GAAG,IAAI,CAACb,IAAI;gBAC1B,IAAIY,KAAK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1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ui/title-popover/title-popover.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { observer } from 'mobx-react';\nimport { createRef, Component, PropsWithChildren } from 'react';\nimport { observable, action, makeObservable } from 'mobx';\nimport { Popover, Stack, BodyText, Icon } from '@servicetitan/design-system';\nimport * as Styles from './title-popover.module.less';\n\ninterface TitlePopoverProps extends PropsWithChildren<{}> {\n text?: string;\n}\n\n@observer\nexport class TitlePopover extends Component<TitlePopoverProps> {\n @observable isOpen = false;\n\n wrapElem = createRef<HTMLDivElement>();\n\n constructor(props: TitlePopoverProps) {\n super(props);\n makeObservable(this);\n }\n\n @action\n toggle = () => {\n this.isOpen = !this.isOpen;\n };\n\n @action\n close = () => {\n this.isOpen = false;\n };\n\n @action\n handleClick = (event: MouseEvent) => {\n if (!this.wrapElem.current) {\n return;\n }\n\n const isClickedInside = this.wrapElem.current.contains(event.target as Node);\n\n if (!isClickedInside) {\n this.close();\n }\n };\n\n componentDidMount() {\n window.addEventListener('click', this.handleClick);\n }\n\n componentWillUnmount() {\n window.removeEventListener('click', this.handleClick);\n }\n\n render() {\n const { text, children } = this.props;\n\n return (\n <div ref={this.wrapElem} className=\"qa-title-popover\">\n <Popover\n className={classNames(Styles.popover, 'qa-title-popover')}\n width=\"xs\"\n open={this.isOpen}\n direction=\"br\"\n trigger={\n <Stack\n alignItems=\"center\"\n className=\"qa-title-popover-button cursor-pointer\"\n onClick={this.toggle}\n >\n <BodyText size=\"large\" className=\"qa-title-popover-text\">\n {text}\n </BodyText>\n <Icon\n name=\"expand_more\"\n size={20}\n className=\"m-l-1 qa-title-popover-icon\"\n />\n </Stack>\n }\n >\n {children}\n </Popover>\n </div>\n );\n }\n}\n"],"names":["classNames","observer","createRef","Component","observable","action","makeObservable","Popover","Stack","BodyText","Icon","Styles","TitlePopover","componentDidMount","window","addEventListener","handleClick","componentWillUnmount","removeEventListener","render","text","children","props","div","ref","wrapElem","className","popover","width","open","isOpen","direction","trigger","alignItems","onClick","toggle","size","name","
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/title-popover/title-popover.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { observer } from 'mobx-react';\nimport { createRef, Component, PropsWithChildren } from 'react';\nimport { observable, action, makeObservable } from 'mobx';\nimport { Popover, Stack, BodyText, Icon } from '@servicetitan/design-system';\nimport * as Styles from './title-popover.module.less';\n\ninterface TitlePopoverProps extends PropsWithChildren<{}> {\n text?: string;\n}\n\n@observer\nexport class TitlePopover extends Component<TitlePopoverProps> {\n @observable isOpen = false;\n\n wrapElem = createRef<HTMLDivElement>();\n\n constructor(props: TitlePopoverProps) {\n super(props);\n makeObservable(this);\n }\n\n @action\n toggle = () => {\n this.isOpen = !this.isOpen;\n };\n\n @action\n close = () => {\n this.isOpen = false;\n };\n\n @action\n handleClick = (event: MouseEvent) => {\n if (!this.wrapElem.current) {\n return;\n }\n\n const isClickedInside = this.wrapElem.current.contains(event.target as Node);\n\n if (!isClickedInside) {\n this.close();\n }\n };\n\n componentDidMount() {\n window.addEventListener('click', this.handleClick);\n }\n\n componentWillUnmount() {\n window.removeEventListener('click', this.handleClick);\n }\n\n render() {\n const { text, children } = this.props;\n\n return (\n <div ref={this.wrapElem} className=\"qa-title-popover\">\n <Popover\n className={classNames(Styles.popover, 'qa-title-popover')}\n width=\"xs\"\n open={this.isOpen}\n direction=\"br\"\n trigger={\n <Stack\n alignItems=\"center\"\n className=\"qa-title-popover-button cursor-pointer\"\n onClick={this.toggle}\n >\n <BodyText size=\"large\" className=\"qa-title-popover-text\">\n {text}\n </BodyText>\n <Icon\n name=\"expand_more\"\n size={20}\n className=\"m-l-1 qa-title-popover-icon\"\n />\n </Stack>\n }\n >\n {children}\n </Popover>\n </div>\n );\n }\n}\n"],"names":["classNames","observer","createRef","Component","observable","action","makeObservable","Popover","Stack","BodyText","Icon","Styles","TitlePopover","componentDidMount","window","addEventListener","handleClick","componentWillUnmount","removeEventListener","render","text","children","props","div","ref","wrapElem","className","popover","width","open","isOpen","direction","trigger","alignItems","onClick","toggle","size","name","close","event","current","isClickedInside","contains","target"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,gBAAgB,aAAa;AACpC,SAASC,QAAQ,QAAQ,aAAa;AACtC,SAASC,SAAS,EAAEC,SAAS,QAA2B,QAAQ;AAChE,SAASC,UAAU,EAAEC,MAAM,EAAEC,cAAc,QAAQ,OAAO;AAC1D,SAASC,OAAO,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,8BAA8B;AAC7E,YAAYC,YAAY,8BAA8B;AAOtD,OAAO,MAAMC,qBAAqBT;IAiC9BU,oBAAoB;QAChBC,OAAOC,gBAAgB,CAAC,SAAS,IAAI,CAACC,WAAW;IACrD;IAEAC,uBAAuB;QACnBH,OAAOI,mBAAmB,CAAC,SAAS,IAAI,CAACF,WAAW;IACxD;IAEAG,SAAS;QACL,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAG,IAAI,CAACC,KAAK;QAErC,qBACI,KAACC;YAAIC,KAAK,IAAI,CAACC,QAAQ;YAAEC,WAAU;sBAC/B,cAAA,KAACnB;gBACGmB,WAAW1B,WAAWW,OAAOgB,OAAO,EAAE;gBACtCC,OAAM;gBACNC,MAAM,IAAI,CAACC,MAAM;gBACjBC,WAAU;gBACVC,uBACI,MAACxB;oBACGyB,YAAW;oBACXP,WAAU;oBACVQ,SAAS,IAAI,CAACC,MAAM;;sCAEpB,KAAC1B;4BAAS2B,MAAK;4BAAQV,WAAU;sCAC5BN;;sCAEL,KAACV;4BACG2B,MAAK;4BACLD,MAAM;4BACNV,WAAU;;;;0BAKrBL;;;IAIjB;IAnEA,YAAYC,KAAwB,CAAE;QAClC,KAAK,CAACA,QALV,uBAAYQ,UAAS,QAErBL,uBAAAA,0BAAWvB,cAOX,uBACAiC,UAAS;YACL,IAAI,CAACL,MAAM,GAAG,CAAC,IAAI,CAACA,MAAM;QAC9B,IAEA,uBACAQ,SAAQ;YACJ,IAAI,CAACR,MAAM,GAAG;QAClB,IAEA,uBACAd,eAAc,CAACuB;YACX,IAAI,CAAC,IAAI,CAACd,QAAQ,CAACe,OAAO,EAAE;gBACxB;YACJ;YAEA,MAAMC,kBAAkB,IAAI,CAAChB,QAAQ,CAACe,OAAO,CAACE,QAAQ,CAACH,MAAMI,MAAM;YAEnE,IAAI,CAACF,iBAAiB;gBAClB,IAAI,CAACH,KAAK;YACd;QACJ;QAxBIhC,eAAe,IAAI;IACvB;AAiEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/date/date-range-picker-state.ts"],"sourcesContent":["import { DateRangePickerOption, DateRangePickerOptions } from './date-range-picker-options';\nimport { DateRange } from './date';\nimport { action, computed, makeObservable, observable } from 'mobx';\n\ninterface DateRangePickerStateConfig {\n defaultValue?: DateRange;\n}\n\nexport interface DateRangePickerStateType {\n value?: DateRange;\n onChange(val?: DateRange): void;\n}\n\nexport interface DateRangePickerOptionsStateType<OptionKeys extends string>\n extends DateRangePickerStateType {\n readonly options: DateRangePickerOptions<OptionKeys>;\n readonly selectedOption?: DateRangePickerOption<OptionKeys>;\n}\n\nexport class DateRangePickerState<OptionKeys extends string = never> {\n @observable value?: DateRange;\n\n readonly options?: DateRangePickerOptions<OptionKeys>;\n\n @computed get selectedOption(): DateRangePickerOption<OptionKeys> | undefined {\n if (!this.value || !this.options) {\n return undefined;\n }\n\n return this.options.findOption(this.value);\n }\n\n constructor(config?: DateRangePickerStateConfig, options?: DateRangePickerOptions<OptionKeys>) {\n makeObservable(this);\n\n this.options = options;\n\n if (config?.defaultValue) {\n this.value = config.defaultValue;\n } else if (this.options?.defaultOption) {\n this.value = this.options.findOption(this.options.defaultOption)?.value;\n }\n }\n\n static create(config?: DateRangePickerStateConfig): DateRangePickerStateType {\n return new DateRangePickerState(config);\n }\n\n static createWithOptions<OptionKeys extends string>(\n options: DateRangePickerOptions<OptionKeys>,\n config?: DateRangePickerStateConfig\n ): DateRangePickerOptionsStateType<OptionKeys> {\n return new DateRangePickerState(\n config,\n options\n ) as DateRangePickerOptionsStateType<OptionKeys>;\n }\n\n @action onChange = (val?: DateRange) => {\n this.value = val;\n };\n}\n"],"names":["DateRange","action","computed","makeObservable","observable","DateRangePickerState","selectedOption","value","options","undefined","findOption","create","config","createWithOptions","
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/date/date-range-picker-state.ts"],"sourcesContent":["import { DateRangePickerOption, DateRangePickerOptions } from './date-range-picker-options';\nimport { DateRange } from './date';\nimport { action, computed, makeObservable, observable } from 'mobx';\n\ninterface DateRangePickerStateConfig {\n defaultValue?: DateRange;\n}\n\nexport interface DateRangePickerStateType {\n value?: DateRange;\n onChange(val?: DateRange): void;\n}\n\nexport interface DateRangePickerOptionsStateType<OptionKeys extends string>\n extends DateRangePickerStateType {\n readonly options: DateRangePickerOptions<OptionKeys>;\n readonly selectedOption?: DateRangePickerOption<OptionKeys>;\n}\n\nexport class DateRangePickerState<OptionKeys extends string = never> {\n @observable value?: DateRange;\n\n readonly options?: DateRangePickerOptions<OptionKeys>;\n\n @computed get selectedOption(): DateRangePickerOption<OptionKeys> | undefined {\n if (!this.value || !this.options) {\n return undefined;\n }\n\n return this.options.findOption(this.value);\n }\n\n constructor(config?: DateRangePickerStateConfig, options?: DateRangePickerOptions<OptionKeys>) {\n makeObservable(this);\n\n this.options = options;\n\n if (config?.defaultValue) {\n this.value = config.defaultValue;\n } else if (this.options?.defaultOption) {\n this.value = this.options.findOption(this.options.defaultOption)?.value;\n }\n }\n\n static create(config?: DateRangePickerStateConfig): DateRangePickerStateType {\n return new DateRangePickerState(config);\n }\n\n static createWithOptions<OptionKeys extends string>(\n options: DateRangePickerOptions<OptionKeys>,\n config?: DateRangePickerStateConfig\n ): DateRangePickerOptionsStateType<OptionKeys> {\n return new DateRangePickerState(\n config,\n options\n ) as DateRangePickerOptionsStateType<OptionKeys>;\n }\n\n @action onChange = (val?: DateRange) => {\n this.value = val;\n };\n}\n"],"names":["DateRange","action","computed","makeObservable","observable","DateRangePickerState","selectedOption","value","options","undefined","findOption","create","config","createWithOptions","onChange","val","defaultValue","defaultOption"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,SAASA,SAAS,QAAQ,SAAS;AACnC,SAASC,MAAM,EAAEC,QAAQ,EAAEC,cAAc,EAAEC,UAAU,QAAQ,OAAO;AAiBpE,OAAO,MAAMC;IAKT,IAAcC,iBAAgE;QAC1E,IAAI,CAAC,IAAI,CAACC,KAAK,IAAI,CAAC,IAAI,CAACC,OAAO,EAAE;YAC9B,OAAOC;QACX;QAEA,OAAO,IAAI,CAACD,OAAO,CAACE,UAAU,CAAC,IAAI,CAACH,KAAK;IAC7C;IAcA,OAAOI,OAAOC,MAAmC,EAA4B;QACzE,OAAO,IAAIP,qBAAqBO;IACpC;IAEA,OAAOC,kBACHL,OAA2C,EAC3CI,MAAmC,EACQ;QAC3C,OAAO,IAAIP,qBACPO,QACAJ;IAER;IAxBA,YAAYI,MAAmC,EAAEJ,OAA4C,CAAE;YAOhF;QAnBf,uBAAYD,SAAZ,KAAA;QAEA,uBAASC,WAAT,KAAA;QAoCA,uBAAQM,YAAW,CAACC;YAChB,IAAI,CAACR,KAAK,GAAGQ;QACjB;QA3BIZ,eAAe,IAAI;QAEnB,IAAI,CAACK,OAAO,GAAGA;QAEf,IAAII,mBAAAA,6BAAAA,OAAQI,YAAY,EAAE;YACtB,IAAI,CAACT,KAAK,GAAGK,OAAOI,YAAY;QACpC,OAAO,KAAI,gBAAA,IAAI,CAACR,OAAO,cAAZ,oCAAA,cAAcS,aAAa,EAAE;gBACvB;YAAb,IAAI,CAACV,KAAK,IAAG,2BAAA,IAAI,CAACC,OAAO,CAACE,UAAU,CAAC,IAAI,CAACF,OAAO,CAACS,aAAa,eAAlD,+CAAA,yBAAqDV,KAAK;QAC3E;IACJ;AAmBJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/marketing-ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.11.0",
|
|
4
4
|
"description": "Marketing UI component and utils",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@servicetitan/design-system": "~14.5.1",
|
|
33
|
-
"@servicetitan/react-ioc": "^31.
|
|
33
|
+
"@servicetitan/react-ioc": "^31.6.0",
|
|
34
34
|
"@servicetitan/tokens": ">=12.2.1",
|
|
35
35
|
"@testing-library/react": "^14.2.1",
|
|
36
36
|
"@types/accounting": "~0.4.2",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"less": true,
|
|
52
52
|
"webpack": false
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "3dab3310534a39aaacb0069e1d377579fe0a7fab"
|
|
55
55
|
}
|