@finsemble/finsemble-ui 7.2.0 → 7.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finsemble/finsemble-ui",
3
- "version": "7.2.0",
3
+ "version": "7.2.1",
4
4
  "description": "Ready-made React components to give you a head-start building your SmartDesktop.",
5
5
  "types": "index.d.ts",
6
6
  "files": [
@@ -29,7 +29,7 @@
29
29
  "build-storybook": "build-storybook"
30
30
  },
31
31
  "dependencies": {
32
- "@finsemble/finsemble-api": "7.2.0",
32
+ "@finsemble/finsemble-api": "7.2.1",
33
33
  "@q42/floating-focus-a11y": "^1.3.3",
34
34
  "@reduxjs/toolkit": "^1.5.0",
35
35
  "@svgr/webpack": "^5.5.0",
@@ -34,6 +34,10 @@ export const ResolverDialog = ({ intentRaiser, onSend, onCancel, resolutionList
34
34
  windowName: app.windowName,
35
35
  });
36
36
  };
37
+ const handleCancel = () => {
38
+ setIntentNumber(0); // sets to default value
39
+ onCancel();
40
+ };
37
41
  return (React.createElement("div", { className: "resolverDialog" },
38
42
  resolutionList.length > 1 ? (React.createElement(React.Fragment, null,
39
43
  React.createElement("h3", null,
@@ -81,6 +85,6 @@ export const ResolverDialog = ({ intentRaiser, onSend, onCancel, resolutionList
81
85
  }
82
86
  } }, `${app.index + 1} - ${displayName(app)}`))))))) : (React.createElement(React.Fragment, null)),
83
87
  React.createElement("div", { className: "actionGroupRight" },
84
- React.createElement(Button, { fashion: "ghost", text: "Cancel", onClick: onCancel }))));
88
+ React.createElement(Button, { fashion: "ghost", text: "Cancel", onClick: handleCancel }))));
85
89
  };
86
90
  //# sourceMappingURL=ResolverDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResolverDialog.js","sourceRoot":"","sources":["../../../src/components/fdc3Resolver/ResolverDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EA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,EAAE,CAAC,CAAC,EAAE,EAAE;wBAChB,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE;4BACvC,WAAW,CAAC,GAAG,CAAC,CAAC;yBACjB;oBACF,CAAC,IAEA,GAAG,GAAG,CAAC,KAAK,GAAG,CAAC,MAAM,WAAW,CAAC,GAAG,CAAC,EAAE,CACrC,CACL,CAAC,CACE,CACA,CACJ,CACH,CAAC,CAAC,CAAC,CACH,yCAAK,CACL;QAED,6BAAK,SAAS,EAAC,kBAAkB;YAChC,oBAAC,MAAM,IAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,QAAQ,GAAI,CACtD,CACD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState } from \"react\";\nimport { Button } from \"../common/Button\";\nimport \"./ResolverDialog.css\";\nimport { ResolutionCandidate, ResolutionList } from \"../../types/fdc3\";\nimport { FinsembleSelect } from \"../common/FinsembleSelect\";\n\nimport FloatingFocus from \"@q42/floating-focus-a11y\";\n// The package FloatingFocus injects a focus indicator that moves around the page, but only for\n// keyboard users. (Mouse users don't see the indicator.) All that needs to be done is to envoke it.\nnew FloatingFocus();\n// If you want to make changes to the indicator, the styles are being maintained in assets/css/focus.css\n\ntype TileProps = {\n\ttext: string;\n\tcallback: () => void;\n};\n\nconst Tile = ({ text, callback }: TileProps) => (\n\t<button\n\t\tclassName=\"appTile\"\n\t\tonClick={callback}\n\t\ttitle={text}\n\t\trole=\"button\"\n\t\tonKeyDown={(e) => {\n\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\tcallback();\n\t\t\t}\n\t\t}}\n\t>\n\t\t<span className=\"tileHeader\">{text}</span>\n\t</button>\n);\n\ntype openApp = {\n\tname: string;\n\tid: string;\n};\nexport type ReceivingAppType = {\n\tname: string;\n\topen: openApp[];\n};\nexport type ResolverProps = {\n\tintentRaiser: string;\n\tonSend: any;\n\tonCancel: any;\n\tresolutionList?: ResolutionList[];\n};\n\nexport const ResolverDialog = ({ intentRaiser, onSend, onCancel, resolutionList = [] }: ResolverProps) => {\n\tconst [intentNumber, setIntentNumber] = useState(0);\n\tconst intent = resolutionList[intentNumber]?.intent?.displayName || \"\";\n\tconst contextType = resolutionList[intentNumber]?.context?.type ?? \"data\";\n\tconst receivingApps = resolutionList[intentNumber]?.launchableApps || [];\n\tconst openApps = (resolutionList[intentNumber]?.openApps || []).map((app, key) => {\n\t\treturn {\n\t\t\t...app,\n\t\t\tindex: key,\n\t\t};\n\t});\n\n\t/**\n\t * Calculates what text to display in the UX. AppD prefers `title` when available. However, in the future we may\n\t * expand this to use data that is proprietary to Finsemble, such as the window's current title.\n\t */\n\tconst displayName = (app: ResolutionCandidate): string => app.meta.title ?? app.meta.name ?? app.meta.appId;\n\n\tconst clickAction = (app: ResolutionCandidate) => {\n\t\tonSend({\n\t\t\tintent: resolutionList[intentNumber]?.intent?.name,\n\t\t\tselectedApp: { name: app.meta.name },\n\t\t\twindowName: app.windowName,\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className=\"resolverDialog\">\n\t\t\t{resolutionList.length > 1 ? (\n\t\t\t\t<>\n\t\t\t\t\t<h3>\n\t\t\t\t\t\t<span className=\"sourceText\">{intentRaiser}</span> wants to send{\" \"}\n\t\t\t\t\t\t<span className=\"intentText\">&quot;{contextType}&quot;</span> to another app.\n\t\t\t\t\t</h3>\n\t\t\t\t\t<p>How do you want to handle this?</p>\n\n\t\t\t\t\t<h2>Choose an action:</h2>\n\n\t\t\t\t\t<FinsembleSelect\n\t\t\t\t\t\tselected={[`${intentNumber}`]}\n\t\t\t\t\t\toptions={resolutionList.map((item) => item.intent?.displayName || \"\")}\n\t\t\t\t\t\tvalues={resolutionList.map((item, key) => `${key}`)}\n\t\t\t\t\t\tupdateCallback={(values: string[]) => {\n\t\t\t\t\t\t\tsetIntentNumber(+values[0]);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tsize={Math.min(resolutionList.length, 5)}\n\t\t\t\t\t\tlimit={1}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<h3>\n\t\t\t\t\t\t<span className=\"sourceText\">{intentRaiser}</span> wants to{\" \"}\n\t\t\t\t\t\t<span className=\"intentText\">&quot;{intent}&quot;</span>.\n\t\t\t\t\t</h3>\n\t\t\t\t\t<p>How do you want to handle this?</p>\n\t\t\t\t</>\n\t\t\t)}\n\n\t\t\t<h2>Open a new app...</h2>\n\n\t\t\t<div className=\"appListGrid\">\n\t\t\t\t{receivingApps.map((app, key) => (\n\t\t\t\t\t<Tile\n\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\ttext={displayName(app)}\n\t\t\t\t\t\tcallback={() => {\n\t\t\t\t\t\t\tonSend({\n\t\t\t\t\t\t\t\tintent: resolutionList[intentNumber]?.intent?.name,\n\t\t\t\t\t\t\t\tselectedApp: {\n\t\t\t\t\t\t\t\t\tappId: app.appId,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</div>\n\n\t\t\t{openApps.length ? (\n\t\t\t\t<>\n\t\t\t\t\t<h2>...or, send to a running app</h2>\n\n\t\t\t\t\t<div className=\"appSelector\">\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t{openApps.map((app, index) => (\n\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\tclickAction(app);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t\t\t\t\t\t\tclickAction(app);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{`${app.index + 1} - ${displayName(app)}`}\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<></>\n\t\t\t)}\n\n\t\t\t<div className=\"actionGroupRight\">\n\t\t\t\t<Button fashion=\"ghost\" text=\"Cancel\" onClick={onCancel} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"]}
1
+ {"version":3,"file":"ResolverDialog.js","sourceRoot":"","sources":["../../../src/components/fdc3Resolver/ResolverDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,aAAa,MAAM,0BAA0B,CAAC;AACrD,+FAA+F;AAC/F,oGAAoG;AACpG,IAAI,aAAa,EAAE,CAAC;AAQpB,MAAM,IAAI,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAa,EAAE,EAAE,CAAC,CAC/C,gCACC,SAAS,EAAC,SAAS,EACnB,OAAO,EAAE,QAAQ,EACjB,KAAK,EAAE,IAAI,EACX,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;QAChB,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE;YACvC,QAAQ,EAAE,CAAC;SACX;IACF,CAAC;IAED,8BAAM,SAAS,EAAC,YAAY,IAAE,IAAI,CAAQ,CAClC,CACT,CAAC;AAiBF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,YAAY,EAAE,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AI,IACJ,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,EACtB,QAAQ,EAAE,GAAG,EAAE;;gBACd,MAAM,CAAC;oBACN,MAAM,EAAE,MAAA,MAAA,cAAc,CAAC,YAAY,CAAC,0CAAE,MAAM,0CAAE,IAAI;oBAClD,WAAW,EAAE;wBACZ,KAAK,EAAE,GAAG,CAAC,KAAK;qBAChB;iBACD,CAAC,CAAC;YACJ,CAAC,GACA,CACF,CAAC,CACG;QAEL,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAClB;YACC,+DAAqC;YAErC,6BAAK,SAAS,EAAC,aAAa;gBAC3B,gCACE,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAC7B,4BACC,GAAG,EAAE,KAAK,EACV,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,GAAG,EAAE;wBACb,WAAW,CAAC,GAAG,CAAC,CAAC;oBAClB,CAAC,EACD,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;wBAChB,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE;4BACvC,WAAW,CAAC,GAAG,CAAC,CAAC;yBACjB;oBACF,CAAC,IAEA,GAAG,GAAG,CAAC,KAAK,GAAG,CAAC,MAAM,WAAW,CAAC,GAAG,CAAC,EAAE,CACrC,CACL,CAAC,CACE,CACA,CACJ,CACH,CAAC,CAAC,CAAC,CACH,yCAAK,CACL;QAED,6BAAK,SAAS,EAAC,kBAAkB;YAChC,oBAAC,MAAM,IAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,YAAY,GAAI,CAC1D,CACD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState } from \"react\";\nimport { Button } from \"../common/Button\";\nimport \"./ResolverDialog.css\";\nimport { ResolutionCandidate, ResolutionList } from \"../../types/fdc3\";\nimport { FinsembleSelect } from \"../common/FinsembleSelect\";\n\nimport FloatingFocus from \"@q42/floating-focus-a11y\";\n// The package FloatingFocus injects a focus indicator that moves around the page, but only for\n// keyboard users. (Mouse users don't see the indicator.) All that needs to be done is to envoke it.\nnew FloatingFocus();\n// If you want to make changes to the indicator, the styles are being maintained in assets/css/focus.css\n\ntype TileProps = {\n\ttext: string;\n\tcallback: () => void;\n};\n\nconst Tile = ({ text, callback }: TileProps) => (\n\t<button\n\t\tclassName=\"appTile\"\n\t\tonClick={callback}\n\t\ttitle={text}\n\t\trole=\"button\"\n\t\tonKeyDown={(e) => {\n\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\tcallback();\n\t\t\t}\n\t\t}}\n\t>\n\t\t<span className=\"tileHeader\">{text}</span>\n\t</button>\n);\n\ntype openApp = {\n\tname: string;\n\tid: string;\n};\nexport type ReceivingAppType = {\n\tname: string;\n\topen: openApp[];\n};\nexport type ResolverProps = {\n\tintentRaiser: string;\n\tonSend: any;\n\tonCancel: any;\n\tresolutionList?: ResolutionList[];\n};\n\nexport const ResolverDialog = ({ intentRaiser, onSend, onCancel, resolutionList = [] }: ResolverProps) => {\n\tconst [intentNumber, setIntentNumber] = useState(0);\n\tconst intent = resolutionList[intentNumber]?.intent?.displayName || \"\";\n\tconst contextType = resolutionList[intentNumber]?.context?.type ?? \"data\";\n\tconst receivingApps = resolutionList[intentNumber]?.launchableApps || [];\n\tconst openApps = (resolutionList[intentNumber]?.openApps || []).map((app, key) => {\n\t\treturn {\n\t\t\t...app,\n\t\t\tindex: key,\n\t\t};\n\t});\n\n\t/**\n\t * Calculates what text to display in the UX. AppD prefers `title` when available. However, in the future we may\n\t * expand this to use data that is proprietary to Finsemble, such as the window's current title.\n\t */\n\tconst displayName = (app: ResolutionCandidate): string => app.meta.title ?? app.meta.name ?? app.meta.appId;\n\n\tconst clickAction = (app: ResolutionCandidate) => {\n\t\tonSend({\n\t\t\tintent: resolutionList[intentNumber]?.intent?.name,\n\t\t\tselectedApp: { name: app.meta.name },\n\t\t\twindowName: app.windowName,\n\t\t});\n\t};\n\n\tconst handleCancel = () => {\n\t\tsetIntentNumber(0); // sets to default value\n\t\tonCancel();\n\t};\n\n\treturn (\n\t\t<div className=\"resolverDialog\">\n\t\t\t{resolutionList.length > 1 ? (\n\t\t\t\t<>\n\t\t\t\t\t<h3>\n\t\t\t\t\t\t<span className=\"sourceText\">{intentRaiser}</span> wants to send{\" \"}\n\t\t\t\t\t\t<span className=\"intentText\">&quot;{contextType}&quot;</span> to another app.\n\t\t\t\t\t</h3>\n\t\t\t\t\t<p>How do you want to handle this?</p>\n\n\t\t\t\t\t<h2>Choose an action:</h2>\n\n\t\t\t\t\t<FinsembleSelect\n\t\t\t\t\t\tselected={[`${intentNumber}`]}\n\t\t\t\t\t\toptions={resolutionList.map((item) => item.intent?.displayName || \"\")}\n\t\t\t\t\t\tvalues={resolutionList.map((item, key) => `${key}`)}\n\t\t\t\t\t\tupdateCallback={(values: string[]) => {\n\t\t\t\t\t\t\tsetIntentNumber(+values[0]);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tsize={Math.min(resolutionList.length, 5)}\n\t\t\t\t\t\tlimit={1}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<h3>\n\t\t\t\t\t\t<span className=\"sourceText\">{intentRaiser}</span> wants to{\" \"}\n\t\t\t\t\t\t<span className=\"intentText\">&quot;{intent}&quot;</span>.\n\t\t\t\t\t</h3>\n\t\t\t\t\t<p>How do you want to handle this?</p>\n\t\t\t\t</>\n\t\t\t)}\n\n\t\t\t<h2>Open a new app...</h2>\n\n\t\t\t<div className=\"appListGrid\">\n\t\t\t\t{receivingApps.map((app, key) => (\n\t\t\t\t\t<Tile\n\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\ttext={displayName(app)}\n\t\t\t\t\t\tcallback={() => {\n\t\t\t\t\t\t\tonSend({\n\t\t\t\t\t\t\t\tintent: resolutionList[intentNumber]?.intent?.name,\n\t\t\t\t\t\t\t\tselectedApp: {\n\t\t\t\t\t\t\t\t\tappId: app.appId,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</div>\n\n\t\t\t{openApps.length ? (\n\t\t\t\t<>\n\t\t\t\t\t<h2>...or, send to a running app</h2>\n\n\t\t\t\t\t<div className=\"appSelector\">\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t{openApps.map((app, index) => (\n\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\tclickAction(app);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t\t\t\t\t\t\tclickAction(app);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{`${app.index + 1} - ${displayName(app)}`}\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<></>\n\t\t\t)}\n\n\t\t\t<div className=\"actionGroupRight\">\n\t\t\t\t<Button fashion=\"ghost\" text=\"Cancel\" onClick={handleCancel} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"]}
@@ -722,24 +722,19 @@ export class WindowTitleBarShell extends React.Component {
722
722
  bumpFixedElements(params) {
723
723
  var _a;
724
724
  let { fixed, bumpBy } = params;
725
- const getFixedElements = (nodes) => {
725
+ const getFixedElements = (selector) => {
726
726
  const fixedElems = [];
727
+ const nodes = document.body.querySelectorAll(selector);
727
728
  nodes.forEach((node) => {
728
729
  const style = window.getComputedStyle(node, null);
729
730
  if (style.getPropertyValue("position") == "fixed")
730
731
  fixedElems.push(node);
731
- const elems = node.querySelectorAll("*");
732
- elems.forEach((elem) => {
733
- const childStyle = window.getComputedStyle(elem, null);
734
- if (childStyle.getPropertyValue("position") == "fixed")
735
- fixedElems.push(elem);
736
- });
737
732
  });
738
733
  return fixedElems;
739
734
  };
740
735
  const selector = "*:not(#FSBLHeader, .fsbl-header)";
741
736
  // Get all fixed positioned elements
742
- const elems = getFixedElements(document.body.querySelectorAll(`${selector}`));
737
+ const elems = getFixedElements(selector);
743
738
  const len = elems.length;
744
739
  for (let i = 0; i < len; i++) {
745
740
  const style = window.getComputedStyle(elems[i], null);
@@ -1 +1 @@
1
- {"version":3,"file":"WindowTitleBarShell.js","sourceRoot":"","sources":["../../../src/components/windowTitleBar/WindowTitleBarShell.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,qCAAqC,CAAC;AAI7C,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,2BAA2B;AAC3B,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;AAsCtC,MAAM,OAAO,mBAAoB,SAAQ,KAAK,CAAC,SAA6D;IAM3G,YAAY,KAA+B;QAC1C,KAAK,CAAC,KAAK,CAAC,CAAC;QAJd,+CAA+C;QAC/C,mBAAc,GAAG,KAAK,CAAC;QAItB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QAEvB,IAAI,CAAC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AAI,CAAC,KAAK,CAAC,IAAI;YACrB,cAAc,EAAE,IAAI,CAAC,gBAAgB;YACrC,qBAAqB,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB,IAAI,gBAAgB;YACvE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;YAC7B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;YACnC,mBAAmB,EAAE,IAAI,CAAC,KAAK,CAAC,mBAAmB;SACnD,CAAC;QAEF,OAAO,CACN,6BAAK,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAClE,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,CAC1B,oBAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,IAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAkC,CACtG,CACI,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport * as React from \"react\";\nimport { WindowTitleBarContext } from \"./windowTitleBarContext\";\nimport { storeManager, Actions, getStore } from \"./stores/windowTitleBarStore\";\nimport \"../../assets/css/windowTitleBar.css\";\nimport { StandardError } from \"@finsemble/finsemble-api/types/types\";\nimport StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\nimport { TabProperties } from \"../../types/windowTitleBar\";\nimport { clone } from \"../sdd/Appearance.helpers\";\nimport { Logger } from \"@finsemble/finsemble-api\";\n\n// Values for possible zero\nconst possibleZeros = [\"0\", \"0px\", 0];\n\ntype BumpElements = {\n\tbumpBy: string;\n\tfixed: string;\n\tabsolute: string;\n\tmonitorFixedAdditions: boolean;\n};\n\ninterface WindowTitleBarShellProps {}\n\ninterface WindowTitleBarShellState {\n\ttabs: TabProperties[];\n\tactiveTab: TabProperties;\n\twindowTitle: string;\n\tinitialized: boolean;\n\talwaysOnTop: boolean;\n\tshowTabs: boolean;\n\tminButton: boolean;\n\tmaxButton: boolean;\n\tcloseButton: boolean;\n\tshowShareButton: boolean;\n\tshowLinkerButton: boolean;\n\tisTopRight: boolean;\n\tdockingEnabled: boolean;\n\talwaysOnTopButton: boolean;\n\tallowDragOnCenterRegion: boolean;\n\tdockingIcon: string;\n\thackScrollbar: boolean;\n\tshowDockingTooltip: boolean;\n\tshowTabRegion: boolean;\n\ttabBarBoundingBox: any;\n\tuseDOMBasedMovement: boolean;\n\tdragHandleName: string;\n\tbumpElements: BumpElements;\n\tadjustContentHeights: boolean;\n}\n\nexport class WindowTitleBarShell extends React.Component<WindowTitleBarShellProps, WindowTitleBarShellState> {\n\tstore?: StoreModel;\n\n\t// Keep track of if the mouse button is pressed\n\tisMousePressed = false;\n\n\tconstructor(props: WindowTitleBarShellProps) {\n\t\tsuper(props);\n\t\tthis.store = undefined;\n\n\t\tthis.bindCorrectContext();\n\t\tthis.state = {\n\t\t\tactiveTab: FSBL.Clients.WindowClient.getWindowIdentifier() as TabProperties,\n\t\t\tallowDragOnCenterRegion: true,\n\t\t\talwaysOnTop: false,\n\t\t\talwaysOnTopButton: false,\n\t\t\tcloseButton: false,\n\t\t\tdockingEnabled: false,\n\t\t\tdockingIcon: \"\",\n\t\t\thackScrollbar: false,\n\t\t\tinitialized: false,\n\t\t\tisTopRight: false,\n\t\t\tmaxButton: false,\n\t\t\tminButton: false,\n\t\t\tshowDockingTooltip: false,\n\t\t\tshowLinkerButton: false,\n\t\t\tshowShareButton: false,\n\t\t\tshowTabs: false,\n\t\t\tshowTabRegion: false,\n\t\t\ttabs: [],\n\t\t\ttabBarBoundingBox: {},\n\t\t\twindowTitle: \"\",\n\t\t\tuseDOMBasedMovement: true,\n\t\t\tdragHandleName: \"fsbl-drag-handle\",\n\t\t\tbumpElements: {} as BumpElements,\n\t\t\tadjustContentHeights: true,\n\t\t};\n\n\t\tfinsembleWindow.isAlwaysOnTop({}, (err, alwaysOnTop: boolean) => {\n\t\t\tthis.setState({ ...this.state, alwaysOnTop });\n\t\t});\n\n\t\tfinsembleWindow.addEventListener(\"alwaysOnTop\", this.alwaysOnTopListener);\n\t}\n\n\talwaysOnTopListener({ data: { alwaysOnTop } }: any) {\n\t\tthis.setState({ ...this.state, alwaysOnTop });\n\t}\n\n\t/**\n\t * This is necessary to make sure that the `this` inside of the callback is correct.\n\t *\n\t * @memberof WindowTitleBar\n\t */\n\tbindCorrectContext() {\n\t\tthis.onTitleChange = this.onTitleChange.bind(this);\n\t\tthis.onShowDockingToolTip = this.onShowDockingToolTip.bind(this);\n\t\tthis.onToggleDockingIcon = this.onToggleDockingIcon.bind(this);\n\t\tthis.onDockingEnabledChanged = this.onDockingEnabledChanged.bind(this);\n\t\tthis.onAlwaysOnTopChanged = this.onAlwaysOnTopChanged.bind(this);\n\t\tthis.showLinkerButton = this.showLinkerButton.bind(this);\n\t\tthis.isTopRight = this.isTopRight.bind(this);\n\t\tthis.allowDragOnCenterRegion = this.allowDragOnCenterRegion.bind(this);\n\t\tthis.disallowDragOnCenterRegion = this.disallowDragOnCenterRegion.bind(this);\n\t\tthis.setDOMBasedMovement = this.setDOMBasedMovement.bind(this);\n\t\tthis.onShareEmitterChanged = this.onShareEmitterChanged.bind(this);\n\t\tthis.onTabsChanged = this.onTabsChanged.bind(this);\n\t\tthis.onShowTabsChanged = this.onShowTabsChanged.bind(this);\n\t\tthis.onTilingStop = this.onTilingStop.bind(this);\n\t\tthis.onTilingStart = this.onTilingStart.bind(this);\n\t\tthis.resizeDragHandle = this.resizeDragHandle.bind(this);\n\t\tthis.onDoubleClick = this.onDoubleClick.bind(this);\n\t\tthis.alwaysOnTopListener = this.alwaysOnTopListener.bind(this);\n\t\tthis.onInitialized = this.onInitialized.bind(this);\n\t}\n\n\tonInitialized() {\n\t\tthis.store = getStore();\n\t\tthis.store.addListeners(\n\t\t\t[\n\t\t\t\t{ field: \"Main.windowTitle\", listener: this.onTitleChange },\n\t\t\t\t{ field: \"Main.showDockingTooltip\", listener: this.onShowDockingToolTip },\n\t\t\t\t{ field: \"Main.dockingIcon\", listener: this.onToggleDockingIcon },\n\t\t\t\t{ field: \"Main.dockingEnabled\", listener: this.onDockingEnabledChanged },\n\t\t\t\t{ field: \"AlwaysOnTop.show\", listener: this.onAlwaysOnTopChanged },\n\t\t\t\t{ field: \"Linker.showLinkerButton\", listener: this.showLinkerButton },\n\t\t\t\t{ field: \"Sharer.emitterEnabled\", listener: this.onShareEmitterChanged },\n\t\t\t\t{ field: \"isTopRight\", listener: this.isTopRight },\n\t\t\t\t{ field: \"tabs\", listener: this.onTabsChanged },\n\t\t\t\t{ field: \"showTabs\", listener: this.onShowTabsChanged },\n\t\t\t\t{ field: \"hackScrollbar\", listener: this.onShowTabsChanged },\n\t\t\t\t{ field: \"Main.useDOMBasedMovement\", listener: this.setDOMBasedMovement },\n\t\t\t],\n\t\t\t() => {}\n\t\t);\n\n\t\t// Add listeners for tiling/tabbing\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.startTilingOrTabbing\", this.onTilingStart);\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.stopTilingOrTabbing\", this.onTilingStop);\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.cancelTilingOrTabbing\", this.onTilingStop);\n\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.startTilingOrTabbing\", this.disallowDragOnCenterRegion);\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.stopTilingOrTabbing\", this.allowDragOnCenterRegion);\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.cancelTilingOrTabbing\", this.allowDragOnCenterRegion);\n\n\t\tthis.onStoreChange();\n\t\tthis.setState({\n\t\t\tinitialized: true,\n\t\t});\n\t}\n\n\tonStoreChange() {\n\t\tlet activeIdentifier = finsembleWindow.identifier as TabProperties;\n\t\tactiveIdentifier.title = this.store?.getValue({\n\t\t\tfield: \"Main.windowTitle\",\n\t\t});\n\n\t\tthis.setState({\n\t\t\twindowTitle: this.store?.getValue({ field: \"Main.windowTitle\" }),\n\t\t\tminButton: !this.store?.getValue({ field: \"Minimize.hide\" }),\n\t\t\tmaxButton: !this.store?.getValue({ field: \"Maximize.hide\" }),\n\t\t\tcloseButton: !this.store?.getValue({ field: \"Close.hide\" }),\n\t\t\tshowLinkerButton: this.store?.getValue({\n\t\t\t\tfield: \"Linker.showLinkerButton\",\n\t\t\t}),\n\t\t\tshowShareButton: this.store?.getValue({\n\t\t\t\tfield: \"Sharer.emitterEnabled\",\n\t\t\t}),\n\t\t\tisTopRight: this.store?.getValue({ field: \"isTopRight\" }),\n\t\t\talwaysOnTopButton: this.store?.getValue({\n\t\t\t\tfield: \"AlwaysOnTop.show\",\n\t\t\t}),\n\t\t\tshowTabs: this.store?.getValue({ field: \"showTabs\" }),\n\t\t\thackScrollbar: this.store?.getValue({ field: \"hackScrollbar\" }),\n\t\t\tbumpElements: this.store?.getValue({ field: \"bumpElements\" }),\n\t\t\tadjustContentHeights: this.store?.getValue({ field: \"adjustContentHeights\" }),\n\t\t\ttabs: [activeIdentifier], // array of tabs for this window\n\t\t});\n\t}\n\n\tcomponentDidMount() {\n\t\t// Goal: If a user gets focus into the title bar (if they Alt+Tab or Cmd+Tab into the window),\n\t\t// we want to let get into the rest of the component using the keyboard alone. The UX for\n\t\t// this task will be to seemingly TAB from the title bar into the window, if possible.\n\t\t// Code: If the user presses the \"Tab\" key, move their focus to the browser view\n\t\twindow.addEventListener(\"keydown\", (e) => {\n\t\t\tif (e.key === \"Tab\") {\n\t\t\t\t// This magic moves focus to a browserView, if one exists\n\t\t\t\tfinsembleWindow.focus();\n\t\t\t}\n\t\t});\n\t\tlet header = document.getElementsByClassName(\"fsbl-header\")[0];\n\n\t\t//Add a margin top to the body if there title bar is injected into the component.\n\t\tif (header) {\n\t\t\tdocument.body.style.margin = \"0px\";\n\t\t\tdocument.body.style.marginTop = window.getComputedStyle(header, null).getPropertyValue(\"height\");\n\t\t}\n\t\tthis.resizeDragHandle();\n\t\tthis.hackScrollbar();\n\t\tstoreManager.addInitializedListener(this.onInitialized);\n\t\tstoreManager.initialize();\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.resizeDragHandle();\n\t\t// Sometimes handleMouseUp is not invoked; specifically this can happen if the mouse is not over the drag handle when the button is\n\t\t// unpressed. This happens when the drag starts near the bottom of the drag handle and the mouse is moved UP. If the window is\n\t\t// docked to a window ABOVE then it may snap a few pixels up, making the mouse no longer on top of the drag handle. At this point, the\n\t\t// componentDidUpdate is executed and the onmouseup handler is not invoked. Setting this.isMousePressed handles that narrow case.\n\t\tthis.isMousePressed = false;\n\t\tthis.hackScrollbar();\n\t\tthis.maybeAdjustWindow();\n\t}\n\n\tcomponentWillUnmount() {\n\t\tstoreManager.removeInitializedListener(this.onInitialized);\n\t\tif (this.state.initialized) {\n\t\t\tthis.store?.removeListeners(\n\t\t\t\t[\n\t\t\t\t\t{ field: \"Main.windowTitle\", listener: this.onTitleChange },\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"Main.showDockingTooltip\",\n\t\t\t\t\t\tlistener: this.onShowDockingToolTip,\n\t\t\t\t\t},\n\t\t\t\t\t{ field: \"Main.dockingIcon\", listener: this.onToggleDockingIcon },\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"Main.dockingEnabled\",\n\t\t\t\t\t\tlistener: this.onDockingEnabledChanged,\n\t\t\t\t\t},\n\t\t\t\t\t{ field: \"AlwaysOnTop.show\", listener: this.onAlwaysOnTopChanged },\n\t\t\t\t\t{ field: \"Linker.showLinkerButton\", listener: this.showLinkerButton },\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"Sharer.emitterEnabled\",\n\t\t\t\t\t\tlistener: this.onShareEmitterChanged,\n\t\t\t\t\t},\n\t\t\t\t\t{ field: \"isTopRight\", listener: this.isTopRight },\n\t\t\t\t\t{ field: \"tabs\", listener: this.onTabsChanged },\n\t\t\t\t\t{ field: \"showTabs\", listener: this.onShowTabsChanged },\n\t\t\t\t],\n\t\t\t\t() => {},\n\t\t\t\t() => {}\n\t\t\t);\n\n\t\t\t// Cleanup all listeners\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"DockingService.startTilingOrTabbing\", this.disallowDragOnCenterRegion);\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"DockingService.stopTilingOrTabbing\", this.allowDragOnCenterRegion);\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"DockingService.cancelTilingOrTabbing\", this.allowDragOnCenterRegion);\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"DockingService.startTilingOrTabbing\", this.onTilingStart);\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"DockingService.stopTilingOrTabbing\", this.onTilingStop);\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"DockingService.cancelTilingOrTabbing\", this.onTilingStop);\n\t\t}\n\t}\n\n\tsetDOMBasedMovement(err: StandardError, response: any) {\n\t\tif (response && response.hasOwnProperty(\"value\")) {\n\t\t\tthis.setState(\n\t\t\t\t{\n\t\t\t\t\tuseDOMBasedMovement: response.value,\n\t\t\t\t\tdragHandleName: response.value ? \"fsbl-drag-handle\" : \"fsbl-drag-handle-native-movement\",\n\t\t\t\t},\n\t\t\t\tthis.resizeDragHandle\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * When we are not tiling/tabbing, we want to allow the user to drag the window around via any available space in the tab-region. This function allows that.\n\t */\n\tallowDragOnCenterRegion() {\n\t\tthis.setState({\n\t\t\tallowDragOnCenterRegion: true,\n\t\t});\n\t}\n\n\t/**\n\t * When we are tiling/tabbing, we do not want to allow any window to be dragged around and moved.\n\t */\n\tdisallowDragOnCenterRegion() {\n\t\tthis.setState({\n\t\t\tallowDragOnCenterRegion: false,\n\t\t});\n\t}\n\n\t/**\n\t * When tiling start, we want to find the dragHandler and hide it\n\t */\n\tonTilingStart() {\n\t\tdocument.querySelector(`.${this.state.dragHandleName}`)?.classList.add(\"hidden\");\n\t}\n\n\t/**\n\t * When tiling stops, we want to find the dragHandler and re-show it\n\t */\n\tonTilingStop() {\n\t\tdocument.querySelector(`.${this.state.dragHandleName}.hidden`)?.classList.remove(\"hidden\");\n\t}\n\n\t/**\n\t * Called whenever a tab is dropped on a non tab area.\n\t * It won't be called when dropped on a tab that handles handle the event.\n\t */\n\tonDropHandler() {\n\t\tFSBL.Clients.RouterClient.transmit(\"DockingService.cancelTilingOrTabbing\", {});\n\t}\n\n\t/**\n\t * Called when user double clicks on drag handle\n\t */\n\tonDoubleClick() {\n\t\t// Actions.clickMaximize checks the window state\n\t\t// and toggles between maximize and minimize.\n\t\tActions.clickMaximize();\n\t}\n\n\t_setOnMouseUpAndDownHandlers(element: HTMLDivElement) {\n\t\t// Sometimes the mouse cursor can leave the drag handle when the window is moved quickly\n\t\t// In this case, the drag will succeed but handleMouseUp() is not invoked; as a consequence,\n\t\t// this.isMousePressed is not reset and FSBL.Clients.WindowClient.stopMovingWindow() is not called.\n\t\t//\n\t\t// To work around this, a new variable is introduced in order to keep track of if the mouse cursor\n\t\t// has left the drag handle. If handleMouseDown is invoked AND mouseHasLeft has been set to true, then\n\t\t// any click (handleMouseDown) will reset mouseHasLeft and this.isMousePressed (the drag state)\n\t\tlet mouseHasLeft = false;\n\n\t\t/**\n\t\t * Keeps track of when the mouse cursor leaves the drag handle.\n\t\t */\n\t\tconst handleMouseLeave = () => {\n\t\t\tmouseHasLeft = true;\n\t\t};\n\n\t\t// if do double click it will invoke MouseDown and MouseUp events which could break the window bounds. So wait a 100ms for moving or resizing the window.\n\t\tconst handleMouseDown = (event: MouseEvent) => {\n\t\t\t// If the mouse has left the drag handle then reset drag state on click\n\t\t\tif (mouseHasLeft) {\n\t\t\t\tmouseHasLeft = false;\n\t\t\t\tthis.isMousePressed = false;\n\t\t\t\tFSBL.Clients.WindowClient.stopMovingWindow();\n\t\t\t}\n\n\t\t\t// prevent a second call if the button hasn't been unpressed\n\t\t\tif (this.isMousePressed) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Indicate that the mouse has been pressed\n\t\t\tthis.isMousePressed = true;\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (this.isMousePressed) {\n\t\t\t\t\tFSBL.Clients.WindowClient.startMovingWindow(event);\n\t\t\t\t}\n\t\t\t}, 100);\n\t\t};\n\t\tconst handleMouseUp = () => {\n\t\t\t// prevent a call if the button hasn't been pressed\n\t\t\tif (!this.isMousePressed) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.isMousePressed = false;\n\t\t\tFSBL.Clients.WindowClient.stopMovingWindow();\n\t\t};\n\n\t\telement.onmouseleave = handleMouseLeave;\n\t\telement.onmousedown = handleMouseDown;\n\t\telement.onmouseup = handleMouseUp;\n\t}\n\n\tmakeDragHandle(fsblHeader: Element, dragHandleCssClass: string): HTMLElement {\n\t\tlet dragHandle = document.createElement(\"div\");\n\t\tdragHandle.className = dragHandleCssClass;\n\t\tthis._setOnMouseUpAndDownHandlers(dragHandle);\n\n\t\tdragHandle.ondblclick = () => {\n\t\t\tthis.onDoubleClick();\n\t\t};\n\t\tfsblHeader.insertBefore(dragHandle, fsblHeader.firstChild);\n\t\twindow.addEventListener(\"resize\", () => {\n\t\t\tthis.resizeDragHandle();\n\t\t});\n\n\t\treturn dragHandle;\n\t}\n\n\tdragHandleBoundsForShowTabs(startingBounds: DOMRect): DOMRect {\n\t\tif (this.state.tabs.length > 1) {\n\t\t\t// The drag handle is the space between the right-most tab and the left-most window button (minimize, maximize, close, etc)\n\t\t\t//\n\t\t\t// The bounds will largely be the same as \".fsbl-header-right\"\n\t\t\tconst headerRight = document.querySelector(\".fsbl-header-right\");\n\n\t\t\tif (headerRight) {\n\t\t\t\t// The padding (in pixels) for the left and right of the drag handle\n\t\t\t\tconst padding = 2;\n\n\t\t\t\t// Get the RIGHT-MOST x-coordinate for the drag handle\n\t\t\t\t//\n\t\t\t\t// The \"x\" coordinate of the LEFT-MOST element in the \"fsbl-header-right\" container; but\n\t\t\t\t// if there are no elements in the container then use the \"innerWidth\" of the window because that\n\t\t\t\t// value is the furthest RIGHT x-coordinate available to use\n\t\t\t\tconst leftMostRightHeaderElement = document.querySelector(\n\t\t\t\t\t\".fsbl-tabs-multiple .fsbl-header-right div:first-child\"\n\t\t\t\t);\n\t\t\t\tconst rightXCoord = leftMostRightHeaderElement\n\t\t\t\t\t? leftMostRightHeaderElement.getBoundingClientRect().x\n\t\t\t\t\t: window.innerWidth;\n\n\t\t\t\t// Get the LEFT-MOST x-coordinate for the drag handle\n\t\t\t\t//\n\t\t\t\t// Get the \"x\" coordinate for the RIGHT-MOST tab; the \"right\" attribute will be the\n\t\t\t\t// LEFT x-coordinate for the drag handle\n\t\t\t\tconst rightTab = document.querySelector(\".tab-region-wrapper .fsbl-tab:last-child\");\n\t\t\t\t// The \"left\" bounds is to the RIGHT of the RIGHT-MOST tab, plus padding\n\t\t\t\tconst leftXCoord = Math.trunc(rightTab?.getBoundingClientRect().right || 0) + padding;\n\n\t\t\t\t// The \"width\" bounds attribute is the difference between leftXCoord and rightXCoord, minus padding\n\t\t\t\tconst width = rightXCoord - leftXCoord - padding;\n\n\t\t\t\t// Override bounds.width and bounds.left with the calculated values\n\t\t\t\treturn {\n\t\t\t\t\t// The spread operator only uses own properties; simply\n\t\t\t\t\t// spreading \"headerRight.getBoundingClientRect()\" will result in an\n\t\t\t\t\t// empty object being spread. Clone the object to be sure all\n\t\t\t\t\t// values are spread\n\t\t\t\t\t...clone(headerRight.getBoundingClientRect()),\n\t\t\t\t\twidth: width,\n\t\t\t\t\tleft: leftXCoord,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn startingBounds;\n\t\t\t}\n\t\t} else {\n\t\t\t// If tabs are not enabled, then the remained of fsbl-header-center beyond the tabs\n\t\t\t// is the draggable area. This assumes left aligned tabs.\n\t\t\tconst fsblHeaderCenter = document.querySelector(\".fsbl-header-center\");\n\t\t\tconst bounds = fsblHeaderCenter?.getBoundingClientRect() ?? startingBounds;\n\t\t\tconst tabRegionWrapperDiv = fsblHeaderCenter?.querySelector(\".tab-region-wrapper div.fsbl-header-title\");\n\t\t\tif (tabRegionWrapperDiv) {\n\t\t\t\tconst theTabBounds = tabRegionWrapperDiv.getBoundingClientRect();\n\t\t\t\t// Calculate the right portion\n\t\t\t\treturn {\n\t\t\t\t\t...clone(bounds),\n\t\t\t\t\tleft: bounds.left + theTabBounds.width,\n\t\t\t\t\twidth: bounds.width - theTabBounds.width,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn bounds;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * The dragger is an absolutely positioned element that is superimposed on the actual area that we'd like to drag.\n\t * This is necessary due to a bug in Chromium. Effectively, we need the dragger to change its left position and width\n\t * to match the intended drag area. These dimensions can change whenever the header is re-rendered (for instance when\n\t * changing mode from tabbing to non-tabbing). Dimensions can also change when the window itself is resized (due to natural\n\t * css).\n\t *\n\t * Can remove all of the cq-drag and cq-no-drag because Chromium bug is fixed\n\t * Remove fsbl-drag-region, it is no longer needed\n\t * Hide the dragHandle during drop operations, so that it doesn't interfere\n\t */\n\tresizeDragHandle() {\n\t\t// Sometimes this function is called during a drag (determined by this.isMousePressed); in this case,\n\t\t// the function should abort.\n\t\t//\n\t\t// This happens if the cursor starts dragging near the left end of the drag handle. When the mouse is moved left, the cursor\n\t\t// moves left (over the right-most) tab for a few moments, triggering an invocation of this function. This is incorrect\n\t\t// behavior and should be avoided\n\t\tif (this.isMousePressed) {\n\t\t\treturn;\n\t\t}\n\t\t// This function is invoked when a window is grouped or ungrouped (or docked); in all these cases, reset the mouse pressed state\n\t\t//\n\t\t// Reset the mouse pressed state\n\t\tthis.isMousePressed = false;\n\n\t\ttry {\n\t\t\tconst fsblHeader = document.querySelector(\".fsbl-header\");\n\t\t\t// If there isn't an FSBLHeader then there doesn't need to be a drag handle.\n\t\t\tif (!fsblHeader) return;\n\n\t\t\tconst dragHandleCssClass = this.state.useDOMBasedMovement\n\t\t\t\t? \"fsbl-drag-handle\"\n\t\t\t\t: \"fsbl-drag-handle-native-movement\";\n\n\t\t\tconst dragHandleToRemoveClass = this.state.useDOMBasedMovement\n\t\t\t\t? \"fsbl-drag-handle-native-movement\"\n\t\t\t\t: \"fsbl-drag-handle\";\n\n\t\t\t// Create the dragger if it doesn't already exist\n\t\t\tlet dragHandle =\n\t\t\t\t(document.querySelector(`.${dragHandleCssClass}`) as HTMLElement) ??\n\t\t\t\tthis.makeDragHandle(fsblHeader, dragHandleCssClass);\n\n\t\t\t// When the titlebar starts up, useDOMBasedMovement will have a default value that is not the same as the config value\n\t\t\t// When the value from the config propagates down to the UI, we need to make sure the old drag handle is removed in place of the new\n\t\t\tconst dragHandleToRemove = document.querySelector(`.${dragHandleToRemoveClass}`) as HTMLElement;\n\t\t\tif (dragHandleToRemove) dragHandleToRemove.parentNode?.removeChild(dragHandleToRemove);\n\n\t\t\t// Set the height of the dragHandle to match the height of the window title bar\n\t\t\t// Do this every time through the render loop just in case a customer builds a\n\t\t\t// header bar with dynamic height!\n\t\t\tlet bounds = fsblHeader.getBoundingClientRect();\n\n\t\t\tdragHandle.style.height = `${bounds.height - 5}px`; // Subtract 5 pixels from height in order to make room for resize window cursor at top edge of window\n\t\t\tdragHandle.style.marginTop = `${-bounds.height + 5}px`; // Negative margin pulls the drag handle up over the fixed header\n\n\t\t\t// Start logic for determining where to place our dragHandle\n\t\t\tif (this.state.showTabs) {\n\t\t\t\tbounds = this.dragHandleBoundsForShowTabs(bounds);\n\t\t\t} else {\n\t\t\t\t// If tabs are not enabled, then the entire center is the drag area\n\t\t\t\tlet fsblHeaderCenter = document.querySelector(\".fsbl-header-center\");\n\t\t\t\tif (fsblHeaderCenter) bounds = fsblHeaderCenter.getBoundingClientRect();\n\t\t\t}\n\n\t\t\tif (bounds) {\n\t\t\t\tdragHandle.style.left = `${bounds.left}px`;\n\t\t\t\tdragHandle.style.width = `${bounds.width}px`;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t}\n\t}\n\n\t/**\n\t * Whether the component's config allows for the linker.\n\t * @param {} err\n\t * @param {*} response\n\t */\n\tshowLinkerButton(err: StandardError, response: any) {\n\t\tthis.setState({ showLinkerButton: response.value });\n\t}\n\n\t/**\n\t * Whether the window is the top-right-most window in a group of windows. If so, it renders a minimize icon for the whole group.\n\t * @param {} err\n\t * @param {*} response\n\t */\n\tisTopRight(err: StandardError, response: any) {\n\t\tthis.setState({ isTopRight: response.value });\n\t}\n\n\t/**\n\t * @param {*} err\n\t * @param {*} response\n\t */\n\tonTitleChange(err: StandardError, response: any) {\n\t\tlet { tabs } = this.state;\n\t\tlet myIdentifier = FSBL.Clients.WindowClient.getWindowIdentifier();\n\n\t\ttabs = tabs.map((el) => {\n\t\t\tif (!el.windowName && el.name) el.windowName = el.name;\n\t\t\tif (!el.name && el.windowName) el.name = el.windowName;\n\t\t\treturn el;\n\t\t});\n\n\t\tconst myIndex = tabs.findIndex((el: TabProperties) => el.name === myIdentifier.windowName);\n\t\tif (myIndex === -1) return;\n\n\t\tlet myTab = tabs[myIndex] || {};\n\t\tmyTab.title = response.value;\n\t\ttabs.splice(myIndex, 1, myTab);\n\n\t\tthis.setState({\n\t\t\twindowTitle: response.value,\n\t\t\ttabs: tabs,\n\t\t});\n\t}\n\n\t/**\n\t * The next few methods are store change handlers that sync local state with the store's state.\n\t */\n\tonShowDockingToolTip(err: StandardError, response: any) {\n\t\tthis.setState({ showDockingTooltip: response.value });\n\t}\n\n\tonToggleDockingIcon(err: StandardError, response: any) {\n\t\tthis.setState({ dockingIcon: response.value });\n\t}\n\n\tonDockingEnabledChanged(err: StandardError, response: any) {\n\t\tthis.setState({ dockingEnabled: response.value });\n\t}\n\n\tonAlwaysOnTopChanged(err: StandardError, response: any) {\n\t\tthis.setState({ alwaysOnTopButton: response.value });\n\t}\n\n\tonStoreChanged(newState: WindowTitleBarShellState) {\n\t\tthis.setState(newState);\n\t}\n\n\tonShareEmitterChanged(err: StandardError, response: any) {\n\t\tthis.setState({ showShareButton: response.value });\n\t}\n\n\tonTabsChanged(err: StandardError, response: any) {\n\t\tthis.setState({\n\t\t\ttabs: response.value,\n\t\t});\n\t}\n\n\tonShowTabsChanged(err: StandardError, response: any) {\n\t\t// If we are not showing tabs, then it means that it is a non tabbed window\n\t\t// therefore we need to check whether we have a window title contained in\n\t\t// .div.fsbl-tab-editor so that we can edit it.\n\t\tif (!response.value) {\n\t\t\tlet tabEditor = document.querySelector(\"div.fsbl-tab-editor\") as HTMLDivElement;\n\t\t\tif (tabEditor) {\n\t\t\t\t// we set this z-index value to be slightly higher than the drag handle\n\t\t\t\t// to make the editor dragable AND double-clickcable\n\t\t\t\ttabEditor.style.zIndex = \"2147483647\";\n\t\t\t\t// We add the mousedown and mouseup functions to the tab editor\n\t\t\t\t// so that on a single mouse down it allows the user to drag the\n\t\t\t\t// window on both the .fsbl-drag-handle and the .fsbl-tab-editor\n\t\t\t\tthis._setOnMouseUpAndDownHandlers(tabEditor);\n\t\t\t}\n\t\t}\n\t\tthis.setState({\n\t\t\tshowTabs: response.value,\n\t\t});\n\t}\n\n\t// Hack the window's scrollbar so that it displays underneath the header. html.overflow: hidden body.overflow:auto\n\t// This is turned on by default. Set \"Window Manager.hackScrollbar: false\" to turn it off\n\thackScrollbar() {\n\t\tif (this.state.hackScrollbar) {\n\t\t\tconst htmlElement = document.querySelector(\"html\");\n\t\t\tif (htmlElement) htmlElement.style.overflowY = \"hidden\";\n\t\t\tconst bodyElement = document.querySelector(\"body\");\n\t\t\tif (bodyElement) bodyElement.style.overflowY = \"auto\";\n\t\t}\n\t}\n\n\tbeginAdjustment() {\n\t\tconst header = document.getElementsByClassName(\"fsbl-header\")[0];\n\t\tif (header) {\n\t\t\tconst bodyElement = document.querySelector(\"body\");\n\t\t\tconst headerHeight = window.getComputedStyle(header, null).getPropertyValue(\"height\");\n\n\t\t\tif (bodyElement) {\n\t\t\t\tbodyElement.style.height = `calc(100vh - ${headerHeight})`;\n\t\t\t}\n\n\t\t\tif (this.state.adjustContentHeights) this.adjustTopLevelHeight(Number(headerHeight.split(\"px\")[0]));\n\n\t\t\tthis.bumpElements(this.state.bumpElements);\n\t\t\tif (this.state.bumpElements.monitorFixedAdditions) this.monitorFixedPositionedElements(headerHeight);\n\t\t} else {\n\t\t\tLogger.system.error(\"WindowTitleBarShell.maybeAdjustWindow:could not find the header.\");\n\t\t}\n\t}\n\n\t/**\n\t * Once document is ready and header is injected into DOM, begin adjusting the height of elements and bump fixed/absolute elements\n\t */\n\tasync maybeAdjustWindow() {\n\t\t// don't start pushing stuff down until page is ready. This is needed for preloaded titlebars because they can happen before the page is ready.\n\t\tif (document.readyState === \"complete\") {\n\t\t\tthis.beginAdjustment();\n\t\t} else {\n\t\t\tdocument.addEventListener(\"readystatechange\", () => {\n\t\t\t\tif (document.readyState === \"complete\") this.beginAdjustment();\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Monitors the DOM for mutations, if the added node has a fixed position with a top style of 0px, it will be bumped by the title bar height.\n\t * @param headerHeight the height of the header\n\t */\n\tmonitorFixedPositionedElements(headerHeight: string) {\n\t\tconst options = {\n\t\t\tchildList: true,\n\t\t\tsubtree: true,\n\t\t};\n\n\t\t/**\n\t\t * MutationObserver interface provides the ability to watch for\n\t\t * changes to the DOM tree using the observe method\n\t\t */\n\t\tconst mutationObserver = new MutationObserver((mutations) => {\n\t\t\tmutations.forEach((mutation) => {\n\t\t\t\tmutation.addedNodes.forEach((node: any) => {\n\t\t\t\t\tif (!node.className?.includes(\"bumped-element\")) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst nodeStyle = window.getComputedStyle(node);\n\t\t\t\t\t\t\tconst topStyle = nodeStyle.top;\n\n\t\t\t\t\t\t\t// make sure node is fixed, has top style set to 0, and has not been bumped\n\t\t\t\t\t\t\tif (nodeStyle.position === \"fixed\" && possibleZeros.includes(topStyle)) {\n\t\t\t\t\t\t\t\tnode.style.top = this.calculateBumpValue(\"0Positioned\", topStyle, headerHeight);\n\t\t\t\t\t\t\t\tnode.classList.add(\"bumped-element\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t// Expected to error if the node is not an Element e.g text is not of type Element\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\t// We observe the body and do not disconnect because there may be other elements that are dynamically loaded, such as a dialogue menu.\n\t\tmutationObserver.observe(document.body, options);\n\t}\n\n\t/**\n\t * Calls functions to bump fixed and/or absolute elements if configured to do so.\n\t * @param {object} config bumpElements object\n\t */\n\tbumpElements(config: BumpElements) {\n\t\tif (config?.bumpBy && config?.bumpBy !== \"0px\") {\n\t\t\tif (config.fixed) this.bumpFixedElements(config);\n\t\t\tif (config.absolute) this.bumpAbsoluteElements(config);\n\t\t}\n\t}\n\n\t/**\n\t * Set the max height of each element to be the height of the parent container\n\t * subtracted by the height of the previous element. This forces the element to either obey its\n\t * predefined height or stay within the bounds of the max height.\n\t * @param {object} elem HTML element\n\t * @param {number} prev height of previous sibling\n\t * @param maxHeight\n\t */\n\tprivate adjust(elem: HTMLElement, prev: number, maxHeight: string = \"100vh\") {\n\t\tif (\n\t\t\t!elem.classList?.contains(\"adjusted-element\") &&\n\t\t\t// workaround to fix dnd scrim disappearing\n\t\t\t!elem.classList?.contains(\"fsbl-share-scrim\")\n\t\t) {\n\t\t\tconst clientHeight = elem.clientHeight ? elem.clientHeight : 0;\n\t\t\tconst offsetHeight = elem.offsetHeight ? elem.offsetHeight : 0;\n\t\t\tconst offset = offsetHeight - clientHeight;\n\t\t\tconst adjustPrev = prev + offset;\n\n\t\t\telem.style.maxHeight = `calc(${maxHeight} - ${adjustPrev}px)`;\n\t\t\telem.classList.add(\"adjusted-element\");\n\t\t}\n\t}\n\n\t/**\n\t * Adjusts the top level content view height to be its height subtracted by the headerHeight and its\n\t * maxHeight to be 100vh subtracted by the total height of the previous elements.\n\t * The height of the previous elements are added to this calculation if they are not fixed or absolute.\n\t * @param {number} headerHeight the height of the header\n\t */\n\tprivate adjustTopLevelHeight(headerHeight: number) {\n\t\tconst elems: any = document.body.querySelectorAll(\":scope > *:not(#FSBLHeader, .fsbl-header)\");\n\t\tlet prev = headerHeight;\n\n\t\telems.forEach((elem: any) => {\n\t\t\tthis.adjust(elem, prev);\n\t\t\t// Heights of fixed and absolute positioned elements are not added to the total heights of previous elements\n\t\t\t// since they are removed from the document flow and can be positioned anywhere in the page.\n\t\t\tif (elem.style.position !== \"fixed\" && elem.style.position !== \"absolute\") prev = prev + elem.offsetHeight;\n\n\t\t\tthis.adjustContentHeight(elem);\n\t\t});\n\t}\n\n\t/**\n\t * Adjusts the content view height to be maximum the parent container height subtracted by the total height elements above it.\n\t * The height of the previous elements are added to this calculation if they are not fixed or absolute.\n\t * @param {object} headerNode window titlebar\n\t */\n\tprivate adjustContentHeight(headerNode: any) {\n\t\tconst elem: any = headerNode;\n\t\tconst maxHeight = `100%`;\n\n\t\tconst { children } = elem;\n\t\tconst len = children.length;\n\t\tlet prev = 0;\n\n\t\tfor (let i = 0; i < len; i++) {\n\t\t\t// Fixed and absolute positioned elements are ignored since they are removed from the document flow.\n\t\t\tif (children[i].style.position !== \"fixed\" && children[i].style.position !== \"absolute\") {\n\t\t\t\tthis.adjust(children[i], prev, maxHeight);\n\t\t\t\tprev = prev + children[i].offsetHeight;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Calculates value to bump element by. If 'all' return top style and header height, if '0Positioned' return header height\n\t * @param type Whether all elements are being bumped by the header height and their top style or just header height\n\t * @param topStyle Element top value\n\t * @param bumpBy Value to bump element by\n\t * @returns Top style for element\n\t */\n\tprivate calculateBumpValue(type: string, topStyle: string, bumpBy: string) {\n\t\tlet topVal = topStyle;\n\t\tif (type == \"all\") {\n\t\t\ttopVal = `calc(${topStyle} + ${bumpBy})`;\n\t\t} else if (type == \"0Positioned\" && possibleZeros.includes(topStyle)) {\n\t\t\ttopVal = bumpBy;\n\t\t}\n\t\treturn topVal;\n\t}\n\n\t/**\n\t * Recursively traverse through the HTML document and return an array of the top level elements\n\t * and elements with static parents\n\t * @param {object} element The HTML element\n\t * @param {array} acc accumulator\n\t * @returns {array} array top level elements and elements with static parents\n\t *\n\t */\n\tprivate traverseHtml(element: any, acc: any[] = []) {\n\t\tconst elems: any = element.children;\n\t\tconst len = elems.length;\n\t\tif (!len) {\n\t\t\tacc.push(element);\n\t\t} else {\n\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\tconst style = window.getComputedStyle(elems[i], null);\n\t\t\t\tif (style.getPropertyValue(\"position\") == \"static\") {\n\t\t\t\t\tacc = this.traverseHtml(elems[i], acc);\n\t\t\t\t} else {\n\t\t\t\t\tacc.push(elems[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn acc;\n\t}\n\n\t/**\n\t * Bumps elements with fixed positioning down by the configured amount.\n\t * @private\n\t */\n\tprivate bumpFixedElements(params: any) {\n\t\tlet { fixed, bumpBy } = params;\n\n\t\tconst getFixedElements = (nodes: any) => {\n\t\t\tconst fixedElems: any[] = [];\n\t\t\tnodes.forEach((node: any) => {\n\t\t\t\tconst style = window.getComputedStyle(node, null);\n\t\t\t\tif (style.getPropertyValue(\"position\") == \"fixed\") fixedElems.push(node);\n\t\t\t\tconst elems = node.querySelectorAll(\"*\");\n\t\t\t\telems.forEach((elem: any) => {\n\t\t\t\t\tconst childStyle = window.getComputedStyle(elem, null);\n\t\t\t\t\tif (childStyle.getPropertyValue(\"position\") == \"fixed\") fixedElems.push(elem);\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn fixedElems;\n\t\t};\n\n\t\tconst selector = \"*:not(#FSBLHeader, .fsbl-header)\";\n\t\t// Get all fixed positioned elements\n\t\tconst elems: any = getFixedElements(document.body.querySelectorAll(`${selector}`));\n\t\tconst len = elems.length;\n\n\t\tfor (let i = 0; i < len; i++) {\n\t\t\tconst style = window.getComputedStyle(elems[i], null);\n\n\t\t\tconst topStyle = style.getPropertyValue(\"top\");\n\t\t\tif (!elems[i].className?.includes(\"bumped-element\")) {\n\t\t\t\telems[i].style.top = this.calculateBumpValue(fixed, topStyle, bumpBy);\n\t\t\t\telems[i].classList.add(\"bumped-element\");\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Bumps absolute positioned elements with static parents down by the configured amount.\n\t * @private\n\t */\n\tprivate bumpAbsoluteElements(params: any) {\n\t\tlet { absolute, bumpBy } = params;\n\n\t\tconst selector = \"*:not(#FSBLHeader, .fsbl-header)\";\n\t\t// Get top level absolute positioned elements and elements who have static parents\n\t\tconst elems: any = this.traverseHtml({ children: document.body.querySelectorAll(`:scope > ${selector}`) });\n\t\tconst len = elems.length;\n\n\t\tfor (let i = 0; i < len; i++) {\n\t\t\tconst style = window.getComputedStyle(elems[i], null);\n\n\t\t\tconst topStyle = style.getPropertyValue(\"top\");\n\n\t\t\t// Target absolute positioned elements\n\t\t\tif (style.getPropertyValue(\"position\") == \"absolute\" && !elems[i].className?.includes(\"bumped-element\")) {\n\t\t\t\telems[i].style.top = this.calculateBumpValue(absolute, topStyle, bumpBy);\n\t\t\t\telems[i].classList.add(\"bumped-element\");\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\tlet showDockingIcon = !this.state.dockingEnabled ? false : this.state.dockingIcon;\n\t\tlet isGrouped = this.state.dockingIcon == \"ejector\";\n\t\tlet showMinimizeIcon = (isGrouped && this.state.isTopRight) || !isGrouped; // If not in a group or if topright in a group\n\t\tlet tabRegionClasses = \"fsbl-tab-area\";\n\t\tlet headerClasses = \"fsbl-header\";\n\n\t\t// If we're showing tabs, we throw these classes on to modify styles.\n\t\tif (this.state.showTabs) {\n\t\t\theaderClasses = `${headerClasses} fsbl-tabs-enabled`;\n\t\t}\n\t\tif (this.state.tabs.length > 1) {\n\t\t\theaderClasses = `${headerClasses} fsbl-tabs-multiple`;\n\t\t}\n\t\tconst context = {\n\t\t\tshowLinkerButton: this.state.showLinkerButton,\n\t\t\tshowShareButton: this.state.showShareButton,\n\t\t\tshowTabRegion: this.state.showTabs,\n\t\t\tshowMinimizeButton: this.state.minButton && showMinimizeIcon,\n\t\t\tshowMaximizeButton: this.state.maxButton,\n\t\t\tonTabDropped: this.allowDragOnCenterRegion,\n\t\t\tshowDockingButton: showDockingIcon,\n\t\t\tshowCloseButton: this.state.closeButton,\n\t\t\tclassName: tabRegionClasses,\n\t\t\tthisWindowTitle: this.state.windowTitle,\n\t\t\tboundingBox: this.state.tabBarBoundingBox,\n\t\t\tlistenForDragOver: !this.state.allowDragOnCenterRegion,\n\t\t\ttabs: this.state.tabs,\n\t\t\tonTitleUpdated: this.resizeDragHandle,\n\t\t\tshowAlwaysOnTopButton: this.state.alwaysOnTopButton && showMinimizeIcon,\n\t\t\tshowTabs: this.state.showTabs,\n\t\t\talwaysOnTop: this.state.alwaysOnTop,\n\t\t\tuseDOMBasedMovement: this.state.useDOMBasedMovement,\n\t\t};\n\n\t\treturn (\n\t\t\t<div className={headerClasses} onDrop={this.onDropHandler.bind(this)}>\n\t\t\t\t{this.state.initialized && (\n\t\t\t\t\t<WindowTitleBarContext.Provider value={context}>{this.props.children}</WindowTitleBarContext.Provider>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"file":"WindowTitleBarShell.js","sourceRoot":"","sources":["../../../src/components/windowTitleBar/WindowTitleBarShell.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,qCAAqC,CAAC;AAI7C,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,2BAA2B;AAC3B,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;AAsCtC,MAAM,OAAO,mBA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AAI,gBAAgB;YACvE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;YAC7B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;YACnC,mBAAmB,EAAE,IAAI,CAAC,KAAK,CAAC,mBAAmB;SACnD,CAAC;QAEF,OAAO,CACN,6BAAK,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAClE,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,CAC1B,oBAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,IAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAkC,CACtG,CACI,CACN,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\n * Copyright 2017 by ChartIQ, Inc.\n * All rights reserved.\n */\nimport * as React from \"react\";\nimport { WindowTitleBarContext } from \"./windowTitleBarContext\";\nimport { storeManager, Actions, getStore } from \"./stores/windowTitleBarStore\";\nimport \"../../assets/css/windowTitleBar.css\";\nimport { StandardError } from \"@finsemble/finsemble-api/types/types\";\nimport StoreModel from \"@finsemble/finsemble-api/types/clients/StoreModel\";\nimport { TabProperties } from \"../../types/windowTitleBar\";\nimport { clone } from \"../sdd/Appearance.helpers\";\nimport { Logger } from \"@finsemble/finsemble-api\";\n\n// Values for possible zero\nconst possibleZeros = [\"0\", \"0px\", 0];\n\ntype BumpElements = {\n\tbumpBy: string;\n\tfixed: string;\n\tabsolute: string;\n\tmonitorFixedAdditions: boolean;\n};\n\ninterface WindowTitleBarShellProps {}\n\ninterface WindowTitleBarShellState {\n\ttabs: TabProperties[];\n\tactiveTab: TabProperties;\n\twindowTitle: string;\n\tinitialized: boolean;\n\talwaysOnTop: boolean;\n\tshowTabs: boolean;\n\tminButton: boolean;\n\tmaxButton: boolean;\n\tcloseButton: boolean;\n\tshowShareButton: boolean;\n\tshowLinkerButton: boolean;\n\tisTopRight: boolean;\n\tdockingEnabled: boolean;\n\talwaysOnTopButton: boolean;\n\tallowDragOnCenterRegion: boolean;\n\tdockingIcon: string;\n\thackScrollbar: boolean;\n\tshowDockingTooltip: boolean;\n\tshowTabRegion: boolean;\n\ttabBarBoundingBox: any;\n\tuseDOMBasedMovement: boolean;\n\tdragHandleName: string;\n\tbumpElements: BumpElements;\n\tadjustContentHeights: boolean;\n}\n\nexport class WindowTitleBarShell extends React.Component<WindowTitleBarShellProps, WindowTitleBarShellState> {\n\tstore?: StoreModel;\n\n\t// Keep track of if the mouse button is pressed\n\tisMousePressed = false;\n\n\tconstructor(props: WindowTitleBarShellProps) {\n\t\tsuper(props);\n\t\tthis.store = undefined;\n\n\t\tthis.bindCorrectContext();\n\t\tthis.state = {\n\t\t\tactiveTab: FSBL.Clients.WindowClient.getWindowIdentifier() as TabProperties,\n\t\t\tallowDragOnCenterRegion: true,\n\t\t\talwaysOnTop: false,\n\t\t\talwaysOnTopButton: false,\n\t\t\tcloseButton: false,\n\t\t\tdockingEnabled: false,\n\t\t\tdockingIcon: \"\",\n\t\t\thackScrollbar: false,\n\t\t\tinitialized: false,\n\t\t\tisTopRight: false,\n\t\t\tmaxButton: false,\n\t\t\tminButton: false,\n\t\t\tshowDockingTooltip: false,\n\t\t\tshowLinkerButton: false,\n\t\t\tshowShareButton: false,\n\t\t\tshowTabs: false,\n\t\t\tshowTabRegion: false,\n\t\t\ttabs: [],\n\t\t\ttabBarBoundingBox: {},\n\t\t\twindowTitle: \"\",\n\t\t\tuseDOMBasedMovement: true,\n\t\t\tdragHandleName: \"fsbl-drag-handle\",\n\t\t\tbumpElements: {} as BumpElements,\n\t\t\tadjustContentHeights: true,\n\t\t};\n\n\t\tfinsembleWindow.isAlwaysOnTop({}, (err, alwaysOnTop: boolean) => {\n\t\t\tthis.setState({ ...this.state, alwaysOnTop });\n\t\t});\n\n\t\tfinsembleWindow.addEventListener(\"alwaysOnTop\", this.alwaysOnTopListener);\n\t}\n\n\talwaysOnTopListener({ data: { alwaysOnTop } }: any) {\n\t\tthis.setState({ ...this.state, alwaysOnTop });\n\t}\n\n\t/**\n\t * This is necessary to make sure that the `this` inside of the callback is correct.\n\t *\n\t * @memberof WindowTitleBar\n\t */\n\tbindCorrectContext() {\n\t\tthis.onTitleChange = this.onTitleChange.bind(this);\n\t\tthis.onShowDockingToolTip = this.onShowDockingToolTip.bind(this);\n\t\tthis.onToggleDockingIcon = this.onToggleDockingIcon.bind(this);\n\t\tthis.onDockingEnabledChanged = this.onDockingEnabledChanged.bind(this);\n\t\tthis.onAlwaysOnTopChanged = this.onAlwaysOnTopChanged.bind(this);\n\t\tthis.showLinkerButton = this.showLinkerButton.bind(this);\n\t\tthis.isTopRight = this.isTopRight.bind(this);\n\t\tthis.allowDragOnCenterRegion = this.allowDragOnCenterRegion.bind(this);\n\t\tthis.disallowDragOnCenterRegion = this.disallowDragOnCenterRegion.bind(this);\n\t\tthis.setDOMBasedMovement = this.setDOMBasedMovement.bind(this);\n\t\tthis.onShareEmitterChanged = this.onShareEmitterChanged.bind(this);\n\t\tthis.onTabsChanged = this.onTabsChanged.bind(this);\n\t\tthis.onShowTabsChanged = this.onShowTabsChanged.bind(this);\n\t\tthis.onTilingStop = this.onTilingStop.bind(this);\n\t\tthis.onTilingStart = this.onTilingStart.bind(this);\n\t\tthis.resizeDragHandle = this.resizeDragHandle.bind(this);\n\t\tthis.onDoubleClick = this.onDoubleClick.bind(this);\n\t\tthis.alwaysOnTopListener = this.alwaysOnTopListener.bind(this);\n\t\tthis.onInitialized = this.onInitialized.bind(this);\n\t}\n\n\tonInitialized() {\n\t\tthis.store = getStore();\n\t\tthis.store.addListeners(\n\t\t\t[\n\t\t\t\t{ field: \"Main.windowTitle\", listener: this.onTitleChange },\n\t\t\t\t{ field: \"Main.showDockingTooltip\", listener: this.onShowDockingToolTip },\n\t\t\t\t{ field: \"Main.dockingIcon\", listener: this.onToggleDockingIcon },\n\t\t\t\t{ field: \"Main.dockingEnabled\", listener: this.onDockingEnabledChanged },\n\t\t\t\t{ field: \"AlwaysOnTop.show\", listener: this.onAlwaysOnTopChanged },\n\t\t\t\t{ field: \"Linker.showLinkerButton\", listener: this.showLinkerButton },\n\t\t\t\t{ field: \"Sharer.emitterEnabled\", listener: this.onShareEmitterChanged },\n\t\t\t\t{ field: \"isTopRight\", listener: this.isTopRight },\n\t\t\t\t{ field: \"tabs\", listener: this.onTabsChanged },\n\t\t\t\t{ field: \"showTabs\", listener: this.onShowTabsChanged },\n\t\t\t\t{ field: \"hackScrollbar\", listener: this.onShowTabsChanged },\n\t\t\t\t{ field: \"Main.useDOMBasedMovement\", listener: this.setDOMBasedMovement },\n\t\t\t],\n\t\t\t() => {}\n\t\t);\n\n\t\t// Add listeners for tiling/tabbing\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.startTilingOrTabbing\", this.onTilingStart);\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.stopTilingOrTabbing\", this.onTilingStop);\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.cancelTilingOrTabbing\", this.onTilingStop);\n\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.startTilingOrTabbing\", this.disallowDragOnCenterRegion);\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.stopTilingOrTabbing\", this.allowDragOnCenterRegion);\n\t\tFSBL.Clients.RouterClient.addListener(\"DockingService.cancelTilingOrTabbing\", this.allowDragOnCenterRegion);\n\n\t\tthis.onStoreChange();\n\t\tthis.setState({\n\t\t\tinitialized: true,\n\t\t});\n\t}\n\n\tonStoreChange() {\n\t\tlet activeIdentifier = finsembleWindow.identifier as TabProperties;\n\t\tactiveIdentifier.title = this.store?.getValue({\n\t\t\tfield: \"Main.windowTitle\",\n\t\t});\n\n\t\tthis.setState({\n\t\t\twindowTitle: this.store?.getValue({ field: \"Main.windowTitle\" }),\n\t\t\tminButton: !this.store?.getValue({ field: \"Minimize.hide\" }),\n\t\t\tmaxButton: !this.store?.getValue({ field: \"Maximize.hide\" }),\n\t\t\tcloseButton: !this.store?.getValue({ field: \"Close.hide\" }),\n\t\t\tshowLinkerButton: this.store?.getValue({\n\t\t\t\tfield: \"Linker.showLinkerButton\",\n\t\t\t}),\n\t\t\tshowShareButton: this.store?.getValue({\n\t\t\t\tfield: \"Sharer.emitterEnabled\",\n\t\t\t}),\n\t\t\tisTopRight: this.store?.getValue({ field: \"isTopRight\" }),\n\t\t\talwaysOnTopButton: this.store?.getValue({\n\t\t\t\tfield: \"AlwaysOnTop.show\",\n\t\t\t}),\n\t\t\tshowTabs: this.store?.getValue({ field: \"showTabs\" }),\n\t\t\thackScrollbar: this.store?.getValue({ field: \"hackScrollbar\" }),\n\t\t\tbumpElements: this.store?.getValue({ field: \"bumpElements\" }),\n\t\t\tadjustContentHeights: this.store?.getValue({ field: \"adjustContentHeights\" }),\n\t\t\ttabs: [activeIdentifier], // array of tabs for this window\n\t\t});\n\t}\n\n\tcomponentDidMount() {\n\t\t// Goal: If a user gets focus into the title bar (if they Alt+Tab or Cmd+Tab into the window),\n\t\t// we want to let get into the rest of the component using the keyboard alone. The UX for\n\t\t// this task will be to seemingly TAB from the title bar into the window, if possible.\n\t\t// Code: If the user presses the \"Tab\" key, move their focus to the browser view\n\t\twindow.addEventListener(\"keydown\", (e) => {\n\t\t\tif (e.key === \"Tab\") {\n\t\t\t\t// This magic moves focus to a browserView, if one exists\n\t\t\t\tfinsembleWindow.focus();\n\t\t\t}\n\t\t});\n\t\tlet header = document.getElementsByClassName(\"fsbl-header\")[0];\n\n\t\t//Add a margin top to the body if there title bar is injected into the component.\n\t\tif (header) {\n\t\t\tdocument.body.style.margin = \"0px\";\n\t\t\tdocument.body.style.marginTop = window.getComputedStyle(header, null).getPropertyValue(\"height\");\n\t\t}\n\t\tthis.resizeDragHandle();\n\t\tthis.hackScrollbar();\n\t\tstoreManager.addInitializedListener(this.onInitialized);\n\t\tstoreManager.initialize();\n\t}\n\n\tcomponentDidUpdate() {\n\t\tthis.resizeDragHandle();\n\t\t// Sometimes handleMouseUp is not invoked; specifically this can happen if the mouse is not over the drag handle when the button is\n\t\t// unpressed. This happens when the drag starts near the bottom of the drag handle and the mouse is moved UP. If the window is\n\t\t// docked to a window ABOVE then it may snap a few pixels up, making the mouse no longer on top of the drag handle. At this point, the\n\t\t// componentDidUpdate is executed and the onmouseup handler is not invoked. Setting this.isMousePressed handles that narrow case.\n\t\tthis.isMousePressed = false;\n\t\tthis.hackScrollbar();\n\t\tthis.maybeAdjustWindow();\n\t}\n\n\tcomponentWillUnmount() {\n\t\tstoreManager.removeInitializedListener(this.onInitialized);\n\t\tif (this.state.initialized) {\n\t\t\tthis.store?.removeListeners(\n\t\t\t\t[\n\t\t\t\t\t{ field: \"Main.windowTitle\", listener: this.onTitleChange },\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"Main.showDockingTooltip\",\n\t\t\t\t\t\tlistener: this.onShowDockingToolTip,\n\t\t\t\t\t},\n\t\t\t\t\t{ field: \"Main.dockingIcon\", listener: this.onToggleDockingIcon },\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"Main.dockingEnabled\",\n\t\t\t\t\t\tlistener: this.onDockingEnabledChanged,\n\t\t\t\t\t},\n\t\t\t\t\t{ field: \"AlwaysOnTop.show\", listener: this.onAlwaysOnTopChanged },\n\t\t\t\t\t{ field: \"Linker.showLinkerButton\", listener: this.showLinkerButton },\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"Sharer.emitterEnabled\",\n\t\t\t\t\t\tlistener: this.onShareEmitterChanged,\n\t\t\t\t\t},\n\t\t\t\t\t{ field: \"isTopRight\", listener: this.isTopRight },\n\t\t\t\t\t{ field: \"tabs\", listener: this.onTabsChanged },\n\t\t\t\t\t{ field: \"showTabs\", listener: this.onShowTabsChanged },\n\t\t\t\t],\n\t\t\t\t() => {},\n\t\t\t\t() => {}\n\t\t\t);\n\n\t\t\t// Cleanup all listeners\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"DockingService.startTilingOrTabbing\", this.disallowDragOnCenterRegion);\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"DockingService.stopTilingOrTabbing\", this.allowDragOnCenterRegion);\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"DockingService.cancelTilingOrTabbing\", this.allowDragOnCenterRegion);\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"DockingService.startTilingOrTabbing\", this.onTilingStart);\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"DockingService.stopTilingOrTabbing\", this.onTilingStop);\n\t\t\tFSBL.Clients.RouterClient.removeListener(\"DockingService.cancelTilingOrTabbing\", this.onTilingStop);\n\t\t}\n\t}\n\n\tsetDOMBasedMovement(err: StandardError, response: any) {\n\t\tif (response && response.hasOwnProperty(\"value\")) {\n\t\t\tthis.setState(\n\t\t\t\t{\n\t\t\t\t\tuseDOMBasedMovement: response.value,\n\t\t\t\t\tdragHandleName: response.value ? \"fsbl-drag-handle\" : \"fsbl-drag-handle-native-movement\",\n\t\t\t\t},\n\t\t\t\tthis.resizeDragHandle\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * When we are not tiling/tabbing, we want to allow the user to drag the window around via any available space in the tab-region. This function allows that.\n\t */\n\tallowDragOnCenterRegion() {\n\t\tthis.setState({\n\t\t\tallowDragOnCenterRegion: true,\n\t\t});\n\t}\n\n\t/**\n\t * When we are tiling/tabbing, we do not want to allow any window to be dragged around and moved.\n\t */\n\tdisallowDragOnCenterRegion() {\n\t\tthis.setState({\n\t\t\tallowDragOnCenterRegion: false,\n\t\t});\n\t}\n\n\t/**\n\t * When tiling start, we want to find the dragHandler and hide it\n\t */\n\tonTilingStart() {\n\t\tdocument.querySelector(`.${this.state.dragHandleName}`)?.classList.add(\"hidden\");\n\t}\n\n\t/**\n\t * When tiling stops, we want to find the dragHandler and re-show it\n\t */\n\tonTilingStop() {\n\t\tdocument.querySelector(`.${this.state.dragHandleName}.hidden`)?.classList.remove(\"hidden\");\n\t}\n\n\t/**\n\t * Called whenever a tab is dropped on a non tab area.\n\t * It won't be called when dropped on a tab that handles handle the event.\n\t */\n\tonDropHandler() {\n\t\tFSBL.Clients.RouterClient.transmit(\"DockingService.cancelTilingOrTabbing\", {});\n\t}\n\n\t/**\n\t * Called when user double clicks on drag handle\n\t */\n\tonDoubleClick() {\n\t\t// Actions.clickMaximize checks the window state\n\t\t// and toggles between maximize and minimize.\n\t\tActions.clickMaximize();\n\t}\n\n\t_setOnMouseUpAndDownHandlers(element: HTMLDivElement) {\n\t\t// Sometimes the mouse cursor can leave the drag handle when the window is moved quickly\n\t\t// In this case, the drag will succeed but handleMouseUp() is not invoked; as a consequence,\n\t\t// this.isMousePressed is not reset and FSBL.Clients.WindowClient.stopMovingWindow() is not called.\n\t\t//\n\t\t// To work around this, a new variable is introduced in order to keep track of if the mouse cursor\n\t\t// has left the drag handle. If handleMouseDown is invoked AND mouseHasLeft has been set to true, then\n\t\t// any click (handleMouseDown) will reset mouseHasLeft and this.isMousePressed (the drag state)\n\t\tlet mouseHasLeft = false;\n\n\t\t/**\n\t\t * Keeps track of when the mouse cursor leaves the drag handle.\n\t\t */\n\t\tconst handleMouseLeave = () => {\n\t\t\tmouseHasLeft = true;\n\t\t};\n\n\t\t// if do double click it will invoke MouseDown and MouseUp events which could break the window bounds. So wait a 100ms for moving or resizing the window.\n\t\tconst handleMouseDown = (event: MouseEvent) => {\n\t\t\t// If the mouse has left the drag handle then reset drag state on click\n\t\t\tif (mouseHasLeft) {\n\t\t\t\tmouseHasLeft = false;\n\t\t\t\tthis.isMousePressed = false;\n\t\t\t\tFSBL.Clients.WindowClient.stopMovingWindow();\n\t\t\t}\n\n\t\t\t// prevent a second call if the button hasn't been unpressed\n\t\t\tif (this.isMousePressed) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Indicate that the mouse has been pressed\n\t\t\tthis.isMousePressed = true;\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (this.isMousePressed) {\n\t\t\t\t\tFSBL.Clients.WindowClient.startMovingWindow(event);\n\t\t\t\t}\n\t\t\t}, 100);\n\t\t};\n\t\tconst handleMouseUp = () => {\n\t\t\t// prevent a call if the button hasn't been pressed\n\t\t\tif (!this.isMousePressed) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.isMousePressed = false;\n\t\t\tFSBL.Clients.WindowClient.stopMovingWindow();\n\t\t};\n\n\t\telement.onmouseleave = handleMouseLeave;\n\t\telement.onmousedown = handleMouseDown;\n\t\telement.onmouseup = handleMouseUp;\n\t}\n\n\tmakeDragHandle(fsblHeader: Element, dragHandleCssClass: string): HTMLElement {\n\t\tlet dragHandle = document.createElement(\"div\");\n\t\tdragHandle.className = dragHandleCssClass;\n\t\tthis._setOnMouseUpAndDownHandlers(dragHandle);\n\n\t\tdragHandle.ondblclick = () => {\n\t\t\tthis.onDoubleClick();\n\t\t};\n\t\tfsblHeader.insertBefore(dragHandle, fsblHeader.firstChild);\n\t\twindow.addEventListener(\"resize\", () => {\n\t\t\tthis.resizeDragHandle();\n\t\t});\n\n\t\treturn dragHandle;\n\t}\n\n\tdragHandleBoundsForShowTabs(startingBounds: DOMRect): DOMRect {\n\t\tif (this.state.tabs.length > 1) {\n\t\t\t// The drag handle is the space between the right-most tab and the left-most window button (minimize, maximize, close, etc)\n\t\t\t//\n\t\t\t// The bounds will largely be the same as \".fsbl-header-right\"\n\t\t\tconst headerRight = document.querySelector(\".fsbl-header-right\");\n\n\t\t\tif (headerRight) {\n\t\t\t\t// The padding (in pixels) for the left and right of the drag handle\n\t\t\t\tconst padding = 2;\n\n\t\t\t\t// Get the RIGHT-MOST x-coordinate for the drag handle\n\t\t\t\t//\n\t\t\t\t// The \"x\" coordinate of the LEFT-MOST element in the \"fsbl-header-right\" container; but\n\t\t\t\t// if there are no elements in the container then use the \"innerWidth\" of the window because that\n\t\t\t\t// value is the furthest RIGHT x-coordinate available to use\n\t\t\t\tconst leftMostRightHeaderElement = document.querySelector(\n\t\t\t\t\t\".fsbl-tabs-multiple .fsbl-header-right div:first-child\"\n\t\t\t\t);\n\t\t\t\tconst rightXCoord = leftMostRightHeaderElement\n\t\t\t\t\t? leftMostRightHeaderElement.getBoundingClientRect().x\n\t\t\t\t\t: window.innerWidth;\n\n\t\t\t\t// Get the LEFT-MOST x-coordinate for the drag handle\n\t\t\t\t//\n\t\t\t\t// Get the \"x\" coordinate for the RIGHT-MOST tab; the \"right\" attribute will be the\n\t\t\t\t// LEFT x-coordinate for the drag handle\n\t\t\t\tconst rightTab = document.querySelector(\".tab-region-wrapper .fsbl-tab:last-child\");\n\t\t\t\t// The \"left\" bounds is to the RIGHT of the RIGHT-MOST tab, plus padding\n\t\t\t\tconst leftXCoord = Math.trunc(rightTab?.getBoundingClientRect().right || 0) + padding;\n\n\t\t\t\t// The \"width\" bounds attribute is the difference between leftXCoord and rightXCoord, minus padding\n\t\t\t\tconst width = rightXCoord - leftXCoord - padding;\n\n\t\t\t\t// Override bounds.width and bounds.left with the calculated values\n\t\t\t\treturn {\n\t\t\t\t\t// The spread operator only uses own properties; simply\n\t\t\t\t\t// spreading \"headerRight.getBoundingClientRect()\" will result in an\n\t\t\t\t\t// empty object being spread. Clone the object to be sure all\n\t\t\t\t\t// values are spread\n\t\t\t\t\t...clone(headerRight.getBoundingClientRect()),\n\t\t\t\t\twidth: width,\n\t\t\t\t\tleft: leftXCoord,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn startingBounds;\n\t\t\t}\n\t\t} else {\n\t\t\t// If tabs are not enabled, then the remained of fsbl-header-center beyond the tabs\n\t\t\t// is the draggable area. This assumes left aligned tabs.\n\t\t\tconst fsblHeaderCenter = document.querySelector(\".fsbl-header-center\");\n\t\t\tconst bounds = fsblHeaderCenter?.getBoundingClientRect() ?? startingBounds;\n\t\t\tconst tabRegionWrapperDiv = fsblHeaderCenter?.querySelector(\".tab-region-wrapper div.fsbl-header-title\");\n\t\t\tif (tabRegionWrapperDiv) {\n\t\t\t\tconst theTabBounds = tabRegionWrapperDiv.getBoundingClientRect();\n\t\t\t\t// Calculate the right portion\n\t\t\t\treturn {\n\t\t\t\t\t...clone(bounds),\n\t\t\t\t\tleft: bounds.left + theTabBounds.width,\n\t\t\t\t\twidth: bounds.width - theTabBounds.width,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn bounds;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * The dragger is an absolutely positioned element that is superimposed on the actual area that we'd like to drag.\n\t * This is necessary due to a bug in Chromium. Effectively, we need the dragger to change its left position and width\n\t * to match the intended drag area. These dimensions can change whenever the header is re-rendered (for instance when\n\t * changing mode from tabbing to non-tabbing). Dimensions can also change when the window itself is resized (due to natural\n\t * css).\n\t *\n\t * Can remove all of the cq-drag and cq-no-drag because Chromium bug is fixed\n\t * Remove fsbl-drag-region, it is no longer needed\n\t * Hide the dragHandle during drop operations, so that it doesn't interfere\n\t */\n\tresizeDragHandle() {\n\t\t// Sometimes this function is called during a drag (determined by this.isMousePressed); in this case,\n\t\t// the function should abort.\n\t\t//\n\t\t// This happens if the cursor starts dragging near the left end of the drag handle. When the mouse is moved left, the cursor\n\t\t// moves left (over the right-most) tab for a few moments, triggering an invocation of this function. This is incorrect\n\t\t// behavior and should be avoided\n\t\tif (this.isMousePressed) {\n\t\t\treturn;\n\t\t}\n\t\t// This function is invoked when a window is grouped or ungrouped (or docked); in all these cases, reset the mouse pressed state\n\t\t//\n\t\t// Reset the mouse pressed state\n\t\tthis.isMousePressed = false;\n\n\t\ttry {\n\t\t\tconst fsblHeader = document.querySelector(\".fsbl-header\");\n\t\t\t// If there isn't an FSBLHeader then there doesn't need to be a drag handle.\n\t\t\tif (!fsblHeader) return;\n\n\t\t\tconst dragHandleCssClass = this.state.useDOMBasedMovement\n\t\t\t\t? \"fsbl-drag-handle\"\n\t\t\t\t: \"fsbl-drag-handle-native-movement\";\n\n\t\t\tconst dragHandleToRemoveClass = this.state.useDOMBasedMovement\n\t\t\t\t? \"fsbl-drag-handle-native-movement\"\n\t\t\t\t: \"fsbl-drag-handle\";\n\n\t\t\t// Create the dragger if it doesn't already exist\n\t\t\tlet dragHandle =\n\t\t\t\t(document.querySelector(`.${dragHandleCssClass}`) as HTMLElement) ??\n\t\t\t\tthis.makeDragHandle(fsblHeader, dragHandleCssClass);\n\n\t\t\t// When the titlebar starts up, useDOMBasedMovement will have a default value that is not the same as the config value\n\t\t\t// When the value from the config propagates down to the UI, we need to make sure the old drag handle is removed in place of the new\n\t\t\tconst dragHandleToRemove = document.querySelector(`.${dragHandleToRemoveClass}`) as HTMLElement;\n\t\t\tif (dragHandleToRemove) dragHandleToRemove.parentNode?.removeChild(dragHandleToRemove);\n\n\t\t\t// Set the height of the dragHandle to match the height of the window title bar\n\t\t\t// Do this every time through the render loop just in case a customer builds a\n\t\t\t// header bar with dynamic height!\n\t\t\tlet bounds = fsblHeader.getBoundingClientRect();\n\n\t\t\tdragHandle.style.height = `${bounds.height - 5}px`; // Subtract 5 pixels from height in order to make room for resize window cursor at top edge of window\n\t\t\tdragHandle.style.marginTop = `${-bounds.height + 5}px`; // Negative margin pulls the drag handle up over the fixed header\n\n\t\t\t// Start logic for determining where to place our dragHandle\n\t\t\tif (this.state.showTabs) {\n\t\t\t\tbounds = this.dragHandleBoundsForShowTabs(bounds);\n\t\t\t} else {\n\t\t\t\t// If tabs are not enabled, then the entire center is the drag area\n\t\t\t\tlet fsblHeaderCenter = document.querySelector(\".fsbl-header-center\");\n\t\t\t\tif (fsblHeaderCenter) bounds = fsblHeaderCenter.getBoundingClientRect();\n\t\t\t}\n\n\t\t\tif (bounds) {\n\t\t\t\tdragHandle.style.left = `${bounds.left}px`;\n\t\t\t\tdragHandle.style.width = `${bounds.width}px`;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t}\n\t}\n\n\t/**\n\t * Whether the component's config allows for the linker.\n\t * @param {} err\n\t * @param {*} response\n\t */\n\tshowLinkerButton(err: StandardError, response: any) {\n\t\tthis.setState({ showLinkerButton: response.value });\n\t}\n\n\t/**\n\t * Whether the window is the top-right-most window in a group of windows. If so, it renders a minimize icon for the whole group.\n\t * @param {} err\n\t * @param {*} response\n\t */\n\tisTopRight(err: StandardError, response: any) {\n\t\tthis.setState({ isTopRight: response.value });\n\t}\n\n\t/**\n\t * @param {*} err\n\t * @param {*} response\n\t */\n\tonTitleChange(err: StandardError, response: any) {\n\t\tlet { tabs } = this.state;\n\t\tlet myIdentifier = FSBL.Clients.WindowClient.getWindowIdentifier();\n\n\t\ttabs = tabs.map((el) => {\n\t\t\tif (!el.windowName && el.name) el.windowName = el.name;\n\t\t\tif (!el.name && el.windowName) el.name = el.windowName;\n\t\t\treturn el;\n\t\t});\n\n\t\tconst myIndex = tabs.findIndex((el: TabProperties) => el.name === myIdentifier.windowName);\n\t\tif (myIndex === -1) return;\n\n\t\tlet myTab = tabs[myIndex] || {};\n\t\tmyTab.title = response.value;\n\t\ttabs.splice(myIndex, 1, myTab);\n\n\t\tthis.setState({\n\t\t\twindowTitle: response.value,\n\t\t\ttabs: tabs,\n\t\t});\n\t}\n\n\t/**\n\t * The next few methods are store change handlers that sync local state with the store's state.\n\t */\n\tonShowDockingToolTip(err: StandardError, response: any) {\n\t\tthis.setState({ showDockingTooltip: response.value });\n\t}\n\n\tonToggleDockingIcon(err: StandardError, response: any) {\n\t\tthis.setState({ dockingIcon: response.value });\n\t}\n\n\tonDockingEnabledChanged(err: StandardError, response: any) {\n\t\tthis.setState({ dockingEnabled: response.value });\n\t}\n\n\tonAlwaysOnTopChanged(err: StandardError, response: any) {\n\t\tthis.setState({ alwaysOnTopButton: response.value });\n\t}\n\n\tonStoreChanged(newState: WindowTitleBarShellState) {\n\t\tthis.setState(newState);\n\t}\n\n\tonShareEmitterChanged(err: StandardError, response: any) {\n\t\tthis.setState({ showShareButton: response.value });\n\t}\n\n\tonTabsChanged(err: StandardError, response: any) {\n\t\tthis.setState({\n\t\t\ttabs: response.value,\n\t\t});\n\t}\n\n\tonShowTabsChanged(err: StandardError, response: any) {\n\t\t// If we are not showing tabs, then it means that it is a non tabbed window\n\t\t// therefore we need to check whether we have a window title contained in\n\t\t// .div.fsbl-tab-editor so that we can edit it.\n\t\tif (!response.value) {\n\t\t\tlet tabEditor = document.querySelector(\"div.fsbl-tab-editor\") as HTMLDivElement;\n\t\t\tif (tabEditor) {\n\t\t\t\t// we set this z-index value to be slightly higher than the drag handle\n\t\t\t\t// to make the editor dragable AND double-clickcable\n\t\t\t\ttabEditor.style.zIndex = \"2147483647\";\n\t\t\t\t// We add the mousedown and mouseup functions to the tab editor\n\t\t\t\t// so that on a single mouse down it allows the user to drag the\n\t\t\t\t// window on both the .fsbl-drag-handle and the .fsbl-tab-editor\n\t\t\t\tthis._setOnMouseUpAndDownHandlers(tabEditor);\n\t\t\t}\n\t\t}\n\t\tthis.setState({\n\t\t\tshowTabs: response.value,\n\t\t});\n\t}\n\n\t// Hack the window's scrollbar so that it displays underneath the header. html.overflow: hidden body.overflow:auto\n\t// This is turned on by default. Set \"Window Manager.hackScrollbar: false\" to turn it off\n\thackScrollbar() {\n\t\tif (this.state.hackScrollbar) {\n\t\t\tconst htmlElement = document.querySelector(\"html\");\n\t\t\tif (htmlElement) htmlElement.style.overflowY = \"hidden\";\n\t\t\tconst bodyElement = document.querySelector(\"body\");\n\t\t\tif (bodyElement) bodyElement.style.overflowY = \"auto\";\n\t\t}\n\t}\n\n\tbeginAdjustment() {\n\t\tconst header = document.getElementsByClassName(\"fsbl-header\")[0];\n\t\tif (header) {\n\t\t\tconst bodyElement = document.querySelector(\"body\");\n\t\t\tconst headerHeight = window.getComputedStyle(header, null).getPropertyValue(\"height\");\n\n\t\t\tif (bodyElement) {\n\t\t\t\tbodyElement.style.height = `calc(100vh - ${headerHeight})`;\n\t\t\t}\n\n\t\t\tif (this.state.adjustContentHeights) this.adjustTopLevelHeight(Number(headerHeight.split(\"px\")[0]));\n\n\t\t\tthis.bumpElements(this.state.bumpElements);\n\t\t\tif (this.state.bumpElements.monitorFixedAdditions) this.monitorFixedPositionedElements(headerHeight);\n\t\t} else {\n\t\t\tLogger.system.error(\"WindowTitleBarShell.maybeAdjustWindow:could not find the header.\");\n\t\t}\n\t}\n\n\t/**\n\t * Once document is ready and header is injected into DOM, begin adjusting the height of elements and bump fixed/absolute elements\n\t */\n\tasync maybeAdjustWindow() {\n\t\t// don't start pushing stuff down until page is ready. This is needed for preloaded titlebars because they can happen before the page is ready.\n\t\tif (document.readyState === \"complete\") {\n\t\t\tthis.beginAdjustment();\n\t\t} else {\n\t\t\tdocument.addEventListener(\"readystatechange\", () => {\n\t\t\t\tif (document.readyState === \"complete\") this.beginAdjustment();\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Monitors the DOM for mutations, if the added node has a fixed position with a top style of 0px, it will be bumped by the title bar height.\n\t * @param headerHeight the height of the header\n\t */\n\tmonitorFixedPositionedElements(headerHeight: string) {\n\t\tconst options = {\n\t\t\tchildList: true,\n\t\t\tsubtree: true,\n\t\t};\n\n\t\t/**\n\t\t * MutationObserver interface provides the ability to watch for\n\t\t * changes to the DOM tree using the observe method\n\t\t */\n\t\tconst mutationObserver = new MutationObserver((mutations) => {\n\t\t\tmutations.forEach((mutation) => {\n\t\t\t\tmutation.addedNodes.forEach((node: any) => {\n\t\t\t\t\tif (!node.className?.includes(\"bumped-element\")) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst nodeStyle = window.getComputedStyle(node);\n\t\t\t\t\t\t\tconst topStyle = nodeStyle.top;\n\n\t\t\t\t\t\t\t// make sure node is fixed, has top style set to 0, and has not been bumped\n\t\t\t\t\t\t\tif (nodeStyle.position === \"fixed\" && possibleZeros.includes(topStyle)) {\n\t\t\t\t\t\t\t\tnode.style.top = this.calculateBumpValue(\"0Positioned\", topStyle, headerHeight);\n\t\t\t\t\t\t\t\tnode.classList.add(\"bumped-element\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t// Expected to error if the node is not an Element e.g text is not of type Element\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\t// We observe the body and do not disconnect because there may be other elements that are dynamically loaded, such as a dialogue menu.\n\t\tmutationObserver.observe(document.body, options);\n\t}\n\n\t/**\n\t * Calls functions to bump fixed and/or absolute elements if configured to do so.\n\t * @param {object} config bumpElements object\n\t */\n\tbumpElements(config: BumpElements) {\n\t\tif (config?.bumpBy && config?.bumpBy !== \"0px\") {\n\t\t\tif (config.fixed) this.bumpFixedElements(config);\n\t\t\tif (config.absolute) this.bumpAbsoluteElements(config);\n\t\t}\n\t}\n\n\t/**\n\t * Set the max height of each element to be the height of the parent container\n\t * subtracted by the height of the previous element. This forces the element to either obey its\n\t * predefined height or stay within the bounds of the max height.\n\t * @param {object} elem HTML element\n\t * @param {number} prev height of previous sibling\n\t * @param maxHeight\n\t */\n\tprivate adjust(elem: HTMLElement, prev: number, maxHeight: string = \"100vh\") {\n\t\tif (\n\t\t\t!elem.classList?.contains(\"adjusted-element\") &&\n\t\t\t// workaround to fix dnd scrim disappearing\n\t\t\t!elem.classList?.contains(\"fsbl-share-scrim\")\n\t\t) {\n\t\t\tconst clientHeight = elem.clientHeight ? elem.clientHeight : 0;\n\t\t\tconst offsetHeight = elem.offsetHeight ? elem.offsetHeight : 0;\n\t\t\tconst offset = offsetHeight - clientHeight;\n\t\t\tconst adjustPrev = prev + offset;\n\n\t\t\telem.style.maxHeight = `calc(${maxHeight} - ${adjustPrev}px)`;\n\t\t\telem.classList.add(\"adjusted-element\");\n\t\t}\n\t}\n\n\t/**\n\t * Adjusts the top level content view height to be its height subtracted by the headerHeight and its\n\t * maxHeight to be 100vh subtracted by the total height of the previous elements.\n\t * The height of the previous elements are added to this calculation if they are not fixed or absolute.\n\t * @param {number} headerHeight the height of the header\n\t */\n\tprivate adjustTopLevelHeight(headerHeight: number) {\n\t\tconst elems: any = document.body.querySelectorAll(\":scope > *:not(#FSBLHeader, .fsbl-header)\");\n\t\tlet prev = headerHeight;\n\n\t\telems.forEach((elem: any) => {\n\t\t\tthis.adjust(elem, prev);\n\t\t\t// Heights of fixed and absolute positioned elements are not added to the total heights of previous elements\n\t\t\t// since they are removed from the document flow and can be positioned anywhere in the page.\n\t\t\tif (elem.style.position !== \"fixed\" && elem.style.position !== \"absolute\") prev = prev + elem.offsetHeight;\n\n\t\t\tthis.adjustContentHeight(elem);\n\t\t});\n\t}\n\n\t/**\n\t * Adjusts the content view height to be maximum the parent container height subtracted by the total height elements above it.\n\t * The height of the previous elements are added to this calculation if they are not fixed or absolute.\n\t * @param {object} headerNode window titlebar\n\t */\n\tprivate adjustContentHeight(headerNode: any) {\n\t\tconst elem: any = headerNode;\n\t\tconst maxHeight = `100%`;\n\n\t\tconst { children } = elem;\n\t\tconst len = children.length;\n\t\tlet prev = 0;\n\n\t\tfor (let i = 0; i < len; i++) {\n\t\t\t// Fixed and absolute positioned elements are ignored since they are removed from the document flow.\n\t\t\tif (children[i].style.position !== \"fixed\" && children[i].style.position !== \"absolute\") {\n\t\t\t\tthis.adjust(children[i], prev, maxHeight);\n\t\t\t\tprev = prev + children[i].offsetHeight;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Calculates value to bump element by. If 'all' return top style and header height, if '0Positioned' return header height\n\t * @param type Whether all elements are being bumped by the header height and their top style or just header height\n\t * @param topStyle Element top value\n\t * @param bumpBy Value to bump element by\n\t * @returns Top style for element\n\t */\n\tprivate calculateBumpValue(type: string, topStyle: string, bumpBy: string) {\n\t\tlet topVal = topStyle;\n\t\tif (type == \"all\") {\n\t\t\ttopVal = `calc(${topStyle} + ${bumpBy})`;\n\t\t} else if (type == \"0Positioned\" && possibleZeros.includes(topStyle)) {\n\t\t\ttopVal = bumpBy;\n\t\t}\n\t\treturn topVal;\n\t}\n\n\t/**\n\t * Recursively traverse through the HTML document and return an array of the top level elements\n\t * and elements with static parents\n\t * @param {object} element The HTML element\n\t * @param {array} acc accumulator\n\t * @returns {array} array top level elements and elements with static parents\n\t *\n\t */\n\tprivate traverseHtml(element: any, acc: any[] = []) {\n\t\tconst elems: any = element.children;\n\t\tconst len = elems.length;\n\t\tif (!len) {\n\t\t\tacc.push(element);\n\t\t} else {\n\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\tconst style = window.getComputedStyle(elems[i], null);\n\t\t\t\tif (style.getPropertyValue(\"position\") == \"static\") {\n\t\t\t\t\tacc = this.traverseHtml(elems[i], acc);\n\t\t\t\t} else {\n\t\t\t\t\tacc.push(elems[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn acc;\n\t}\n\n\t/**\n\t * Bumps elements with fixed positioning down by the configured amount.\n\t * @private\n\t */\n\tprivate bumpFixedElements(params: any) {\n\t\tlet { fixed, bumpBy } = params;\n\n\t\tconst getFixedElements = (selector: string) => {\n\t\t\tconst fixedElems: any[] = [];\n\t\t\tconst nodes = document.body.querySelectorAll(selector);\n\t\t\tnodes.forEach((node: any) => {\n\t\t\t\tconst style = window.getComputedStyle(node, null);\n\t\t\t\tif (style.getPropertyValue(\"position\") == \"fixed\") fixedElems.push(node);\n\t\t\t});\n\t\t\treturn fixedElems;\n\t\t};\n\n\t\tconst selector = \"*:not(#FSBLHeader, .fsbl-header)\";\n\t\t// Get all fixed positioned elements\n\t\tconst elems: any = getFixedElements(selector);\n\t\tconst len = elems.length;\n\n\t\tfor (let i = 0; i < len; i++) {\n\t\t\tconst style = window.getComputedStyle(elems[i], null);\n\n\t\t\tconst topStyle = style.getPropertyValue(\"top\");\n\t\t\tif (!elems[i].className?.includes(\"bumped-element\")) {\n\t\t\t\telems[i].style.top = this.calculateBumpValue(fixed, topStyle, bumpBy);\n\t\t\t\telems[i].classList.add(\"bumped-element\");\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Bumps absolute positioned elements with static parents down by the configured amount.\n\t * @private\n\t */\n\tprivate bumpAbsoluteElements(params: any) {\n\t\tlet { absolute, bumpBy } = params;\n\n\t\tconst selector = \"*:not(#FSBLHeader, .fsbl-header)\";\n\t\t// Get top level absolute positioned elements and elements who have static parents\n\t\tconst elems: any = this.traverseHtml({ children: document.body.querySelectorAll(`:scope > ${selector}`) });\n\t\tconst len = elems.length;\n\n\t\tfor (let i = 0; i < len; i++) {\n\t\t\tconst style = window.getComputedStyle(elems[i], null);\n\n\t\t\tconst topStyle = style.getPropertyValue(\"top\");\n\n\t\t\t// Target absolute positioned elements\n\t\t\tif (style.getPropertyValue(\"position\") == \"absolute\" && !elems[i].className?.includes(\"bumped-element\")) {\n\t\t\t\telems[i].style.top = this.calculateBumpValue(absolute, topStyle, bumpBy);\n\t\t\t\telems[i].classList.add(\"bumped-element\");\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\tlet showDockingIcon = !this.state.dockingEnabled ? false : this.state.dockingIcon;\n\t\tlet isGrouped = this.state.dockingIcon == \"ejector\";\n\t\tlet showMinimizeIcon = (isGrouped && this.state.isTopRight) || !isGrouped; // If not in a group or if topright in a group\n\t\tlet tabRegionClasses = \"fsbl-tab-area\";\n\t\tlet headerClasses = \"fsbl-header\";\n\n\t\t// If we're showing tabs, we throw these classes on to modify styles.\n\t\tif (this.state.showTabs) {\n\t\t\theaderClasses = `${headerClasses} fsbl-tabs-enabled`;\n\t\t}\n\t\tif (this.state.tabs.length > 1) {\n\t\t\theaderClasses = `${headerClasses} fsbl-tabs-multiple`;\n\t\t}\n\t\tconst context = {\n\t\t\tshowLinkerButton: this.state.showLinkerButton,\n\t\t\tshowShareButton: this.state.showShareButton,\n\t\t\tshowTabRegion: this.state.showTabs,\n\t\t\tshowMinimizeButton: this.state.minButton && showMinimizeIcon,\n\t\t\tshowMaximizeButton: this.state.maxButton,\n\t\t\tonTabDropped: this.allowDragOnCenterRegion,\n\t\t\tshowDockingButton: showDockingIcon,\n\t\t\tshowCloseButton: this.state.closeButton,\n\t\t\tclassName: tabRegionClasses,\n\t\t\tthisWindowTitle: this.state.windowTitle,\n\t\t\tboundingBox: this.state.tabBarBoundingBox,\n\t\t\tlistenForDragOver: !this.state.allowDragOnCenterRegion,\n\t\t\ttabs: this.state.tabs,\n\t\t\tonTitleUpdated: this.resizeDragHandle,\n\t\t\tshowAlwaysOnTopButton: this.state.alwaysOnTopButton && showMinimizeIcon,\n\t\t\tshowTabs: this.state.showTabs,\n\t\t\talwaysOnTop: this.state.alwaysOnTop,\n\t\t\tuseDOMBasedMovement: this.state.useDOMBasedMovement,\n\t\t};\n\n\t\treturn (\n\t\t\t<div className={headerClasses} onDrop={this.onDropHandler.bind(this)}>\n\t\t\t\t{this.state.initialized && (\n\t\t\t\t\t<WindowTitleBarContext.Provider value={context}>{this.props.children}</WindowTitleBarContext.Provider>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n}\n"]}