@servicetitan/confirm-navigation 32.3.0 → 32.4.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/confirm-navigation.tsx"],"sourcesContent":["import { Component, ComponentType, FC } from 'react';\nimport { withRouter, RouteComponentProps } from 'react-router-dom';\n\nimport { observable, action, runInAction, comparer, makeObservable } from 'mobx';\nimport { observer } from 'mobx-react';\n\nimport { History, Location, UnregisterCallback } from 'history';\n\nimport { Dialog } from '@servicetitan/design-system';\n\nimport { injectDependency, optional } from '@servicetitan/react-ioc';\nimport { HistoryManager } from '@servicetitan/web-components';\n\n// TODO: refactor this. External package should not do any assumptions about window.App.\ndeclare global {\n export interface Window {\n App: any;\n }\n}\n\ninterface ConfirmNavigationRenderProps {\n isOpen: boolean;\n title?: string;\n description?: string;\n onConfirm(): void;\n onCancel(): void;\n}\n\nexport interface ConfirmNavigationOwnProps {\n when?: boolean;\n ignoreSearchChanges?: boolean;\n title?: string;\n description?: string;\n component?: ComponentType<ConfirmNavigationRenderProps> | FC<ConfirmNavigationRenderProps>;\n}\n\nexport type ConfirmNavigationProps = ConfirmNavigationOwnProps & RouteComponentProps;\n\nconst DefaultConfirmComponent: FC<ConfirmNavigationRenderProps> = ({\n title,\n description,\n isOpen,\n onConfirm,\n onCancel,\n}) => (\n <Dialog\n negative\n open={isOpen}\n title={title}\n onPrimaryActionClick={onConfirm}\n primaryActionName=\"Leave\"\n onSecondaryActionClick={onCancel}\n secondaryActionName=\"Stay\"\n onClose={onCancel}\n >\n {description}\n </Dialog>\n);\n\n@observer\nclass ConfirmNavigationUnwrapped extends Component<ConfirmNavigationProps> {\n static defaultProps: Partial<ConfirmNavigationProps> = {\n title: 'Are you sure you want to leave?',\n description: \"You'll lose all your changes if you do.\",\n };\n\n @optional()\n @injectDependency(HistoryManager)\n declare historyManager?: HistoryManager;\n\n @observable isOpen = false;\n\n isRedirecting = false;\n\n suspended?: {\n history: History;\n currentLocation: Location;\n targetLocation: Location;\n };\n\n unblock!: UnregisterCallback;\n\n constructor(props: ConfirmNavigationProps) {\n super(props);\n makeObservable(this);\n }\n\n @action\n reset() {\n this.isOpen = false;\n this.isRedirecting = false;\n this.suspended = undefined;\n }\n\n componentDidMount() {\n this.block();\n\n if (window.App?.Instance?.before) {\n window.App.Instance.before(this.onBefore);\n }\n }\n\n componentDidUpdate(prevProps: RouteComponentProps) {\n const { history: prevHistory } = prevProps;\n const { history } = this.props;\n\n if (!comparer.structural(prevHistory.location, history.location)) {\n this.unblock();\n this.block();\n }\n }\n\n componentWillUnmount() {\n this.unblock();\n\n if (window.App?.Instance?.befores) {\n window.App.Instance.befores = window.App.Instance.befores.filter(\n ([, callback]: [any, Function]) => callback !== this.onBefore\n );\n }\n }\n\n // We should terminate Sammy navigation and fix URL of the current page\n onBefore = () => {\n if (this.isOpen && this.suspended) {\n this.isRedirecting = true;\n window.App.Instance.setLocation('#' + this.suspended.currentLocation.pathname);\n }\n\n return !this.isOpen;\n };\n\n block = () => {\n const getTransitionHook = (history: History) => {\n return (targetLocation: Location) => {\n // We shouldn't memorize new locations if it is navigation just for fix URL of the current page\n if (this.isRedirecting) {\n this.isRedirecting = false;\n return false;\n }\n\n const hasChanged =\n history.location.pathname !== targetLocation.pathname ||\n (!this.props.ignoreSearchChanges &&\n history.location.search !== targetLocation.search);\n\n if (hasChanged) {\n runInAction(() => {\n this.isOpen = true;\n this.suspended = {\n history,\n targetLocation,\n currentLocation: history.location,\n };\n });\n\n return false;\n }\n };\n };\n\n const { history } = this.props;\n\n const unblock = history.block(getTransitionHook(history));\n const restUnblocks = Array.from(this.historyManager?.storage.keys() ?? [])\n .filter(item => item !== history)\n .map(history => history.block(getTransitionHook(history)));\n\n this.unblock = () => {\n for (const unblock of restUnblocks) {\n unblock();\n }\n\n unblock();\n };\n };\n\n handleConfirm = () => {\n if (!this.suspended) {\n return;\n }\n\n const { history, currentLocation, targetLocation } = this.suspended;\n\n this.reset();\n\n this.unblock();\n // Fixing URL of the current page if it was changed manually\n history.replace(currentLocation.pathname + currentLocation.search);\n history.push(targetLocation);\n };\n\n handleCancel = () => {\n if (!this.suspended) {\n return;\n }\n\n const { history, currentLocation } = this.suspended;\n\n this.reset();\n\n this.unblock();\n // Fixing URL of the current page if it was changed manually\n history.replace(currentLocation.pathname + currentLocation.search);\n this.block();\n };\n\n render() {\n const { title, description, component: Component = DefaultConfirmComponent } = this.props;\n\n return (\n <Component\n isOpen={this.isOpen}\n title={title}\n description={description}\n onConfirm={this.handleConfirm}\n onCancel={this.handleCancel}\n />\n );\n }\n}\n\nexport const ConfirmNavigation = withRouter(({ when = true, ...props }: ConfirmNavigationProps) =>\n when ? <ConfirmNavigationUnwrapped {...props} /> : null\n);\n"],"names":["Component","withRouter","observable","action","runInAction","comparer","makeObservable","observer","Dialog","injectDependency","optional","HistoryManager","DefaultConfirmComponent","title","description","isOpen","onConfirm","onCancel","negative","open","onPrimaryActionClick","primaryActionName","onSecondaryActionClick","secondaryActionName","onClose","ConfirmNavigationUnwrapped","reset","isRedirecting","suspended","undefined","componentDidMount","window","block","App","Instance","before","onBefore","componentDidUpdate","prevProps","history","prevHistory","props","structural","location","unblock","componentWillUnmount","befores","filter","callback","render","component","handleConfirm","handleCancel","constructor","setLocation","currentLocation","pathname","getTransitionHook","targetLocation","hasChanged","ignoreSearchChanges","search","restUnblocks","Array","from","historyManager","storage","keys","item","map","replace","push","defaultProps","ConfirmNavigation","when"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,SAAS,QAA2B,QAAQ;AACrD,SAASC,UAAU,QAA6B,mBAAmB;AAEnE,SAASC,UAAU,EAAEC,MAAM,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,cAAc,QAAQ,OAAO;AACjF,SAASC,QAAQ,QAAQ,aAAa;AAItC,SAASC,MAAM,QAAQ,8BAA8B;AAErD,SAASC,gBAAgB,EAAEC,QAAQ,QAA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AAK;QACd;QAzHI1B,eAAe,IAAI;IACvB;AAuIJ;AA/JI,iBADEmB,4BACK+C,gBAAgD;IACnD3D,OAAO;IACPC,aAAa;AACjB;;;;;;;;;;;;;;;;;;;;;;AA8JJ,OAAO,MAAM2D,oBAAoBxE,WAAW,CAAC,EAAEyE,OAAO,IAAI,EAAE,GAAGjC,OAA+B,GAC1FiC,qBAAO,KAACjD;QAA4B,GAAGgB,KAAK;SAAO,MACrD"}
|
|
1
|
+
{"version":3,"sources":["../src/confirm-navigation.tsx"],"sourcesContent":["import { Component, ComponentType, FC } from 'react';\nimport { withRouter, RouteComponentProps } from 'react-router-dom';\n\nimport { observable, action, runInAction, comparer, makeObservable } from 'mobx';\nimport { observer } from 'mobx-react';\n\nimport { History, Location, UnregisterCallback } from 'history';\n\nimport { Dialog } from '@servicetitan/design-system';\n\nimport { injectDependency, optional } from '@servicetitan/react-ioc';\nimport { HistoryManager } from '@servicetitan/web-components';\n\n// TODO: refactor this. External package should not do any assumptions about window.App.\ndeclare global {\n export interface Window {\n App: any;\n }\n}\n\ninterface ConfirmNavigationRenderProps {\n isOpen: boolean;\n title?: string;\n description?: string;\n onConfirm(): void;\n onCancel(): void;\n}\n\nexport interface ConfirmNavigationOwnProps {\n when?: boolean;\n ignoreSearchChanges?: boolean;\n title?: string;\n description?: string;\n component?: ComponentType<ConfirmNavigationRenderProps> | FC<ConfirmNavigationRenderProps>;\n}\n\nexport type ConfirmNavigationProps = ConfirmNavigationOwnProps & RouteComponentProps;\n\nconst DefaultConfirmComponent: FC<ConfirmNavigationRenderProps> = ({\n title,\n description,\n isOpen,\n onConfirm,\n onCancel,\n}) => (\n <Dialog\n negative\n open={isOpen}\n title={title}\n onPrimaryActionClick={onConfirm}\n primaryActionName=\"Leave\"\n onSecondaryActionClick={onCancel}\n secondaryActionName=\"Stay\"\n onClose={onCancel}\n >\n {description}\n </Dialog>\n);\n\n@observer\nclass ConfirmNavigationUnwrapped extends Component<ConfirmNavigationProps> {\n static defaultProps: Partial<ConfirmNavigationProps> = {\n title: 'Are you sure you want to leave?',\n description: \"You'll lose all your changes if you do.\",\n };\n\n @optional()\n @injectDependency(HistoryManager)\n declare historyManager?: HistoryManager;\n\n @observable isOpen = false;\n\n isRedirecting = false;\n\n suspended?: {\n history: History;\n currentLocation: Location;\n targetLocation: Location;\n };\n\n unblock!: UnregisterCallback;\n\n constructor(props: ConfirmNavigationProps) {\n super(props);\n makeObservable(this);\n }\n\n @action\n reset() {\n this.isOpen = false;\n this.isRedirecting = false;\n this.suspended = undefined;\n }\n\n componentDidMount() {\n this.block();\n\n if (window.App?.Instance?.before) {\n window.App.Instance.before(this.onBefore);\n }\n }\n\n componentDidUpdate(prevProps: RouteComponentProps) {\n const { history: prevHistory } = prevProps;\n const { history } = this.props;\n\n if (!comparer.structural(prevHistory.location, history.location)) {\n this.unblock();\n this.block();\n }\n }\n\n componentWillUnmount() {\n this.unblock();\n\n if (window.App?.Instance?.befores) {\n window.App.Instance.befores = window.App.Instance.befores.filter(\n ([, callback]: [any, Function]) => callback !== this.onBefore\n );\n }\n }\n\n // We should terminate Sammy navigation and fix URL of the current page\n onBefore = () => {\n if (this.isOpen && this.suspended) {\n this.isRedirecting = true;\n window.App.Instance.setLocation('#' + this.suspended.currentLocation.pathname);\n }\n\n return !this.isOpen;\n };\n\n block = () => {\n const getTransitionHook = (history: History) => {\n return (targetLocation: Location) => {\n // We shouldn't memorize new locations if it is navigation just for fix URL of the current page\n if (this.isRedirecting) {\n this.isRedirecting = false;\n return false;\n }\n\n const hasChanged =\n history.location.pathname !== targetLocation.pathname ||\n (!this.props.ignoreSearchChanges &&\n history.location.search !== targetLocation.search);\n\n if (hasChanged) {\n runInAction(() => {\n this.isOpen = true;\n this.suspended = {\n history,\n targetLocation,\n currentLocation: history.location,\n };\n });\n\n return false;\n }\n };\n };\n\n const { history } = this.props;\n\n const unblock = history.block(getTransitionHook(history));\n const restUnblocks = Array.from(this.historyManager?.storage.keys() ?? [])\n .filter(item => item !== history)\n .map(history => history.block(getTransitionHook(history)));\n\n this.unblock = () => {\n for (const unblock of restUnblocks) {\n unblock();\n }\n\n unblock();\n };\n };\n\n handleConfirm = () => {\n if (!this.suspended) {\n return;\n }\n\n const { history, currentLocation, targetLocation } = this.suspended;\n\n this.reset();\n\n this.unblock();\n // Fixing URL of the current page if it was changed manually\n history.replace(currentLocation.pathname + currentLocation.search);\n history.push(targetLocation);\n };\n\n handleCancel = () => {\n if (!this.suspended) {\n return;\n }\n\n const { history, currentLocation } = this.suspended;\n\n this.reset();\n\n this.unblock();\n // Fixing URL of the current page if it was changed manually\n history.replace(currentLocation.pathname + currentLocation.search);\n this.block();\n };\n\n render() {\n const { title, description, component: Component = DefaultConfirmComponent } = this.props;\n\n return (\n <Component\n isOpen={this.isOpen}\n title={title}\n description={description}\n onConfirm={this.handleConfirm}\n onCancel={this.handleCancel}\n />\n );\n }\n}\n\nexport const ConfirmNavigation = withRouter(({ when = true, ...props }: ConfirmNavigationProps) =>\n when ? <ConfirmNavigationUnwrapped {...props} /> : null\n);\n"],"names":["Component","withRouter","observable","action","runInAction","comparer","makeObservable","observer","Dialog","injectDependency","optional","HistoryManager","DefaultConfirmComponent","title","description","isOpen","onConfirm","onCancel","negative","open","onPrimaryActionClick","primaryActionName","onSecondaryActionClick","secondaryActionName","onClose","ConfirmNavigationUnwrapped","reset","isRedirecting","suspended","undefined","componentDidMount","window","block","App","Instance","before","onBefore","componentDidUpdate","prevProps","history","prevHistory","props","structural","location","unblock","componentWillUnmount","befores","filter","callback","render","component","handleConfirm","handleCancel","setLocation","currentLocation","pathname","getTransitionHook","targetLocation","hasChanged","ignoreSearchChanges","search","restUnblocks","Array","from","historyManager","storage","keys","item","map","replace","push","defaultProps","ConfirmNavigation","when"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,SAAS,QAA2B,QAAQ;AACrD,SAASC,UAAU,QAA6B,mBAAmB;AAEnE,SAASC,UAAU,EAAEC,MAAM,EAAEC,WAAW,EAA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AAK;YAEV,IAAI,CAACkB,OAAO;YACZ,4DAA4D;YAC5DL,QAAQ8B,OAAO,CAACf,gBAAgBC,QAAQ,GAAGD,gBAAgBM,MAAM;YACjE,IAAI,CAAC5B,KAAK;QACd;QAzHI1B,eAAe,IAAI;IACvB;AAuIJ;AA/JI,iBADEmB,4BACK8C,gBAAgD;IACnD1D,OAAO;IACPC,aAAa;AACjB;;;;;;;;;;;;;;;;;;;;;;AA8JJ,OAAO,MAAM0D,oBAAoBvE,WAAW,CAAC,EAAEwE,OAAO,IAAI,EAAE,GAAGhC,OAA+B,GAC1FgC,qBAAO,KAAChD;QAA4B,GAAGgB,KAAK;SAAO,MACrD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/confirm-navigation",
|
|
3
|
-
"version": "32.
|
|
3
|
+
"version": "32.4.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://docs.st.dev/docs/frontend/confirm-navigation",
|
|
6
6
|
"repository": {
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
],
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@servicetitan/design-system": "~14.5.1",
|
|
20
|
-
"@servicetitan/log-service": "^31.
|
|
21
|
-
"@servicetitan/react-ioc": "^31.
|
|
22
|
-
"@servicetitan/web-components": "^31.
|
|
20
|
+
"@servicetitan/log-service": "^31.6.0",
|
|
21
|
+
"@servicetitan/react-ioc": "^31.6.0",
|
|
22
|
+
"@servicetitan/web-components": "^31.6.0",
|
|
23
23
|
"@types/history": "~4.7.10",
|
|
24
24
|
"@types/react": "~18.2.55",
|
|
25
25
|
"@types/react-router": "~5.1.17",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"cli": {
|
|
47
47
|
"webpack": false
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "5bc4f3c9c8a181df124fdc614964757e5490ea9b"
|
|
50
50
|
}
|