@corva/ui 3.55.0-7 → 3.55.0-9

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.
Files changed (85) hide show
  1. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.js +1 -1
  2. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByBounds.js +1 -1
  3. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js +1 -1
  4. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAllWells/useAllWells.js +1 -1
  5. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAllWells/useCompanyIdChangeEffect.js +1 -1
  6. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAllWells/useDrillingFilterChangeEffect.js +2 -0
  7. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAllWells/useDrillingFilterChangeEffect.js.map +1 -0
  8. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAllWells/useLoadAllWellsCallback.js +1 -1
  9. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useViewportWells/fetchTile.js +1 -1
  10. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useViewportWells/useCompanyIdResetEffect.js +1 -1
  11. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useViewportWells/useDrillingFilterResetEffect.js +2 -0
  12. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useViewportWells/useDrillingFilterResetEffect.js.map +1 -0
  13. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useViewportWells/useHandleBoundsChange.js +1 -1
  14. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useViewportWells/useViewportWells.js +1 -1
  15. package/cjs-bundle/components/OffsetWellPickerV5/utils/doesWellPassFilters.js +1 -1
  16. package/cjs-bundle/components/OffsetWellPickerV5/utils/isDrillingOnlyWell.js +2 -0
  17. package/cjs-bundle/components/OffsetWellPickerV5/utils/isDrillingOnlyWell.js.map +1 -0
  18. package/cjs-bundle/componentsV2/TemplatesControl/TemplatesControl.js +1 -1
  19. package/cjs-bundle/componentsV2/TemplatesControl/Toggle/Toggle.js +1 -1
  20. package/cjs-bundle/componentsV2/TemplatesControl/Toggle/Toggle.scss.js +1 -1
  21. package/cjs-bundle/componentsV2/TemplatesControl/ToggleDisplayDefault/ToggleDisplayDefault.js +2 -0
  22. package/cjs-bundle/componentsV2/TemplatesControl/ToggleDisplayDefault/ToggleDisplayDefault.js.map +1 -0
  23. package/cjs-bundle/componentsV2/TemplatesControl/ToggleDisplayDefault/ToggleDisplayDefault.scss.js +2 -0
  24. package/cjs-bundle/componentsV2/TemplatesControl/ToggleDisplayDefault/ToggleDisplayDefault.scss.js.map +1 -0
  25. package/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.d.ts +1 -0
  26. package/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.d.ts.map +1 -1
  27. package/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.js +1 -1
  28. package/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByBounds.d.ts +5 -1
  29. package/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByBounds.d.ts.map +1 -1
  30. package/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByBounds.js +1 -1
  31. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.d.ts.map +1 -1
  32. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js +1 -1
  33. package/components/OffsetWellPickerV5/hooks/useAllWells/useAllWells.d.ts.map +1 -1
  34. package/components/OffsetWellPickerV5/hooks/useAllWells/useAllWells.js +1 -1
  35. package/components/OffsetWellPickerV5/hooks/useAllWells/useCompanyIdChangeEffect.d.ts +1 -1
  36. package/components/OffsetWellPickerV5/hooks/useAllWells/useCompanyIdChangeEffect.d.ts.map +1 -1
  37. package/components/OffsetWellPickerV5/hooks/useAllWells/useCompanyIdChangeEffect.js +1 -1
  38. package/components/OffsetWellPickerV5/hooks/useAllWells/useDrillingFilterChangeEffect.d.ts +8 -0
  39. package/components/OffsetWellPickerV5/hooks/useAllWells/useDrillingFilterChangeEffect.d.ts.map +1 -0
  40. package/components/OffsetWellPickerV5/hooks/useAllWells/useDrillingFilterChangeEffect.js +2 -0
  41. package/components/OffsetWellPickerV5/hooks/useAllWells/useDrillingFilterChangeEffect.js.map +1 -0
  42. package/components/OffsetWellPickerV5/hooks/useAllWells/useLoadAllWellsCallback.d.ts.map +1 -1
  43. package/components/OffsetWellPickerV5/hooks/useAllWells/useLoadAllWellsCallback.js +1 -1
  44. package/components/OffsetWellPickerV5/hooks/useViewportWells/fetchTile.d.ts +1 -1
  45. package/components/OffsetWellPickerV5/hooks/useViewportWells/fetchTile.d.ts.map +1 -1
  46. package/components/OffsetWellPickerV5/hooks/useViewportWells/fetchTile.js +1 -1
  47. package/components/OffsetWellPickerV5/hooks/useViewportWells/types.d.ts +1 -0
  48. package/components/OffsetWellPickerV5/hooks/useViewportWells/types.d.ts.map +1 -1
  49. package/components/OffsetWellPickerV5/hooks/useViewportWells/useCompanyIdResetEffect.d.ts +1 -1
  50. package/components/OffsetWellPickerV5/hooks/useViewportWells/useCompanyIdResetEffect.d.ts.map +1 -1
  51. package/components/OffsetWellPickerV5/hooks/useViewportWells/useCompanyIdResetEffect.js +1 -1
  52. package/components/OffsetWellPickerV5/hooks/useViewportWells/useDrillingFilterResetEffect.d.ts +14 -0
  53. package/components/OffsetWellPickerV5/hooks/useViewportWells/useDrillingFilterResetEffect.d.ts.map +1 -0
  54. package/components/OffsetWellPickerV5/hooks/useViewportWells/useDrillingFilterResetEffect.js +2 -0
  55. package/components/OffsetWellPickerV5/hooks/useViewportWells/useDrillingFilterResetEffect.js.map +1 -0
  56. package/components/OffsetWellPickerV5/hooks/useViewportWells/useHandleBoundsChange.d.ts.map +1 -1
  57. package/components/OffsetWellPickerV5/hooks/useViewportWells/useHandleBoundsChange.js +1 -1
  58. package/components/OffsetWellPickerV5/hooks/useViewportWells/useViewportWells.d.ts.map +1 -1
  59. package/components/OffsetWellPickerV5/hooks/useViewportWells/useViewportWells.js +1 -1
  60. package/components/OffsetWellPickerV5/utils/doesWellPassFilters.d.ts.map +1 -1
  61. package/components/OffsetWellPickerV5/utils/doesWellPassFilters.js +1 -1
  62. package/components/OffsetWellPickerV5/utils/isDrillingOnlyWell.d.ts +3 -0
  63. package/components/OffsetWellPickerV5/utils/isDrillingOnlyWell.d.ts.map +1 -0
  64. package/components/OffsetWellPickerV5/utils/isDrillingOnlyWell.js +2 -0
  65. package/components/OffsetWellPickerV5/utils/isDrillingOnlyWell.js.map +1 -0
  66. package/componentsV2/TemplatesControl/TemplatesControl.d.ts +9 -2
  67. package/componentsV2/TemplatesControl/TemplatesControl.d.ts.map +1 -1
  68. package/componentsV2/TemplatesControl/TemplatesControl.js +1 -1
  69. package/componentsV2/TemplatesControl/TemplatesControl.stories.d.ts +1 -0
  70. package/componentsV2/TemplatesControl/TemplatesControl.stories.d.ts.map +1 -1
  71. package/componentsV2/TemplatesControl/Toggle/Toggle.d.ts +2 -0
  72. package/componentsV2/TemplatesControl/Toggle/Toggle.d.ts.map +1 -1
  73. package/componentsV2/TemplatesControl/Toggle/Toggle.js +1 -1
  74. package/componentsV2/TemplatesControl/Toggle/Toggle.scss.js +1 -1
  75. package/componentsV2/TemplatesControl/ToggleDisplayDefault/ToggleDisplayDefault.d.ts +5 -0
  76. package/componentsV2/TemplatesControl/ToggleDisplayDefault/ToggleDisplayDefault.d.ts.map +1 -0
  77. package/componentsV2/TemplatesControl/ToggleDisplayDefault/ToggleDisplayDefault.js +2 -0
  78. package/componentsV2/TemplatesControl/ToggleDisplayDefault/ToggleDisplayDefault.js.map +1 -0
  79. package/componentsV2/TemplatesControl/ToggleDisplayDefault/ToggleDisplayDefault.scss.js +2 -0
  80. package/componentsV2/TemplatesControl/ToggleDisplayDefault/ToggleDisplayDefault.scss.js.map +1 -0
  81. package/componentsV2/TemplatesControl/ToggleDisplayDefault/index.d.ts +2 -0
  82. package/componentsV2/TemplatesControl/ToggleDisplayDefault/index.d.ts.map +1 -0
  83. package/mcp-server/server.mjs +13 -2
  84. package/package.json +1 -1
  85. package/tsconfig.tsbuildinfo +1 -1
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/regenerator";import{keyToTile as t,tileToBounds as n}from"../../utils/tile-math.js";import{getAssetsByBounds as a}from"../../api/shared/fetchers/getAssetsByBounds.js";var s=function(){var s=e(r.mark((function e(s){var o,i,c,l,u,p,m,f,d,h,b;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=s.tileKey,i=s.companyIds,c=s.addWellsUsabilityInfo,l=s.setCachedTile,u=s.addWellsToTile,p=s.setTileStatus,e.prev=1,p(o,"loading"),m=t(o),f=n(m),e.next=7,a(f,i);case 7:if(!((d=e.sent).length>0)){e.next=14;break}return e.next=11,c(d);case 11:e.t0=e.sent,e.next=15;break;case 14:e.t0=[];case 15:h=e.t0,l(o,h.map((function(e){return e.id}))),u(o,h),e.next=24;break;case 20:e.prev=20,e.t1=e.catch(1),b=e.t1 instanceof Error?e.t1.message:"Unknown error",p(o,"error",b);case 24:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(e){return s.apply(this,arguments)}}();export{s as fetchTile};
1
+ import e from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/regenerator";import{keyToTile as t,tileToBounds as n}from"../../utils/tile-math.js";import{getAssetsByBounds as a}from"../../api/shared/fetchers/getAssetsByBounds.js";var s=function(){var s=e(r.mark((function e(s){var i,o,l,c,u,p,m,f,d,h,b,g;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=s.tileKey,o=s.companyIds,l=s.drillingWells,c=s.addWellsUsabilityInfo,u=s.setCachedTile,p=s.addWellsToTile,m=s.setTileStatus,e.prev=1,m(i,"loading"),f=t(i),d=n(f),e.next=7,a(d,o,{drillingWells:l});case 7:if(!((h=e.sent).length>0)){e.next=14;break}return e.next=11,c(h);case 11:e.t0=e.sent,e.next=15;break;case 14:e.t0=[];case 15:b=e.t0,u(i,b.map((function(e){return e.id}))),p(i,b),e.next=24;break;case 20:e.prev=20,e.t1=e.catch(1),g=e.t1 instanceof Error?e.t1.message:"Unknown error",m(i,"error",g);case 24:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(e){return s.apply(this,arguments)}}();export{s as fetchTile};
2
2
  //# sourceMappingURL=fetchTile.js.map
@@ -6,6 +6,7 @@ export type FetchQueue = {
6
6
  };
7
7
  export type FetchCallbacks = {
8
8
  companyIds: number[] | null;
9
+ drillingWells: boolean;
9
10
  addWellsUsabilityInfo: (wells: OffsetWell[]) => PromiseLike<OffsetWell[]> | OffsetWell[];
10
11
  setCachedTile: (key: TileKey, wellIds: number[]) => void;
11
12
  addWellsToTile: (key: TileKey, wells: OffsetWell[]) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/useViewportWells/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC5B,qBAAqB,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,WAAW,CAAC,UAAU,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC;IACzF,aAAa,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzD,cAAc,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;IAC5D,aAAa,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/F,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG;IAC7C,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG;IAChD,KAAK,EAAE,UAAU,CAAC;CACnB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/useViewportWells/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,OAAO,CAAC;IACvB,qBAAqB,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,WAAW,CAAC,UAAU,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC;IACzF,aAAa,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzD,cAAc,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;IAC5D,aAAa,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/F,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG;IAC7C,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG;IAChD,KAAK,EAAE,UAAU,CAAC;CACnB,CAAC"}
@@ -3,7 +3,7 @@ import type { StoreApi } from 'zustand';
3
3
  import type { ViewportBounds } from '../../stores/viewport-store/types';
4
4
  import type { ViewportStore } from '../../stores/viewport-store/createViewportStore';
5
5
  import type { FetchQueue } from './types';
6
- export declare const useCompanyIdResetEffect: (prevCompanyIdsRef: MutableRefObject<number[] | null | undefined>, params: {
6
+ export declare const useCompanyIdResetEffect: (params: {
7
7
  enabled: boolean;
8
8
  store: StoreApi<ViewportStore>;
9
9
  queueRef: MutableRefObject<FetchQueue>;
@@ -1 +1 @@
1
- {"version":3,"file":"useCompanyIdResetEffect.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/useViewportWells/useCompanyIdResetEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAErF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,uBAAuB,GAClC,mBAAmB,gBAAgB,CAAC,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC,EAChE,QAAQ;IACN,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC/B,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACvC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,qBAAqB,EAAE,gBAAgB,CAAC,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC;CACnF,KACA,IA6CF,CAAC"}
1
+ {"version":3,"file":"useCompanyIdResetEffect.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/useViewportWells/useCompanyIdResetEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAErF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,uBAAuB,GAAI,QAAQ;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC/B,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACvC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,qBAAqB,EAAE,gBAAgB,CAAC,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC;CACnF,KAAG,IA4CH,CAAC"}
@@ -1,2 +1,2 @@
1
- import{useEffect as r}from"react";import e from"lodash/isEqual";import{useFilterStore as t}from"../../stores/filter-store/useFilterStore.js";import"../../stores/company-safeguard/CompanySafeguardContext.js";import{useCompanySafeguard as a}from"../../stores/company-safeguard/useCompanySafeguard.js";var o=function(o,n){var u=t((function(r){var e;return null!==(e=r.filters.companyId)&&void 0!==e?e:null})),s=a().isSafeguardReady,i=n.enabled,f=n.store,c=n.queueRef,d=n.clearCache,l=n.clearTiles,m=n.handleBoundsChangeRef;r((function(){if(s)if(void 0!==o.current&&i){if(!e(o.current,u)&&(d(),l(),c.current.pending=[],o.current=u,i)){var r=f.getState().bounds;r&&m.current(r)}}else o.current=u}),[s,u,i,f,d,l,o,c,m])};export{o as useCompanyIdResetEffect};
1
+ import{useRef as r,useEffect as e}from"react";import o from"lodash/isEqual";import{useFilterStore as t}from"../../stores/filter-store/useFilterStore.js";import"../../stores/company-safeguard/CompanySafeguardContext.js";import{useCompanySafeguard as a}from"../../stores/company-safeguard/useCompanySafeguard.js";var n=function(n){var u=t((function(r){var e;return null!==(e=r.filters.companyId)&&void 0!==e?e:null})),s=a().isSafeguardReady,i=n.enabled,f=n.store,c=n.queueRef,d=n.clearCache,l=n.clearTiles,m=n.handleBoundsChangeRef,p=r(void 0);e((function(){if(s)if(void 0!==p.current&&i){if(!o(p.current,u)&&(d(),l(),c.current.pending=[],p.current=u,i)){var r=f.getState().bounds;r&&m.current(r)}}else p.current=u}),[s,u,i,f,d,l,c,m])};export{n as useCompanyIdResetEffect};
2
2
  //# sourceMappingURL=useCompanyIdResetEffect.js.map
@@ -0,0 +1,14 @@
1
+ import { type MutableRefObject } from 'react';
2
+ import type { StoreApi } from 'zustand';
3
+ import type { ViewportBounds } from '../../stores/viewport-store/types';
4
+ import type { ViewportStore } from '../../stores/viewport-store/createViewportStore';
5
+ import type { FetchQueue } from './types';
6
+ export declare const useDrillingFilterResetEffect: (params: {
7
+ enabled: boolean;
8
+ store: StoreApi<ViewportStore>;
9
+ queueRef: MutableRefObject<FetchQueue>;
10
+ clearCache: () => void;
11
+ clearTiles: () => void;
12
+ handleBoundsChangeRef: MutableRefObject<(_bounds: ViewportBounds | null) => void>;
13
+ }) => void;
14
+ //# sourceMappingURL=useDrillingFilterResetEffect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDrillingFilterResetEffect.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/useViewportWells/useDrillingFilterResetEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAErF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,4BAA4B,GAAI,QAAQ;IACnD,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC/B,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACvC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,qBAAqB,EAAE,gBAAgB,CAAC,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC;CACnF,KAAG,IA2BH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{useRef as e,useEffect as r}from"react";import{useFilterStore as t}from"../../stores/filter-store/useFilterStore.js";var n=function(n){var i=t((function(e){var r;return null===(r=e.filters.drillingWells)||void 0===r||r})),o=n.enabled,u=n.store,l=n.queueRef,c=n.clearCache,a=n.clearTiles,s=n.handleBoundsChangeRef,f=e(void 0);r((function(){if(void 0!==f.current&&o){if(f.current!==i){c(),a(),l.current.pending=[],f.current=i;var e=u.getState().bounds;e&&s.current(e)}}else f.current=i}),[i,o,u,c,a,l,s])};export{n as useDrillingFilterResetEffect};
2
+ //# sourceMappingURL=useDrillingFilterResetEffect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDrillingFilterResetEffect.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"useHandleBoundsChange.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/useViewportWells/useHandleBoundsChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKlD,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAIrF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,KAAK,2BAA2B,GAAG;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC/B,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACvC,aAAa,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,MAAM,EAAE,GAAG,IAAI,CAAC;IACjD,aAAa,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,6DAMnC,2BAA2B,KAAG,CAAC,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAgE3E,CAAC"}
1
+ {"version":3,"file":"useHandleBoundsChange.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/useViewportWells/useHandleBoundsChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKlD,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAIrF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,KAAK,2BAA2B,GAAG;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC/B,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACvC,aAAa,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,MAAM,EAAE,GAAG,IAAI,CAAC;IACjD,aAAa,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,6DAMnC,2BAA2B,KAAG,CAAC,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAmE3E,CAAC"}
@@ -1,2 +1,2 @@
1
- import{useCallback as e}from"react";import{useStore as t}from"zustand";import{getTilesForViewport as r,MAX_TILES_FOR_FETCH as i}from"../../utils/tile-math.js";import"lodash";import"../../stores/picker-props-store/PickerPropsStoreContext.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/objectWithoutProperties";import"react/jsx-runtime";import"../../viewport/ViewportProvider.js";import"../../viewport/ViewportContext.js";import{usePickerPropsStore as o}from"../../stores/picker-props-store/usePickerPropsStore.js";import{useFilterStore as s}from"../../stores/filter-store/useFilterStore.js";import{processQueue as n}from"./processQueue.js";import{filterTilesToFetch as l}from"./filterTilesToFetch.js";var p=function(p){var u=p.enabled,a=p.store,c=p.queueRef,m=p.getCachedTile,d=p.setCachedTile,f=t(a,(function(e){return e.getTileStatus})),T=t(a,(function(e){return e.setTileStatus})),h=t(a,(function(e){return e.addWellsToTile})),v=o((function(e){return e.addWellsUsabilityInfo})),g=s((function(e){var t;return null!==(t=e.filters.companyId)&&void 0!==t?t:null}));return e((function(e){if(u&&e){var t=r(e);if(t.length>i)c.current.pending=[];else{var o=l({visibleTiles:t,getTileStatus:f,getCachedTile:m,store:a,addWellsToTile:h});if(0!==o.length){var s=c.current;o.forEach((function(e){s.pending.includes(e)||s.inProgress.has(e)||s.pending.push(e)})),n({queue:s,companyIds:g,addWellsUsabilityInfo:v,setCachedTile:d,addWellsToTile:h,setTileStatus:T})}}}}),[u,h,v,g,m,f,d,T,a,c])};export{p as useHandleBoundsChange};
1
+ import{useCallback as e}from"react";import{useStore as r}from"zustand";import{getTilesForViewport as t,MAX_TILES_FOR_FETCH as i}from"../../utils/tile-math.js";import"lodash";import"../../stores/picker-props-store/PickerPropsStoreContext.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/objectWithoutProperties";import"react/jsx-runtime";import"../../viewport/ViewportProvider.js";import"../../viewport/ViewportContext.js";import{usePickerPropsStore as o}from"../../stores/picker-props-store/usePickerPropsStore.js";import{useFilterStore as s}from"../../stores/filter-store/useFilterStore.js";import{processQueue as l}from"./processQueue.js";import{filterTilesToFetch as n}from"./filterTilesToFetch.js";var u=function(u){var p=u.enabled,a=u.store,d=u.queueRef,c=u.getCachedTile,f=u.setCachedTile,m=r(a,(function(e){return e.getTileStatus})),T=r(a,(function(e){return e.setTileStatus})),h=r(a,(function(e){return e.addWellsToTile})),v=o((function(e){return e.addWellsUsabilityInfo})),g=s((function(e){var r;return null!==(r=e.filters.companyId)&&void 0!==r?r:null})),j=s((function(e){var r;return null===(r=e.filters.drillingWells)||void 0===r||r}));return e((function(e){if(p&&e){var r=t(e);if(r.length>i)d.current.pending=[];else{var o=n({visibleTiles:r,getTileStatus:m,getCachedTile:c,store:a,addWellsToTile:h});if(0!==o.length){var s=d.current;o.forEach((function(e){s.pending.includes(e)||s.inProgress.has(e)||s.pending.push(e)})),l({queue:s,companyIds:g,drillingWells:j,addWellsUsabilityInfo:v,setCachedTile:f,addWellsToTile:h,setTileStatus:T})}}}}),[p,h,v,g,j,c,m,f,T,a,d])};export{u as useHandleBoundsChange};
2
2
  //# sourceMappingURL=useHandleBoundsChange.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useViewportWells.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/useViewportWells/useViewportWells.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,gBAAgB,GAAI,iBAAc,KAAG,IAkDjD,CAAC"}
1
+ {"version":3,"file":"useViewportWells.d.ts","sourceRoot":"","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/useViewportWells/useViewportWells.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,gBAAgB,GAAI,iBAAc,KAAG,IA0DjD,CAAC"}
@@ -1,2 +1,2 @@
1
- import{useRef as e,useEffect as r}from"react";import t from"lodash/debounce";import{useStore as n}from"zustand";import{ViewportStoreContext as o}from"../../stores/viewport-store/ViewportStoreContext.js";import{useContextOrThrow as i}from"../../stores/utils/useContextOrThrow.js";import{useTileCache as s}from"../useTileCache/useTileCache.js";import{DEBOUNCE_DELAY as c}from"./constants.js";import{useHandleBoundsChange as u}from"./useHandleBoundsChange.js";import{useCompanyIdResetEffect as a}from"./useCompanyIdResetEffect.js";var f=function(){var f=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],l=i(o),d=n(l,(function(e){return e.bounds})),m=n(l,(function(e){return e.clearTiles})),p=s(),h=p.getCachedTile,C=p.setCachedTile,T=p.clearCache,g=e({pending:[],inProgress:new Set}),v=e((function(){})),j=e(void 0),b=u({enabled:f,store:l,queueRef:g,getCachedTile:h,setCachedTile:C});v.current=b;var w=e(t((function(e){v.current(e)}),c));r((function(){w.current(d)}),[d]),a(j,{enabled:f,store:l,queueRef:g,clearCache:T,clearTiles:m,handleBoundsChangeRef:v}),r((function(){var e=w.current,r=g.current;return function(){e.cancel(),r.pending=[]}}),[])};export{f as useViewportWells};
1
+ import{useRef as e,useEffect as r}from"react";import t from"lodash/debounce";import{useStore as n}from"zustand";import{ViewportStoreContext as o}from"../../stores/viewport-store/ViewportStoreContext.js";import{useContextOrThrow as s}from"../../stores/utils/useContextOrThrow.js";import{useTileCache as i}from"../useTileCache/useTileCache.js";import{DEBOUNCE_DELAY as c}from"./constants.js";import{useHandleBoundsChange as u}from"./useHandleBoundsChange.js";import{useCompanyIdResetEffect as a}from"./useCompanyIdResetEffect.js";import{useDrillingFilterResetEffect as l}from"./useDrillingFilterResetEffect.js";var f=function(){var f=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],d=s(o),m=n(d,(function(e){return e.bounds})),h=n(d,(function(e){return e.clearTiles})),p=i(),C=p.getCachedTile,g=p.setCachedTile,T=p.clearCache,j=e({pending:[],inProgress:new Set}),R=e((function(){})),v=u({enabled:f,store:d,queueRef:j,getCachedTile:C,setCachedTile:g});R.current=v;var b=e(t((function(e){R.current(e)}),c));r((function(){b.current(m)}),[m]),a({enabled:f,store:d,queueRef:j,clearCache:T,clearTiles:h,handleBoundsChangeRef:R}),l({enabled:f,store:d,queueRef:j,clearCache:T,clearTiles:h,handleBoundsChangeRef:R}),r((function(){var e=b.current,r=j.current;return function(){e.cancel(),r.pending=[]}}),[])};export{f as useViewportWells};
2
2
  //# sourceMappingURL=useViewportWells.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"doesWellPassFilters.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV5/utils/doesWellPassFilters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAOhE,eAAO,MAAM,yBAAyB,EAAE,CAAC,MAAM,WAAW,CAAC,EAU1D,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,WAAW,CAAC,EAAE,CAAC,MAAM,WAAW,CAAC,EAAE,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,0BAErC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,MAAM,cAAc,EACpB,SAAS,WAAW,GAAG,IAAI,EAC3B,UAAU,0BAA0B,KACnC,OAiDF,CAAC"}
1
+ {"version":3,"file":"doesWellPassFilters.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV5/utils/doesWellPassFilters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAMhE,eAAO,MAAM,yBAAyB,EAAE,CAAC,MAAM,WAAW,CAAC,EAU1D,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,WAAW,CAAC,EAAE,CAAC,MAAM,WAAW,CAAC,EAAE,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,0BAErC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,MAAM,cAAc,EACpB,SAAS,WAAW,GAAG,IAAI,EAC3B,UAAU,0BAA0B,KACnC,OA0CF,CAAC"}
@@ -1,2 +1,2 @@
1
- import r from"@babel/runtime/helpers/slicedToArray";import{getTimestampByPeriod as e}from"./getTimestampByPeriod.js";var i=/\sST0/,n=/workover/i,t=["status","companyId","rigName","programName","basin","county","area","formation","stringDesign"],a={excludeKeys:["rigName"]},l=function(a,l,u){var o;if(!l)return!0;var s,m=null==u?void 0:u.excludeKeys;if(!t.every((function(r){if(null!=m&&m.includes(r))return!0;var e=l[r];return!(Array.isArray(e)&&e.length>0)||e.includes(a[r])})))return!1;if(l.sideTracks&&i.test(null!==(o=a.name)&&void 0!==o?o:""))return!1;if(l.drillingWells&&(void 0===a.lastDrillingAt||n.test(null!==(s=a.name)&&void 0!==s?s:"")))return!1;var d=l.period,v=l.timeRangeFrom,f=l.timeRangeTo,c=e(d,v,f),g=r(c,2),y=g[0],p=g[1];if(null!==y&&null!==p&&Number.isFinite(y)&&Number.isFinite(p)){var b=a.lastActive;if(void 0===b||!(b>=y&&b<=p))return!1}return!0};export{a as EXCLUDE_RIG_NAME_FILTER,t as WELL_PROPERTY_FILTER_KEYS,l as doesWellPassFilters};
1
+ import r from"@babel/runtime/helpers/slicedToArray";import{getTimestampByPeriod as e}from"./getTimestampByPeriod.js";var i=/\sST0/,n=["status","companyId","rigName","programName","basin","county","area","formation","stringDesign"],t={excludeKeys:["rigName"]},a=function(t,a,u){var s;if(!a)return!0;var o=null==u?void 0:u.excludeKeys;if(!n.every((function(r){if(null!=o&&o.includes(r))return!0;var e=a[r];return!(Array.isArray(e)&&e.length>0)||e.includes(t[r])})))return!1;if(a.sideTracks&&i.test(null!==(s=t.name)&&void 0!==s?s:""))return!1;var l=a.period,m=a.timeRangeFrom,d=a.timeRangeTo,c=e(l,m,d),f=r(c,2),v=f[0],g=f[1];if(null!==v&&null!==g&&Number.isFinite(v)&&Number.isFinite(g)){var y=t.lastActive;if(void 0===y||!(y>=v&&y<=g))return!1}return!0};export{t as EXCLUDE_RIG_NAME_FILTER,n as WELL_PROPERTY_FILTER_KEYS,a as doesWellPassFilters};
2
2
  //# sourceMappingURL=doesWellPassFilters.js.map
@@ -0,0 +1,3 @@
1
+ import type { FilterableWell } from './doesWellPassFilters';
2
+ export declare const isDrillingOnlyWell: (well: FilterableWell) => boolean;
3
+ //# sourceMappingURL=isDrillingOnlyWell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isDrillingOnlyWell.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV5/utils/isDrillingOnlyWell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAI5D,eAAO,MAAM,kBAAkB,GAAI,MAAM,cAAc,KAAG,OACkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ var r=/workover/i,t=function(t){var i;return void 0!==t.lastDrillingAt&&!r.test(null!==(i=t.name)&&void 0!==i?i:"")};export{t as isDrillingOnlyWell};
2
+ //# sourceMappingURL=isDrillingOnlyWell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isDrillingOnlyWell.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,6 +1,8 @@
1
+ import { ReactNode } from 'react';
1
2
  import { ProviderProps } from './Provider';
2
3
  import { Store, TemplateData } from './types';
3
4
  type TemplatesControlInnerProps = {
5
+ toggleContent?: ReactNode;
4
6
  disabled?: boolean;
5
7
  className?: string;
6
8
  testId?: string;
@@ -54,12 +56,17 @@ export type TemplatesControlProps<T extends TemplateData> = {
54
56
  * Additional controls to render in template menu. `TemplatesControlAdditionalControlProps` type is exported for convenience.
55
57
  */
56
58
  templateControls?: Store<T>['templateControls'];
57
- } & TemplatesControlInnerProps;
59
+ /**
60
+ * Content to show inside of toggle
61
+ */
62
+ toggleContent?: ReactNode;
63
+ } & Omit<TemplatesControlInnerProps, 'toggleContent'>;
58
64
  export declare const TemplatesControl: {
59
- <T extends TemplateData>({ testId, className, disabled, ...providerProps }: TemplatesControlProps<T>): JSX.Element;
65
+ <T extends TemplateData>({ testId, className, disabled, toggleContent, ...providerProps }: TemplatesControlProps<T>): JSX.Element;
60
66
  Provider: <T extends TemplateData>({ children, presetTemplates, onChange, foldersEnabled, templateIconColors, templateIconMap, defaultTemplateIcon, currentTemplateId, templateSettings, publishEnabled, getDefaultTemplate, defaultTemplateIconColor, filterInitialTemplates, templateControls, reloadListOnOpen, }: ProviderProps<T>) => JSX.Element;
61
67
  Toggle: import("react").ForwardRefExoticComponent<import("./Toggle").ToggleProps & import("react").RefAttributes<HTMLButtonElement>>;
62
68
  Popover: ({ anchorEl, placement, disabled }: import("./Popover").PopoverProps) => JSX.Element | null;
69
+ ToggleDisplayDefault: ({ showNewTag }: import("./ToggleDisplayDefault").ToggleDisplayDefaultProps) => JSX.Element;
63
70
  GetHeaderElement: (target?: HTMLElement | null | undefined) => HTMLElement | undefined;
64
71
  };
65
72
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"TemplatesControl.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TemplatesControl/TemplatesControl.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAY,aAAa,EAAE,MAAM,YAAY,CAAC;AAGrD,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE9C,KAAK,0BAA0B,GAAG;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,YAAY,IAAI;IAC1D;;OAEG;IACH,iBAAiB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;IAC1D;;OAEG;IACH,gBAAgB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;IACxD;;OAEG;IACH,eAAe,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;IACtD,cAAc,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACpD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;IACxD,cAAc,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACpD,kBAAkB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC;IAC5D;;OAEG;IACH,wBAAwB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC;IACxE,eAAe,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;IACtD,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC;IAC9D;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAExC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC;IAC5D;;OAEG;IACH,sBAAsB,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,wBAAwB,CAAC,CAAC;IAErE;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;CACjD,GAAG,0BAA0B,CAAC;AAiB/B,eAAO,MAAM,gBAAgB;KAAI,CAAC,SAAS,YAAY,qDAKpD,qBAAqB,CAAC,CAAC,CAAC;;;;;CAM1B,CAAC"}
1
+ {"version":3,"file":"TemplatesControl.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TemplatesControl/TemplatesControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,OAAO,CAAC;AAIzD,OAAO,EAAY,aAAa,EAAE,MAAM,YAAY,CAAC;AAGrD,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG9C,KAAK,0BAA0B,GAAG;IAChC,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,YAAY,IAAI;IAC1D;;OAEG;IACH,iBAAiB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;IAC1D;;OAEG;IACH,gBAAgB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;IACxD;;OAEG;IACH,eAAe,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;IACtD,cAAc,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACpD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;IACxD,cAAc,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IACpD,kBAAkB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC;IAC5D;;OAEG;IACH,wBAAwB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC;IACxE,eAAe,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;IACtD,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC;IAC9D;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAExC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC;IAC5D;;OAEG;IACH,sBAAsB,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,wBAAwB,CAAC,CAAC;IAErE;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;IAEhD;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B,GAAG,IAAI,CAAC,0BAA0B,EAAE,eAAe,CAAC,CAAC;AAwBtD,eAAO,MAAM,gBAAgB;KAAI,CAAC,SAAS,YAAY,oEAMpD,qBAAqB,CAAC,CAAC,CAAC;;;;;;CAW1B,CAAC"}
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import t from"@babel/runtime/helpers/slicedToArray";import{jsx as o,jsxs as i,Fragment as s}from"react/jsx-runtime";import{useState as n,useCallback as c}from"react";import{findAppHeaderElement as a}from"../utils.js";import{Provider as l}from"./Provider/Provider.js";import{Toggle as p}from"./Toggle/Toggle.js";import{Popover as m}from"./Popover/Popover.js";var b=["testId","className","disabled"];function d(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function f(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?d(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var u=function(e){var r=e.className,l=e.testId,b=e.disabled,d=n(),f=t(d,2),u=f[0],j=f[1],O=c((function(e){j(a(e))}),[]);return i(s,{children:[o(p,{className:r,testId:l,ref:O,disabled:b}),o(m,{anchorEl:u,disabled:b})]})},j=function(e){var t=e.testId,i=e.className,s=e.disabled,n=r(e,b);return o(l,f(f({},n),{},{children:o(u,{testId:t,className:i,disabled:s})}))};j.Provider=l,j.Toggle=p,j.Popover=m,j.GetHeaderElement=a;export{j as TemplatesControl};
1
+ import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import t from"@babel/runtime/helpers/slicedToArray";import{jsx as o,jsxs as i,Fragment as n}from"react/jsx-runtime";import{useState as l,useCallback as s}from"react";import{findAppHeaderElement as a}from"../utils.js";import{Provider as c}from"./Provider/Provider.js";import{Toggle as p}from"./Toggle/Toggle.js";import{Popover as m}from"./Popover/Popover.js";import{ToggleDisplayDefault as f}from"./ToggleDisplayDefault/ToggleDisplayDefault.js";var d=["testId","className","disabled","toggleContent"];function b(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function g(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?b(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):b(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var u=function(e){var r=e.className,c=e.testId,f=e.disabled,d=e.toggleContent,b=l(),g=t(b,2),u=g[0],j=g[1],O=s((function(e){j(a(e))}),[]);return i(n,{children:[o(p,{className:r,testId:c,ref:O,disabled:f,children:d}),o(m,{anchorEl:u,disabled:f})]})},j=function(e){var t=e.testId,i=e.className,n=e.disabled,l=e.toggleContent,s=r(e,d);return o(c,g(g({},s),{},{children:o(u,{testId:t,className:i,disabled:n,toggleContent:l})}))};j.Provider=c,j.Toggle=p,j.Popover=m,j.ToggleDisplayDefault=f,j.GetHeaderElement=a;export{j as TemplatesControl};
2
2
  //# sourceMappingURL=TemplatesControl.js.map
@@ -16,4 +16,5 @@ export declare const PreprocessingTemplates: () => JSX.Element;
16
16
  export declare const WithCustomTemplateControls: () => JSX.Element;
17
17
  export declare const AdvancedUsage: () => JSX.Element;
18
18
  export declare const WithListReloadOnPopoverOpenDisabled: () => JSX.Element;
19
+ export declare const NewTagAndCustomButtonContent: () => JSX.Element;
19
20
  //# sourceMappingURL=TemplatesControl.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TemplatesControl.stories.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TemplatesControl/TemplatesControl.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAA4D,MAAM,OAAO,CAAC;AAkBjG,OAAO,EAEL,gBAAgB,EAEjB,MAAM,SAAS,CAAC;AAGjB,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAErD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AA4BF,eAAe,IAAI,CAAC;AAqIpB,eAAO,MAAM,OAAO,GAAI,OAAO,KAAK,gBAgEnC,CAAC;AAeF,eAAO,MAAM,mBAAmB,mBAK/B,CAAC;AAMF,eAAO,MAAM,gBAAgB,mBA0D5B,CAAC;AAMF,eAAO,MAAM,iCAAiC,mBA0D7C,CAAC;AAOF,eAAO,MAAM,wBAAwB,mBAoCpC,CAAC;AAMF,eAAO,MAAM,mBAAmB,mBAE/B,CAAC;AAKF,eAAO,MAAM,mBAAmB,mBAE/B,CAAC;AAKF,eAAO,MAAM,0BAA0B,mBA0DtC,CAAC;AASF,eAAO,MAAM,sBAAsB,mBAelC,CAAC;AAMF,eAAO,MAAM,0BAA0B,mBAgCtC,CAAC;AAMF,eAAO,MAAM,aAAa,mBAiEzB,CAAC;AAiBF,eAAO,MAAM,mCAAmC,mBAI/C,CAAC"}
1
+ {"version":3,"file":"TemplatesControl.stories.d.ts","sourceRoot":"","sources":["../../../src/componentsV2/TemplatesControl/TemplatesControl.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAA4D,MAAM,OAAO,CAAC;AAkBjG,OAAO,EAEL,gBAAgB,EAEjB,MAAM,SAAS,CAAC;AAGjB,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAErD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AA6BF,eAAe,IAAI,CAAC;AAuIpB,eAAO,MAAM,OAAO,GAAI,OAAO,KAAK,gBAgEnC,CAAC;AAeF,eAAO,MAAM,mBAAmB,mBAK/B,CAAC;AAMF,eAAO,MAAM,gBAAgB,mBA0D5B,CAAC;AAMF,eAAO,MAAM,iCAAiC,mBA0D7C,CAAC;AAOF,eAAO,MAAM,wBAAwB,mBAoCpC,CAAC;AAMF,eAAO,MAAM,mBAAmB,mBAE/B,CAAC;AAKF,eAAO,MAAM,mBAAmB,mBAE/B,CAAC;AAKF,eAAO,MAAM,0BAA0B,mBA0DtC,CAAC;AASF,eAAO,MAAM,sBAAsB,mBAelC,CAAC;AAMF,eAAO,MAAM,0BAA0B,mBAgCtC,CAAC;AAMF,eAAO,MAAM,aAAa,mBAiEzB,CAAC;AAkBF,eAAO,MAAM,mCAAmC,mBAI/C,CAAC;AAMF,eAAO,MAAM,4BAA4B,mBA2DxC,CAAC"}
@@ -1,7 +1,9 @@
1
+ import { ReactNode } from 'react';
1
2
  import { User } from '../../../types';
2
3
  import { Template } from '../types';
3
4
  export declare const getTemplateDisplayType: (template: Template, currentUser?: User) => string | undefined;
4
5
  export type ToggleProps = {
6
+ children?: ReactNode;
5
7
  disabled?: boolean;
6
8
  className?: string;
7
9
  testId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../../../src/componentsV2/TemplatesControl/Toggle/Toggle.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAMpC,eAAO,MAAM,sBAAsB,GAAI,UAAU,QAAQ,EAAE,cAAc,IAAI,uBAc5E,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,MAAM,2GA+FlB,CAAC"}
1
+ {"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../../../src/componentsV2/TemplatesControl/Toggle/Toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAoB,MAAM,OAAO,CAAC;AAehE,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAQpC,eAAO,MAAM,sBAAsB,GAAI,UAAU,QAAQ,EAAE,cAAc,IAAI,uBAc5E,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,MAAM,2GAyFlB,CAAC"}
@@ -1,2 +1,2 @@
1
- import o from"@babel/runtime/helpers/slicedToArray";import{jsxs as s,Fragment as t,jsx as e}from"react/jsx-runtime";import{forwardRef as i,useState as n,useRef as r}from"react";import{Button as c}from"../../Button/Button.js";import{storeApi as m}from"../Store/Store.js";import"../Store/utils.js";import{TextEndTruncated as p}from"../../TextEndTruncated/TextEndTruncated.js";import{UnsavedChangesBadge as a}from"../UnsavedChangesBadge/UnsavedChangesBadge.js";import{Skeleton as l}from"../../Skeleton/Skeleton.js";import{Menu as u}from"../../Menu/Menu.js";import{Text as d}from"../../Text/Text.js";import{CopyTemplate as j}from"../templateMenuItems/CopyTemplate.js";import{isOwnTemplate as I}from"../utils.js";import"../types.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/objectWithoutProperties";import"@icon-park/react/es/all";import"../../../icons/IconParkProvider.js";import"../../../icons/customIcons/icons/AddMessage.js";import"../../../icons/customIcons/icons/Attention.js";import"../../../icons/customIcons/icons/Collapse.js";import"../../../icons/customIcons/icons/Dashboard.js";import"../../../icons/customIcons/icons/Expand.js";import"../../../icons/customIcons/icons/FolderClosed.js";import"../../../icons/customIcons/icons/FolderClosedFilled.js";import"../../../icons/customIcons/icons/FolderOpened.js";import"../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../icons/customIcons/icons/LessOrEqual.js";import"../../../icons/customIcons/icons/Search.js";import"../../../icons/customIcons/icons/SearchOne.js";import"../../../icons/customIcons/icons/Wellhub.js";import"../../../icons/customIcons/icons/MultiRuler.js";import"../../../icons/customIcons/icons/Checkbox.js";import"../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../icons/customIcons/icons/Radio.js";import"../../../icons/customIcons/icons/RadioChecked.js";import"../../../icons/customIcons/icons/SimulFrac.js";import"../../../icons/customIcons/icons/ZipperFrac.js";import"../../../icons/customIcons/icons/CautionFilled.js";import"../../../icons/customIcons/icons/MoreApp.js";import"../../../icons/customIcons/icons/Pad.js";import"../../../icons/customIcons/icons/DrilloutUnit.js";import"../../../icons/customIcons/icons/FracFleet.js";import"../../../icons/customIcons/icons/Global.js";import"../../../icons/customIcons/icons/Program.js";import"../../../icons/customIcons/icons/Rig.js";import"../../../icons/customIcons/icons/Well.js";import"../../../icons/customIcons/icons/Gap.js";import"../../../icons/customIcons/icons/Pin.js";import"../../../icons/customIcons/icons/CloseOneFilled.js";import"../../../icons/customIcons/icons/AttentionFilled.js";import"../../../icons/customIcons/icons/CheckOneFilled.js";import"../../../icons/customIcons/icons/Archive.js";import"../../../icons/customIcons/icons/ArchiveCancel.js";import"../../../icons/customIcons/icons/Unarchive.js";import"../../../icons/customIcons/icons/Archived.js";import"../../../icons/customIcons/icons/InterventionUnit.js";import"../../../icons/customIcons/icons/CloudDelete.js";import"../../../icons/customIcons/icons/Lasso.js";import"../../../icons/customIcons/icons/Radius.js";import"../../TextInput/TextInput.js";import"../../ButtonIcon/ButtonIcon.js";import"@material-ui/core";import"classnames";import"../../../components/DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js";import"../../../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"uuid";import"../../Tooltip/Tooltip.scss.js";import"../MoveToFolderMenu/MoveToFolderMenu.scss.js";import"../templateMenuItems/TemplateMenuItems.scss.js";import{PublishTemplate as v}from"../templateMenuItems/PublishTemplate.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/regenerator";import"lodash";import"../../ModalWindow/ModalWindow.js";import"../../Modal/Modal.scss.js";import"../../LoaderLogo/LoaderLogo.constants.js";import"../../LoaderLogo/LoaderLogo.scss.js";import"../../EmptyState/EmptyState.scss.js";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions/constants.js";import"querystring";import"uuid/v1";import"../../../clients/subscriptions.v1.js";import"../../../clients/subscriptions/subscriptions-client.factory.js";import"immutable";import"query-string";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/appPackages.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import{CORVA_COMPANY_ID as h}from"../../../constants/corvaCompanyId.js";import"../../../components/GradientManager/configuration/constants.js";import"../../../utils/index.js";import"jsona";import"../../../utils/env.js";import"../../../components/StatusBadge/constants.js";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../clients/api/apiCore.js";import"../../../clients/constants.js";import"../../../clients/sso/auth0.js";import"../../../clients/sso/oauth2.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../constants/streamSourceType.js";import"../../../components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../AppCommonsProvider/AppCommonsProvider.js";import{useAppCommons as C}from"../../AppCommonsProvider/AppCommonsContext.js";import"../../AppSettings/AppSettingsPinningContext.js";import{useCombineRefs as f}from"../../../effects/useCombineRefs.js";import"../ShareModal/Item.js";import"../ShareModal/ShareModal.scss.js";import{RevertTemplate as b}from"../templateMenuItems/RevertTemplate.js";import{RemoveTemplate as T}from"../templateMenuItems/RemoveTemplate.js";import g from"./Toggle.scss.js";var M=function(o,s){return o.shared?"Shared":o.isPreset?"Corva":o.published?(null==s?void 0:s.company_id)!==h?null==s?void 0:s.company_name:"Company":"Your Own"},y=i((function(i,h){var y=i.testId,A=i.className,P=i.disabled,S=m.useOpenPopover,x=m.useIsPopoverOpen,D=m.useSelectedTemplate,F=m.useHasUnsavedChanges,E=m.useIsInitialized,k=m.useTemplateIcon,L=m.useTemplateIconColor,N=S(),O=x(),B=D(),R=F(null==B?void 0:B.id),U=E(),w=L(B),z=k(B),G=C().currentUser,W=n(!1),q=o(W,2),Y=q[0],H=q[1],_=r(),Z=r(null),J=function(){clearTimeout(_.current),H(!0)},K=function(){clearTimeout(_.current),_.current=setTimeout((function(){H(!1)}),500)},Q=f(h,Z);return s(t,{children:[e(c,{disabled:P,size:"small",className:A,type:O?"chartColored":"chart",testId:y,onClick:N,ref:Q,prefix:U&&B?e(z,{color:w,size:20}):void 0,suffix:R&&e(a,{}),onMouseEnter:J,onMouseLeave:K,children:e(p,{className:g.title,disableTooltip:!0,children:U?(null==B?void 0:B.name)||"Templates":e(l,{className:g.skeleton})})}),B&&!P&&s(u,{open:Y&&!O,anchorEl:Z.current,backdrop:!1,onMouseEnter:J,onMouseLeave:K,className:g.menu,children:[s("div",{className:g.menuHeader,children:[e(d,{size:12,tagName:"div",children:I(B)?"Modifying Your Own Template.":M(B,G)}),e(d,{size:12,color:"T6",className:g.menuSubTitle,children:"Your changes are saved locally only"})]}),e(j,{template:B}),e(u.Divider,{className:g.divider}),e(v,{template:B}),e(b,{template:B,dividerClassName:g.divider}),e(T,{template:B,dividerClassName:g.divider})]})]})}));export{y as Toggle,M as getTemplateDisplayType};
1
+ import o from"@babel/runtime/helpers/slicedToArray";import{jsxs as s,Fragment as t,jsx as e}from"react/jsx-runtime";import{forwardRef as i,useState as n,useRef as r}from"react";import c from"classnames";import{Button as m}from"../../Button/Button.js";import{storeApi as p}from"../Store/Store.js";import"../Store/utils.js";import{Menu as a}from"../../Menu/Menu.js";import{Text as l}from"../../Text/Text.js";import{CopyTemplate as u}from"../templateMenuItems/CopyTemplate.js";import{isOwnTemplate as d}from"../utils.js";import"../types.js";import{DownIcon as j}from"../../../icons/iconParkIcons.js";import"../../../icons/customIcons/icons/AddMessage.js";import"../../../icons/customIcons/icons/Attention.js";import"../../../icons/customIcons/icons/Collapse.js";import"../../../icons/customIcons/icons/Dashboard.js";import"../../../icons/customIcons/icons/Expand.js";import"../../../icons/customIcons/icons/FolderClosed.js";import"../../../icons/customIcons/icons/FolderClosedFilled.js";import"../../../icons/customIcons/icons/FolderOpened.js";import"../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../icons/customIcons/icons/LessOrEqual.js";import"../../../icons/customIcons/icons/Search.js";import"../../../icons/customIcons/icons/SearchOne.js";import"../../../icons/customIcons/icons/Wellhub.js";import"../../../icons/customIcons/icons/MultiRuler.js";import"../../../icons/customIcons/icons/Checkbox.js";import"../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../icons/customIcons/icons/Radio.js";import"../../../icons/customIcons/icons/RadioChecked.js";import"../../../icons/customIcons/icons/SimulFrac.js";import"../../../icons/customIcons/icons/ZipperFrac.js";import"../../../icons/customIcons/icons/CautionFilled.js";import"../../../icons/customIcons/icons/MoreApp.js";import"../../../icons/customIcons/icons/Pad.js";import"../../../icons/customIcons/icons/DrilloutUnit.js";import"../../../icons/customIcons/icons/FracFleet.js";import"../../../icons/customIcons/icons/Global.js";import"../../../icons/customIcons/icons/Program.js";import"../../../icons/customIcons/icons/Rig.js";import"../../../icons/customIcons/icons/Well.js";import"../../../icons/customIcons/icons/Gap.js";import"../../../icons/customIcons/icons/Pin.js";import"../../../icons/customIcons/icons/CloseOneFilled.js";import"../../../icons/customIcons/icons/AttentionFilled.js";import"../../../icons/customIcons/icons/CheckOneFilled.js";import"../../../icons/customIcons/icons/Archive.js";import"../../../icons/customIcons/icons/ArchiveCancel.js";import"../../../icons/customIcons/icons/Unarchive.js";import"../../../icons/customIcons/icons/Archived.js";import"../../../icons/customIcons/icons/InterventionUnit.js";import"../../../icons/customIcons/icons/CloudDelete.js";import"../../../icons/customIcons/icons/Lasso.js";import"../../../icons/customIcons/icons/Radius.js";import"lodash";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/objectWithoutProperties";import"@material-ui/core";import"../../../components/DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js";import"../../../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"uuid";import"../../Tooltip/Tooltip.scss.js";import"../../TextEndTruncated/TextEndTruncated.scss.js";import"../../TextInput/TextInput.js";import"../../ButtonIcon/ButtonIcon.js";import"../MoveToFolderMenu/MoveToFolderMenu.scss.js";import"../templateMenuItems/TemplateMenuItems.scss.js";import{PublishTemplate as I}from"../templateMenuItems/PublishTemplate.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/regenerator";import"../../ModalWindow/ModalWindow.js";import"../../Modal/Modal.scss.js";import"../../LoaderLogo/LoaderLogo.constants.js";import"../../LoaderLogo/LoaderLogo.scss.js";import"../../EmptyState/EmptyState.scss.js";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions/constants.js";import"querystring";import"uuid/v1";import"../../../clients/subscriptions.v1.js";import"../../../clients/subscriptions/subscriptions-client.factory.js";import"immutable";import"query-string";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/appPackages.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import{CORVA_COMPANY_ID as v}from"../../../constants/corvaCompanyId.js";import"../../../components/GradientManager/configuration/constants.js";import"../../../utils/index.js";import"jsona";import"../../../utils/env.js";import"../../../components/StatusBadge/constants.js";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../clients/api/apiCore.js";import"../../../clients/constants.js";import"../../../clients/sso/auth0.js";import"../../../clients/sso/oauth2.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../constants/streamSourceType.js";import"../../../components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../AppCommonsProvider/AppCommonsProvider.js";import{useAppCommons as h}from"../../AppCommonsProvider/AppCommonsContext.js";import"../../AppSettings/AppSettingsPinningContext.js";import{useCombineRefs as C}from"../../../effects/useCombineRefs.js";import"../ShareModal/Item.js";import"../ShareModal/ShareModal.scss.js";import{RevertTemplate as f}from"../templateMenuItems/RevertTemplate.js";import{RemoveTemplate as b}from"../templateMenuItems/RemoveTemplate.js";import{ToggleDisplayDefault as T}from"../ToggleDisplayDefault/ToggleDisplayDefault.js";import g from"./Toggle.scss.js";var M=function(o,s){return o.shared?"Shared":o.isPreset?"Corva":o.published?(null==s?void 0:s.company_id)!==v?null==s?void 0:s.company_name:"Company":"Your Own"},y=i((function(i,v){var y=i.testId,A=i.className,D=i.disabled,P=i.children,S=p.useOpenPopover,x=p.useIsPopoverOpen,F=p.useSelectedTemplate,E=p.useIsInitialized,L=p.useTemplateIcon,O=p.useTemplateIconColor,k=S(),N=x(),R=F(),w=E(),B=O(R),z=L(R),G=h().currentUser,W=n(!1),q=o(W,2),U=q[0],Y=q[1],_=r(),H=r(null),Z=function(){clearTimeout(_.current),Y(!0)},J=function(){clearTimeout(_.current),_.current=setTimeout((function(){Y(!1)}),500)},K=C(v,H);return s(t,{children:[e(m,{disabled:D,size:"small",className:c(g.button,A),type:"chartColored",testId:y,onClick:k,ref:K,prefix:w&&R?e(z,{color:B,size:20}):void 0,suffix:e(j,{className:c(g.chevron,N&&g.chevronOpen)}),onMouseEnter:Z,onMouseLeave:J,children:P||e(T,{})}),R&&!D&&s(a,{open:U&&!N,anchorEl:H.current,backdrop:!1,onMouseEnter:Z,onMouseLeave:J,className:g.menu,children:[s("div",{className:g.menuHeader,children:[e(l,{size:12,tagName:"div",children:d(R)?"Modifying Your Own Template.":M(R,G)}),e(l,{size:12,color:"T6",className:g.menuSubTitle,children:"Your changes are saved locally only"})]}),e(u,{template:R}),e(a.Divider,{className:g.divider}),e(I,{template:R}),e(f,{template:R,dividerClassName:g.divider}),e(b,{template:R,dividerClassName:g.divider})]})]})}));export{y as Toggle,M as getTemplateDisplayType};
2
2
  //# sourceMappingURL=Toggle.js.map
@@ -1,2 +1,2 @@
1
- import e from'./../../../ext-esm/style-inject/dist/style-inject.es.js';var _={spacing:"8",title:"Toggle_title__HB9JI",skeleton:"Toggle_skeleton__-SAF0",menu:"Toggle_menu__Vusn9",menuHeader:"Toggle_menuHeader__EhPo4",menuSubTitle:"Toggle_menuSubTitle__bYlKm",divider:"Toggle_divider__6F3fh"};e(".Toggle_title__HB9JI{font-size:16px;line-height:20px;max-width:170px}.Toggle_skeleton__-SAF0{min-width:100px}.Toggle_menu__Vusn9{width:233px}.Toggle_menuHeader__EhPo4{background:var(--palette-background-b-10);margin:-8px -16px 0;padding:8px 16px;position:relative;z-index:1}.Toggle_menuSubTitle__bYlKm{margin-top:4px}.Toggle_divider__6F3fh+.Toggle_divider__6F3fh,.Toggle_divider__6F3fh:last-child{display:none}");export{_ as default};
1
+ import e from'./../../../ext-esm/style-inject/dist/style-inject.es.js';var o={spacing:"8",button:"Toggle_button__htZFP",menu:"Toggle_menu__Vusn9",menuHeader:"Toggle_menuHeader__EhPo4",menuSubTitle:"Toggle_menuSubTitle__bYlKm",divider:"Toggle_divider__6F3fh",chevron:"Toggle_chevron__AVCgF",chevronOpen:"Toggle_chevronOpen__fzOfr"};e(".Toggle_button__htZFP .MuiButton-root{background:rgb(from var(--palette-primary-main) r g b/.16);line-height:20px}.Toggle_button__htZFP .MuiButton-root.Mui-focusVisible,.Toggle_button__htZFP .MuiButton-root:focus,.Toggle_button__htZFP .MuiButton-root:hover{background:rgb(from var(--palette-primary-main) r g b/.24)}.Toggle_button__htZFP .MuiButton-root .MuiButton-label{line-height:20px}.Toggle_menu__Vusn9{width:233px}.Toggle_menuHeader__EhPo4{background:var(--palette-background-b-10);margin:-8px -16px 0;padding:8px 16px;position:relative;z-index:1}.Toggle_menuSubTitle__bYlKm{margin-top:4px}.Toggle_divider__6F3fh+.Toggle_divider__6F3fh,.Toggle_divider__6F3fh:last-child{display:none}.Toggle_chevron__AVCgF{transition:transform .15s cubic-bezier(.4,0,.2,1)}.Toggle_chevronOpen__fzOfr{transform:rotate(180deg)}");export{o as default};
2
2
  //# sourceMappingURL=Toggle.scss.js.map
@@ -0,0 +1,5 @@
1
+ export type ToggleDisplayDefaultProps = {
2
+ showNewTag?: boolean;
3
+ };
4
+ export declare const ToggleDisplayDefault: ({ showNewTag }: ToggleDisplayDefaultProps) => JSX.Element;
5
+ //# sourceMappingURL=ToggleDisplayDefault.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToggleDisplayDefault.d.ts","sourceRoot":"","sources":["../../../../src/componentsV2/TemplatesControl/ToggleDisplayDefault/ToggleDisplayDefault.tsx"],"names":[],"mappings":"AAQA,MAAM,MAAM,yBAAyB,GAAG;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,gBAAgB,yBAAyB,gBA0B7E,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{jsx as e,jsxs as s}from"react/jsx-runtime";import{TextEndTruncated as a}from"../../TextEndTruncated/TextEndTruncated.js";import{UnsavedChangesBadge as t}from"../UnsavedChangesBadge/UnsavedChangesBadge.js";import{storeApi as r}from"../Store/Store.js";import"../Store/utils.js";import{Tag as l}from"../../Tag/Tag.js";import{Skeleton as o}from"../../Skeleton/Skeleton.js";import i from"./ToggleDisplayDefault.scss.js";var m=function(m){var n=m.showNewTag,d=r.useSelectedTemplate,c=r.useHasUnsavedChanges,p=r.useIsInitialized,g=d(),T=c(null==g?void 0:g.id);return p()?s("div",{className:i.root,children:[e("span",{className:i.titlePrefix,children:g?"Template:":"Templates"})," ",g&&e(a,{className:i.title,disableTooltip:!0,children:g.name}),T&&e(t,{className:i.changeBadge}),!T&&n&&e(l,{size:"small",state:"light",className:i.newTag,children:"New!"})]}):e(o,{className:i.skeleton})};export{m as ToggleDisplayDefault};
2
+ //# sourceMappingURL=ToggleDisplayDefault.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToggleDisplayDefault.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import e from'./../../../ext-esm/style-inject/dist/style-inject.es.js';var l={spacing:"8",root:"ToggleDisplayDefault_root__c5pOP",titlePrefix:"ToggleDisplayDefault_titlePrefix__Kmuhf",title:"ToggleDisplayDefault_title__RTXYG",changeBadge:"ToggleDisplayDefault_changeBadge__Mnev6",newTag:"ToggleDisplayDefault_newTag__KPKQw",skeleton:"ToggleDisplayDefault_skeleton__xgwes"};e(".ToggleDisplayDefault_root__c5pOP{opacity:1;white-space:nowrap}.ToggleDisplayDefault_titlePrefix__Kmuhf{color:var(--palette-primary-text-6);display:inline-block;vertical-align:middle}.ToggleDisplayDefault_title__RTXYG{display:inline-block;max-width:170px;vertical-align:middle}.ToggleDisplayDefault_changeBadge__Mnev6{display:inline-flex;margin-left:8px;vertical-align:middle}.ToggleDisplayDefault_newTag__KPKQw{margin-left:8px}.ToggleDisplayDefault_skeleton__xgwes{min-width:150px}");export{l as default};
2
+ //# sourceMappingURL=ToggleDisplayDefault.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,aAAa,yDAA4D;"}
@@ -0,0 +1,2 @@
1
+ export * from './ToggleDisplayDefault';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/componentsV2/TemplatesControl/ToggleDisplayDefault/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -228,7 +228,7 @@ const validateDsn = (dsn) => {
228
228
 
229
229
  const MCP_SERVER_VERSION = '1.1.0';
230
230
 
231
- var version = "3.55.0-7";
231
+ var version = "3.55.0-9";
232
232
 
233
233
  const CORVA_UI_VERSION = version;
234
234
 
@@ -6722,6 +6722,12 @@ var componentsV2Data = [
6722
6722
  type: "Store<T>['templateControls']",
6723
6723
  required: false,
6724
6724
  description: "Additional controls to render in template menu. `TemplatesControlAdditionalControlProps` type is exported for convenience."
6725
+ },
6726
+ {
6727
+ name: "toggleContent",
6728
+ type: "ReactNode",
6729
+ required: false,
6730
+ description: "Content to show inside of toggle"
6725
6731
  }
6726
6732
  ],
6727
6733
  examples: [
@@ -6777,13 +6783,18 @@ var componentsV2Data = [
6777
6783
  },
6778
6784
  {
6779
6785
  name: "AdvancedUsage",
6780
- description: "You can use `<TemplateControls/>`'s constituent parts to hook into its lifecycle, get data, and perform actions.\n\nComponents:\n```\nTemplatesControl.Provider\nTemplatesControl.Toggle\nTemplatesControl.Popover\n```\nUtilities:\n```\nTemplatesControl.GetHeaderElement\ngetTemplatesControlStoreApi<T>\n```",
6786
+ description: "You can use `<TemplateControls/>`'s constituent parts to hook into its lifecycle, get data, and perform actions.\n\nComponents:\n```\nTemplatesControl.Provider\nTemplatesControl.Toggle\nTemplatesControl.Popover\nTemplatesControl.ToggleDisplayDefault\n```\nUtilities:\n```\nTemplatesControl.GetHeaderElement\ngetTemplatesControlStoreApi<T>\n```",
6781
6787
  code: "{\n const [anchorElement, setAnchorElement] = useState<HTMLElement>();\n\n const setHeaderNode = useCallback((buttonRef: HTMLButtonElement) => {\n setAnchorElement(TemplatesControl.GetHeaderElement(buttonRef));\n }, []);\n\n // Creating API with correct Templates' data type\n const API = useMemo(() => getTemplatesControlStoreApi<Data>(), []);\n\n // All magic happens here\n const InnerComponent = useMemo(\n () => () => {\n const { useIsInitialized, useSelectTemplate, useSelectedTemplate, useAllTemplates } = API;\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const isInitialized = useIsInitialized();\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const selectTemplate = useSelectTemplate();\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const selectedTemplate = useSelectedTemplate();\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const allTemplates = useAllTemplates();\n\n if (!isInitialized) {\n \n// ... (truncated)"
6782
6788
  },
6783
6789
  {
6784
6790
  name: "WithListReloadOnPopoverOpenDisabled",
6785
6791
  description: "You can disable the reloading of the templates list on popover open by using the `reloadListOnOpen` prop",
6786
6792
  code: "<ContextWrapper\n templatesControl={<TemplatesControl onChange={noop} reloadListOnOpen={false} />}\n />"
6793
+ },
6794
+ {
6795
+ name: "NewTagAndCustomButtonContent",
6796
+ description: "You can provide custom content for toggle by using the `toggleContent` prop. You can use it to make the content smaller or responsive, add additional info, etc. \n\nTo implement \"New!\" tag easily, you can use the `showNewTag` prop of the default content component, exposed as `TemplatesControl.ToggleDisplayDefault`",
6797
+ code: "{\n const commonProps = useMemo(\n () => ({\n onChange: noop,\n presetTemplates,\n currentTemplateId: presetTemplates[2].id,\n templateSettings: presetTemplates[2].settings,\n }),\n []\n );\n\n // Creating API with correct Templates' data type\n const API = useMemo(() => getTemplatesControlStoreApi<Data>(), []);\n\n // All magic happens here\n const Display = useMemo(\n () => () => {\n const { useIsInitialized, useSelectedTemplate } = API;\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const isInitialized = useIsInitialized();\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const selectedTemplate = useSelectedTemplate();\n\n return (\n <div\n style={{\n width: '70px',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }}\n >\n {isInitialized ? selectedTemplate?.name : '...'}\n </div>\n );\n },\n [API]\n );\n// ... (truncated)"
6787
6798
  }
6788
6799
  ],
6789
6800
  sourceUrl: "https://github.com/corva-ai/corva-ui/blob/develop/src/src/componentsV2/TemplatesControl/TemplatesControl.tsx",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "3.55.0-7",
3
+ "version": "3.55.0-9",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "Shared components/utils for Corva ui projects",
6
6
  "keywords": [