@servicetitan/confirm-navigation 38.1.0 → 38.3.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.
@@ -86,6 +86,7 @@ class ConfirmNavigationUnwrapped extends Component {
86
86
  }
87
87
  return !this.isOpen;
88
88
  }), _define_property(this, "block", ()=>{
89
+ var _ref;
89
90
  var _this_historyManager;
90
91
  const getTransitionHook = (history)=>{
91
92
  return (targetLocation)=>{
@@ -110,8 +111,7 @@ class ConfirmNavigationUnwrapped extends Component {
110
111
  };
111
112
  const { history } = this.props;
112
113
  const unblock = history.block(getTransitionHook(history));
113
- var _this_historyManager_storage_keys;
114
- const restUnblocks = Array.from((_this_historyManager_storage_keys = (_this_historyManager = this.historyManager) === null || _this_historyManager === void 0 ? void 0 : _this_historyManager.storage.keys()) !== null && _this_historyManager_storage_keys !== void 0 ? _this_historyManager_storage_keys : []).filter((item)=>item !== history).map((history)=>history.block(getTransitionHook(history)));
114
+ const restUnblocks = Array.from((_ref = (_this_historyManager = this.historyManager) === null || _this_historyManager === void 0 ? void 0 : _this_historyManager.storage.keys()) !== null && _ref !== void 0 ? _ref : []).filter((item)=>item !== history).map((history)=>history.block(getTransitionHook(history)));
115
115
  this.unblock = ()=>{
116
116
  for (const unblock of restUnblocks){
117
117
  unblock();
@@ -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","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,QAAQ,0BAA0B;AACrE,SAASC,cAAc,QAAQ,+BAA+B;AA2B9D,MAAMC,0BAA4D,CAAC,EAC/DC,KAAK,EACLC,WAAW,EACXC,MAAM,EACNC,SAAS,EACTC,QAAQ,EACX,iBACG,KAACT;QACGU,QAAQ;QACRC,MAAMJ;QACNF,OAAOA;QACPO,sBAAsBJ;QACtBK,mBAAkB;QAClBC,wBAAwBL;QACxBM,qBAAoB;QACpBC,SAASP;kBAERH;;AAIT,MACMW,mCAAmCzB;IA4BrC0B,QAAQ;QACJ,IAAI,CAACX,MAAM,GAAG;QACd,IAAI,CAACY,aAAa,GAAG;QACrB,IAAI,CAACC,SAAS,GAAGC;IACrB;IAEAC,oBAAoB;YAGZC,sBAAAA;QAFJ,IAAI,CAACC,KAAK;QAEV,KAAID,cAAAA,OAAOE,GAAG,cAAVF,mCAAAA,uBAAAA,YAAYG,QAAQ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;oBAChCjB;gBACJ;gBAEAA;YACJ;QACJ,IAEAO,uBAAAA,iBAAgB;YACZ,IAAI,CAAC,IAAI,CAACvB,SAAS,EAAE;gBACjB;YACJ;YAEA,MAAM,EAAEW,OAAO,EAAEe,eAAe,EAAEG,cAAc,EAAE,GAAG,IAAI,CAAC7B,SAAS;YAEnE,IAAI,CAACF,KAAK;YAEV,IAAI,CAACkB,OAAO;YACZ,4DAA4D;YAC5DL,QAAQ8B,OAAO,CAACf,gBAAgBC,QAAQ,GAAGD,gBAAgBM,MAAM;YACjErB,QAAQ+B,IAAI,CAACb;QACjB,IAEAL,uBAAAA,gBAAe;YACX,IAAI,CAAC,IAAI,CAACxB,SAAS,EAAE;gBACjB;YACJ;YAEA,MAAM,EAAEW,OAAO,EAAEe,eAAe,EAAE,GAAG,IAAI,CAAC1B,SAAS;YAEnD,IAAI,CAACF,KAAK;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"}
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,EAAEC,QAAQ,EAAEC,cAAc,QAAQ,OAAO;AACjF,SAASC,QAAQ,QAAQ,aAAa;AAItC,SAASC,MAAM,QAAQ,8BAA8B;AAErD,SAASC,gBAAgB,EAAEC,QAAQ,QAAQ,0BAA0B;AACrE,SAASC,cAAc,QAAQ,+BAA+B;AA2B9D,MAAMC,0BAA4D,CAAC,EAC/DC,KAAK,EACLC,WAAW,EACXC,MAAM,EACNC,SAAS,EACTC,QAAQ,EACX,iBACG,KAACT;QACGU,QAAQ;QACRC,MAAMJ;QACNF,OAAOA;QACPO,sBAAsBJ;QACtBK,mBAAkB;QAClBC,wBAAwBL;QACxBM,qBAAoB;QACpBC,SAASP;kBAERH;;AAIT,MACMW,mCAAmCzB;IA4BrC0B,QAAQ;QACJ,IAAI,CAACX,MAAM,GAAG;QACd,IAAI,CAACY,aAAa,GAAG;QACrB,IAAI,CAACC,SAAS,GAAGC;IACr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QP,KAAK,CAACwB,kBAAkBjB;YAEpD,IAAI,CAACK,OAAO,GAAG;gBACX,KAAK,MAAMA,WAAWiB,aAAc;oBAChCjB;gBACJ;gBAEAA;YACJ;QACJ,IAEAO,uBAAAA,iBAAgB;YACZ,IAAI,CAAC,IAAI,CAACvB,SAAS,EAAE;gBACjB;YACJ;YAEA,MAAM,EAAEW,OAAO,EAAEe,eAAe,EAAEG,cAAc,EAAE,GAAG,IAAI,CAAC7B,SAAS;YAEnE,IAAI,CAACF,KAAK;YAEV,IAAI,CAACkB,OAAO;YACZ,4DAA4D;YAC5DL,QAAQ8B,OAAO,CAACf,gBAAgBC,QAAQ,GAAGD,gBAAgBM,MAAM;YACjErB,QAAQ+B,IAAI,CAACb;QACjB,IAEAL,uBAAAA,gBAAe;YACX,IAAI,CAAC,IAAI,CAACxB,SAAS,EAAE;gBACjB;YACJ;YAEA,MAAM,EAAEW,OAAO,EAAEe,eAAe,EAAE,GAAG,IAAI,CAAC1B,SAAS;YAEnD,IAAI,CAACF,KAAK;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": "38.1.0",
3
+ "version": "38.3.0",
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": "^33.1.1",
21
- "@servicetitan/react-ioc": "^33.1.1",
22
- "@servicetitan/web-components": "^33.1.1",
20
+ "@servicetitan/log-service": "^34.0.1",
21
+ "@servicetitan/react-ioc": "^34.0.1",
22
+ "@servicetitan/web-components": "^34.0.1",
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": "a44925e37020acb2153c7e10215a31cd22d054c1"
49
+ "gitHead": "1792c3dadb5fef82bb6263ade086b9c3b13c86fb"
50
50
  }