html-reporter 10.7.0 → 10.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ const common_utils_1 = require("../../common-utils");
13
13
  class ReporterTestAdapter {
14
14
  constructor(testResult) {
15
15
  this._testResult = testResult;
16
- this._errorDetails = null;
16
+ this._errorDetails = this._testResult.errorDetails || null;
17
17
  }
18
18
  get attempt() {
19
19
  return this._testResult.attempt;
@@ -1 +1 @@
1
- {"version":3,"file":"reporter.js","sourceRoot":"","sources":["../../../../lib/adapters/test-result/reporter.ts"],"names":[],"mappings":";;;;;;AAGA,oDAAuB;AACvB,mCAA4C;AAC5C,qDAA4D;AAE5D,kEAAkE;AAClE,iEAAiE;AACjE,4BAA4B;AAE5B,MAAa,mBAAmB;IAI5B,YAAY,UAA8B;QACtC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;IAC9B,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;IACpC,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC;IACtC,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC;IACxC,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;IAClC,CAAC;IAED,IAAI,YAAY;QACZ,IAAI,CAAC,gBAAC,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE;YAC9B,OAAO,IAAI,CAAC,aAAa,CAAC;SAC7B;QAED,IAAI,CAAC,aAAa,GAAG,IAAA,2BAAmB,EAAC,IAAI,CAAC,CAAC;QAE/C,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,WAAW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,CAAC;IAC7B,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAA,0BAAW,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC;IACvC,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACjC,CAAC;IAED,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC;IACzC,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC;IAClC,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC;IACtC,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC;IACvC,CAAC;IAED,IAAI,KAAK;QACL,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAW,EAAC,CAAC;IAClD,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;IACnC,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC;IACrC,CAAC;IAED,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC;IACtC,CAAC;IAED,IAAI,GAAG;QACH,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC;IAChC,CAAC;CACJ;AAlGD,kDAkGC"}
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.TreeTestResultTransformer = void 0;
7
7
  const lodash_1 = __importDefault(require("lodash"));
8
8
  const db_1 = require("./db");
9
- const utils_1 = require("../utils");
10
9
  class TreeTestResultTransformer {
11
10
  constructor(options) {
12
11
  this._transformer = new db_1.DbTestResultTransformer(options);
@@ -16,7 +15,7 @@ class TreeTestResultTransformer {
16
15
  return {
17
16
  ...lodash_1.default.omit(result, 'imagesInfo'),
18
17
  attempt: testResult.attempt,
19
- errorDetails: (0, utils_1.extractErrorDetails)(testResult)
18
+ errorDetails: testResult.errorDetails
20
19
  };
21
20
  }
22
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tree.js","sourceRoot":"","sources":["../../../../../lib/adapters/test-result/transformers/tree.ts"],"names":[],"mappings":";;;;;;AACA,oDAAuB;AAEvB,6BAA6C;AAC7C,oCAA6C;AAM7C,MAAa,yBAAyB;IAGlC,YAAY,OAAgB;QACxB,IAAI,CAAC,YAAY,GAAG,IAAI,4BAAuB,CAAC,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED,SAAS,CAAC,UAA8B;QACpC,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAEvD,OAAO;YACH,GAAG,gBAAC,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC;YAC/B,OAAO,EAAE,UAAU,CAAC,OAAO;YAC3B,YAAY,EAAE,IAAA,2BAAmB,EAAC,UAAU,CAAC;SAChD,CAAC;IACN,CAAC;CACJ;AAhBD,8DAgBC"}
1
+ {"version":3,"file":"tree.js","sourceRoot":"","sources":["../../../../../lib/adapters/test-result/transformers/tree.ts"],"names":[],"mappings":";;;;;;AACA,oDAAuB;AAEvB,6BAA6C;AAM7C,MAAa,yBAAyB;IAGlC,YAAY,OAAgB;QACxB,IAAI,CAAC,YAAY,GAAG,IAAI,4BAAuB,CAAC,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED,SAAS,CAAC,UAA8B;QACpC,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAEvD,OAAO;YACH,GAAG,gBAAC,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC;YAC/B,OAAO,EAAE,UAAU,CAAC,OAAO;YAC3B,YAAY,EAAE,UAAU,CAAC,YAAY;SACxC,CAAC;IACN,CAAC;CACJ;AAhBD,8DAgBC"}
@@ -0,0 +1,9 @@
1
+ export interface Feature {
2
+ name: string;
3
+ }
4
+ export declare const RunTestsFeature: {
5
+ readonly name: "run-tests";
6
+ };
7
+ export declare const EditScreensFeature: {
8
+ readonly name: "edit-screens";
9
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EditScreensFeature = exports.RunTestsFeature = void 0;
4
+ exports.RunTestsFeature = {
5
+ name: 'run-tests'
6
+ };
7
+ exports.EditScreensFeature = {
8
+ name: 'edit-screens'
9
+ };
10
+ //# sourceMappingURL=features.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features.js","sourceRoot":"","sources":["../../../lib/constants/features.ts"],"names":[],"mappings":";;;AAIa,QAAA,eAAe,GAAG;IAC3B,IAAI,EAAE,WAAW;CACO,CAAC;AAEhB,QAAA,kBAAkB,GAAG;IAC9B,IAAI,EAAE,cAAc;CACI,CAAC"}
@@ -3,6 +3,7 @@ export * from './database';
3
3
  export * from './defaults';
4
4
  export * from './diff-modes';
5
5
  export * from './errors';
6
+ export * from './features';
6
7
  export * from './group-tests';
7
8
  export * from './paths';
8
9
  export * from './tests';
@@ -19,6 +19,7 @@ __exportStar(require("./database"), exports);
19
19
  __exportStar(require("./defaults"), exports);
20
20
  __exportStar(require("./diff-modes"), exports);
21
21
  __exportStar(require("./errors"), exports);
22
+ __exportStar(require("./features"), exports);
22
23
  __exportStar(require("./group-tests"), exports);
23
24
  __exportStar(require("./paths"), exports);
24
25
  __exportStar(require("./tests"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,6CAA2B;AAC3B,6CAA2B;AAC3B,+CAA6B;AAC7B,2CAAyB;AACzB,gDAA8B;AAC9B,0CAAwB;AACxB,0CAAwB;AACxB,kDAAgC;AAChC,iDAA+B;AAC/B,kDAAgC;AAChC,+CAA6B;AAC7B,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,6CAA2B;AAC3B,6CAA2B;AAC3B,+CAA6B;AAC7B,2CAAyB;AACzB,6CAA2B;AAC3B,gDAA8B;AAC9B,0CAAwB;AACxB,0CAAwB;AACxB,kDAAgC;AAChC,iDAA+B;AAC/B,kDAAgC;AAChC,+CAA6B;AAC7B,+CAA6B"}
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[84],{68084:(e,t,l)=>{l.r(t),l.d(t,{TopPanel:()=>T});var n=l(2784),a=l(28786),r=l(50783),o=l(36043),s=l(10727),i=l(44200),c=l(4013),m=l(31499);const d=n.createContext(null),u=()=>{const e=n.useContext(d);if(!e)throw new Error('Alert: `useAlertContext` hook is used out of "AlertContext"');return e},v=e=>{const{view:t}=u();return n.createElement(r.z,Object.assign({view:"filled"===t?"normal-contrast":void 0},e))};var w=l(32590);const g=(0,w.Ge)("alert"),h=({layout:e,view:t,children:l})=>n.createElement(d.Provider,{value:{layout:e,view:t}},l),p=e=>n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),n.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14ZM6.53 5.47a.75.75 0 0 0-1.06 1.06L6.94 8 5.47 9.47a.75.75 0 1 0 1.06 1.06L8 9.06l1.47 1.47a.75.75 0 1 0 1.06-1.06L9.06 8l1.47-1.47a.75.75 0 1 0-1.06-1.06L8 6.94 6.53 5.47Z",clipRule:"evenodd"}));var f=l(75098);const E=e=>n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),n.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm1-9.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM8 7.75a.75.75 0 0 1 .75.75V11a.75.75 0 0 1-1.5 0V8.5A.75.75 0 0 1 8 7.75Z",clipRule:"evenodd"}));var x=l(34863);const A=e=>n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),n.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm3.1-8.55a.75.75 0 1 0-1.2-.9L7.419 8.858 6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08l3-4Z",clipRule:"evenodd"}));var C=l(60148);const b=e=>n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),n.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.836 2.244c.962-1.665 3.366-1.665 4.328 0l4.917 8.505c.964 1.666-.239 3.751-2.164 3.751H3.083c-1.925 0-3.128-2.085-2.164-3.751l4.917-8.505ZM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 1 1-1.5 0v-2A.75.75 0 0 1 8 5Zm1 5.75a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",clipRule:"evenodd"}));var y=l(88089);const Z=e=>n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),n.createElement("path",{fill:"currentColor",d:"m14.61 6.914-7.632 8.08a1.614 1.614 0 0 1-2.69-1.66L5.5 10H2.677A1.677 1.677 0 0 1 1.12 7.7l2.323-5.807A2.216 2.216 0 0 1 5.5.5h4c.968 0 1.637.967 1.298 1.873L10 4.5h3.569a1.431 1.431 0 0 1 1.04 2.414Z"})),N=e=>n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),n.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"m7.835 6 .76-2.027L9.336 2H5.5a.716.716 0 0 0-.664.45L2.513 8.257a.177.177 0 0 0 .164.243h4.965l-.732 2.013-1.082 2.975a.382.382 0 0 0 .637.392l6.956-7.391A.29.29 0 0 0 13.21 6H7.835Zm1.558-4.154ZM10.563 3l.235-.627A1.386 1.386 0 0 0 9.5.5h-4c-.906 0-1.72.552-2.057 1.393L1.12 7.7A1.677 1.677 0 0 0 2.677 10H5.5l-.545 1.5-.537 1.475a1.882 1.882 0 0 0 3.14 1.933l6.956-7.391A1.79 1.79 0 0 0 13.21 4.5H10l.563-1.5Z",clipRule:"evenodd"})),k={danger:{filled:p,outlined:f.Z},info:{filled:E,outlined:x.Z},success:{filled:A,outlined:C.Z},warning:{filled:b,outlined:y.Z},utility:{filled:Z,outlined:N},normal:null};var L=l(58579);var R=l(6502);const z=JSON.parse('{"label_close":"Close"}'),O=JSON.parse('{"label_close":"Закрыть"}'),j=(0,R.e)({en:z,ru:O},"Alert"),H=e=>{const{theme:t="normal",view:l="filled",layout:d="vertical",message:u,className:v,corners:w,style:p,onClose:f,align:E,qa:x}=e;return n.createElement(h,{layout:d,view:l},n.createElement(o.Z,{style:p,className:g({corners:w},(0,c.W)({py:4,px:5},v)),theme:t,view:l,qa:x},n.createElement(m.k,{gap:"3",alignItems:E},void 0===e.icon?n.createElement(H.Icon,{theme:t,view:l}):e.icon,n.createElement(m.k,{direction:"vertical"===d?"column":"row",gap:"5",grow:!0},n.createElement(m.k,{gap:"2",grow:!0,className:g("text-content")},n.createElement(m.k,{direction:"column",gap:"1",grow:!0,justifyContent:E},"string"==typeof e.title?n.createElement(H.Title,{text:e.title}):e.title,u)),Array.isArray(e.actions)?n.createElement(H.Actions,{items:e.actions}):e.actions),f&&n.createElement(r.z,{view:"flat",className:g("close-btn"),onClick:f,extraProps:{"aria-label":j("label_close")}},n.createElement(s.J,{data:a.Z,size:18,className:(0,i.V)({color:"secondary"})})))))};H.Icon=({className:e,theme:t,view:l="filled",size:a=18})=>{const r=k[t];if(!r)return null;let o;return"success"===t?o="positive":"normal"!==t&&(o=t),n.createElement("div",{className:g("icon",(0,i.V)({color:o},e))},n.createElement(s.J,{data:r[l],size:a}))},H.Title=({text:e,className:t})=>n.createElement(L.x,{variant:"subheader-2",className:g("title",t)},e),H.Actions=({items:e,children:t,className:l})=>{const{layout:a}=u();return n.createElement(m.k,{className:g("actions",{minContent:"horizontal"===a},l),direction:"row",gap:"3",wrap:!0,alignItems:"horizontal"===a?"center":"flex-start"},(null==e?void 0:e.map((({handler:e,text:t},l)=>n.createElement(v,{key:l,onClick:e},t))))||t)},H.Action=v;var M=l(24746),B=l(50850);l(54368);const S=({topAlert:e})=>{const t=n.useRef(null),l=(e=>{const[t,l]=n.useState(0);return n.useEffect((()=>{if(e.current){const{current:t}=e;l(t.clientHeight)}}),[e]),t})(t),a=n.useCallback((e=>{const t=document.getElementsByClassName("g-root").item(0);null==t||t.style.setProperty("--gn-aside-top-panel-height",e+"px")}),[]),r=n.useCallback((()=>{var e;t.current&&a((null===(e=t.current)||void 0===e?void 0:e.clientHeight)||0)}),[t,a]);return n.useLayoutEffect((()=>{const t=(0,M.d)(r,200,{leading:!0});return e&&(window.addEventListener("resize",t),t()),()=>{window.removeEventListener("resize",t),a(0)}}),[e,l,t,r,a]),{topRef:t,updateTopSize:r}},T=({topAlert:e})=>{const{topRef:t,updateTopSize:l}=S({topAlert:e}),[a,r]=n.useState(!0),o=n.useCallback((()=>{var t;r(!1),null===(t=null==e?void 0:e.onCloseTopAlert)||void 0===t||t.call(e)}),[e]);return n.useEffect((()=>{a||l()}),[a,l]),e&&e.message?n.createElement("div",{ref:t,className:(0,B.b)("pane-top",{opened:a})},a&&n.createElement(n.Fragment,null,n.createElement(H,{className:(0,B.b)("pane-top-alert",{centered:e.centered,dense:e.dense}),corners:"square",layout:"horizontal",theme:e.theme||"warning",icon:e.icon,title:e.title,message:e.message,actions:e.actions,onClose:e.closable?o:void 0}),n.createElement("div",{className:(0,B.b)("pane-top-divider")}))):null}}}]);
1
+ "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[84],{68084:(e,t,l)=>{l.r(t),l.d(t,{TopPanel:()=>T});var n=l(2784),a=l(28786),r=l(50783),o=l(36043),s=l(10727),i=l(44200),c=l(4013),m=l(31499);const d=n.createContext(null),u=()=>{const e=n.useContext(d);if(!e)throw new Error('Alert: `useAlertContext` hook is used out of "AlertContext"');return e},v=e=>{const{view:t}=u();return n.createElement(r.z,Object.assign({view:"filled"===t?"normal-contrast":void 0},e))};var w=l(32590);const g=(0,w.Ge)("alert"),h=({layout:e,view:t,children:l})=>n.createElement(d.Provider,{value:{layout:e,view:t}},l),p=e=>n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),n.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14ZM6.53 5.47a.75.75 0 0 0-1.06 1.06L6.94 8 5.47 9.47a.75.75 0 1 0 1.06 1.06L8 9.06l1.47 1.47a.75.75 0 1 0 1.06-1.06L9.06 8l1.47-1.47a.75.75 0 1 0-1.06-1.06L8 6.94 6.53 5.47Z",clipRule:"evenodd"}));var f=l(75098);const E=e=>n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),n.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm1-9.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM8 7.75a.75.75 0 0 1 .75.75V11a.75.75 0 0 1-1.5 0V8.5A.75.75 0 0 1 8 7.75Z",clipRule:"evenodd"}));var x=l(34863);const A=e=>n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),n.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm3.1-8.55a.75.75 0 1 0-1.2-.9L7.419 8.858 6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08l3-4Z",clipRule:"evenodd"}));var C=l(60148);const b=e=>n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),n.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.836 2.244c.962-1.665 3.366-1.665 4.328 0l4.917 8.505c.964 1.666-.239 3.751-2.164 3.751H3.083c-1.925 0-3.128-2.085-2.164-3.751l4.917-8.505ZM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 1 1-1.5 0v-2A.75.75 0 0 1 8 5Zm1 5.75a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z",clipRule:"evenodd"}));var y=l(88089);const Z=e=>n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),n.createElement("path",{fill:"currentColor",d:"m14.61 6.914-7.632 8.08a1.614 1.614 0 0 1-2.69-1.66L5.5 10H2.677A1.677 1.677 0 0 1 1.12 7.7l2.323-5.807A2.216 2.216 0 0 1 5.5.5h4c.968 0 1.637.967 1.298 1.873L10 4.5h3.569a1.431 1.431 0 0 1 1.04 2.414Z"})),N=e=>n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),n.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"m7.835 6 .76-2.027L9.336 2H5.5a.716.716 0 0 0-.664.45L2.513 8.257a.177.177 0 0 0 .164.243h4.965l-.732 2.013-1.082 2.975a.382.382 0 0 0 .637.392l6.956-7.391A.29.29 0 0 0 13.21 6H7.835Zm1.558-4.154ZM10.563 3l.235-.627A1.386 1.386 0 0 0 9.5.5h-4c-.906 0-1.72.552-2.057 1.393L1.12 7.7A1.677 1.677 0 0 0 2.677 10H5.5l-.545 1.5-.537 1.475a1.882 1.882 0 0 0 3.14 1.933l6.956-7.391A1.79 1.79 0 0 0 13.21 4.5H10l.563-1.5Z",clipRule:"evenodd"})),k={danger:{filled:p,outlined:f.Z},info:{filled:E,outlined:x.Z},success:{filled:A,outlined:C.Z},warning:{filled:b,outlined:y.Z},utility:{filled:Z,outlined:N},normal:null};var L=l(58579);var R=l(46902);const z=JSON.parse('{"label_close":"Close"}'),O=JSON.parse('{"label_close":"Закрыть"}'),j=(0,R.e)({en:z,ru:O},"Alert"),H=e=>{const{theme:t="normal",view:l="filled",layout:d="vertical",message:u,className:v,corners:w,style:p,onClose:f,align:E,qa:x}=e;return n.createElement(h,{layout:d,view:l},n.createElement(o.Z,{style:p,className:g({corners:w},(0,c.W)({py:4,px:5},v)),theme:t,view:l,qa:x},n.createElement(m.k,{gap:"3",alignItems:E},void 0===e.icon?n.createElement(H.Icon,{theme:t,view:l}):e.icon,n.createElement(m.k,{direction:"vertical"===d?"column":"row",gap:"5",grow:!0},n.createElement(m.k,{gap:"2",grow:!0,className:g("text-content")},n.createElement(m.k,{direction:"column",gap:"1",grow:!0,justifyContent:E},"string"==typeof e.title?n.createElement(H.Title,{text:e.title}):e.title,u)),Array.isArray(e.actions)?n.createElement(H.Actions,{items:e.actions}):e.actions),f&&n.createElement(r.z,{view:"flat",className:g("close-btn"),onClick:f,extraProps:{"aria-label":j("label_close")}},n.createElement(s.J,{data:a.Z,size:18,className:(0,i.V)({color:"secondary"})})))))};H.Icon=({className:e,theme:t,view:l="filled",size:a=18})=>{const r=k[t];if(!r)return null;let o;return"success"===t?o="positive":"normal"!==t&&(o=t),n.createElement("div",{className:g("icon",(0,i.V)({color:o},e))},n.createElement(s.J,{data:r[l],size:a}))},H.Title=({text:e,className:t})=>n.createElement(L.x,{variant:"subheader-2",className:g("title",t)},e),H.Actions=({items:e,children:t,className:l})=>{const{layout:a}=u();return n.createElement(m.k,{className:g("actions",{minContent:"horizontal"===a},l),direction:"row",gap:"3",wrap:!0,alignItems:"horizontal"===a?"center":"flex-start"},(null==e?void 0:e.map((({handler:e,text:t},l)=>n.createElement(v,{key:l,onClick:e},t))))||t)},H.Action=v;var M=l(24746),B=l(50850);l(54368);const S=({topAlert:e})=>{const t=n.useRef(null),l=(e=>{const[t,l]=n.useState(0);return n.useEffect((()=>{if(e.current){const{current:t}=e;l(t.clientHeight)}}),[e]),t})(t),a=n.useCallback((e=>{const t=document.getElementsByClassName("g-root").item(0);null==t||t.style.setProperty("--gn-aside-top-panel-height",e+"px")}),[]),r=n.useCallback((()=>{var e;t.current&&a((null===(e=t.current)||void 0===e?void 0:e.clientHeight)||0)}),[t,a]);return n.useLayoutEffect((()=>{const t=(0,M.d)(r,200,{leading:!0});return e&&(window.addEventListener("resize",t),t()),()=>{window.removeEventListener("resize",t),a(0)}}),[e,l,t,r,a]),{topRef:t,updateTopSize:r}},T=({topAlert:e})=>{const{topRef:t,updateTopSize:l}=S({topAlert:e}),[a,r]=n.useState(!0),o=n.useCallback((()=>{var t;r(!1),null===(t=null==e?void 0:e.onCloseTopAlert)||void 0===t||t.call(e)}),[e]);return n.useEffect((()=>{a||l()}),[a,l]),e&&e.message?n.createElement("div",{ref:t,className:(0,B.b)("pane-top",{opened:a})},a&&n.createElement(n.Fragment,null,n.createElement(H,{className:(0,B.b)("pane-top-alert",{centered:e.centered,dense:e.dense}),corners:"square",layout:"horizontal",theme:e.theme||"warning",icon:e.icon,title:e.title,message:e.message,actions:e.actions,onClose:e.closable?o:void 0}),n.createElement("div",{className:(0,B.b)("pane-top-divider")}))):null}}}]);