@mmb-digital/ds-lilly 1.0.83 → 1.0.85
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/cjs/components/Components/CompactButtons/CompactButtons.d.ts.map +1 -1
- package/cjs/components/Components/CompactButtons/CompactButtons.js +1 -1
- package/cjs/components/Components/CompactButtons/CompactButtons.js.map +1 -1
- package/cjs/components/Components/DataTable/DataTable.d.ts.map +1 -1
- package/cjs/components/Components/DataTable/DataTable.js +1 -1
- package/cjs/components/Components/DataTable/DataTable.js.map +1 -1
- package/cjs/components/Components/ProductCard/ProductCard.d.ts +1 -3
- package/cjs/components/Components/ProductCard/ProductCard.d.ts.map +1 -1
- package/cjs/components/Components/ProductCard/ProductCard.js +1 -1
- package/cjs/components/Components/ProductCard/ProductCard.js.map +1 -1
- package/cjs/components/Components/ProductHeader/ProductHeader.d.ts +13 -16
- package/cjs/components/Components/ProductHeader/ProductHeader.d.ts.map +1 -1
- package/cjs/components/Components/ProductHeader/ProductHeader.js +1 -1
- package/cjs/components/Components/ProductHeader/ProductHeader.js.map +1 -1
- package/cjs/components/Form/FileUpload/FileUpload.d.ts +12 -0
- package/cjs/components/Form/FileUpload/FileUpload.d.ts.map +1 -1
- package/cjs/components/Form/FileUpload/FileUpload.js +1 -1
- package/cjs/components/Form/FileUpload/FileUpload.js.map +1 -1
- package/cjs/components/Form/FileUpload/_parts_/MergeDialog.d.ts.map +1 -1
- package/cjs/components/Form/FileUpload/_parts_/MergeDialog.js +1 -1
- package/cjs/components/Form/FileUpload/_parts_/MergeDialog.js.map +1 -1
- package/cjs/components/Form/FileUpload/_parts_/ModalConfirmContent.d.ts +12 -0
- package/cjs/components/Form/FileUpload/_parts_/ModalConfirmContent.d.ts.map +1 -0
- package/cjs/components/Form/FileUpload/_parts_/ModalConfirmContent.js +2 -0
- package/cjs/components/Form/FileUpload/_parts_/ModalConfirmContent.js.map +1 -0
- package/cjs/components/Form/FileUpload/_parts_/ModalWaitingContent.d.ts +8 -0
- package/cjs/components/Form/FileUpload/_parts_/ModalWaitingContent.d.ts.map +1 -0
- package/cjs/components/Form/FileUpload/_parts_/ModalWaitingContent.js +2 -0
- package/cjs/components/Form/FileUpload/_parts_/ModalWaitingContent.js.map +1 -0
- package/cjs/ds-lilly.css +113 -54
- package/components/Components/CompactButtons/CompactButtons.d.ts.map +1 -1
- package/components/Components/CompactButtons/CompactButtons.js +1 -1
- package/components/Components/CompactButtons/CompactButtons.js.map +1 -1
- package/components/Components/DataTable/DataTable.d.ts.map +1 -1
- package/components/Components/DataTable/DataTable.js +1 -1
- package/components/Components/DataTable/DataTable.js.map +1 -1
- package/components/Components/ProductCard/ProductCard.d.ts +1 -3
- package/components/Components/ProductCard/ProductCard.d.ts.map +1 -1
- package/components/Components/ProductCard/ProductCard.js +1 -1
- package/components/Components/ProductCard/ProductCard.js.map +1 -1
- package/components/Components/ProductHeader/ProductHeader.d.ts +13 -16
- package/components/Components/ProductHeader/ProductHeader.d.ts.map +1 -1
- package/components/Components/ProductHeader/ProductHeader.js +1 -1
- package/components/Components/ProductHeader/ProductHeader.js.map +1 -1
- package/components/Form/FileUpload/FileUpload.d.ts +12 -0
- package/components/Form/FileUpload/FileUpload.d.ts.map +1 -1
- package/components/Form/FileUpload/FileUpload.js +1 -1
- package/components/Form/FileUpload/FileUpload.js.map +1 -1
- package/components/Form/FileUpload/_parts_/MergeDialog.d.ts.map +1 -1
- package/components/Form/FileUpload/_parts_/MergeDialog.js +1 -1
- package/components/Form/FileUpload/_parts_/MergeDialog.js.map +1 -1
- package/components/Form/FileUpload/_parts_/ModalConfirmContent.d.ts +12 -0
- package/components/Form/FileUpload/_parts_/ModalConfirmContent.d.ts.map +1 -0
- package/components/Form/FileUpload/_parts_/ModalConfirmContent.js +2 -0
- package/components/Form/FileUpload/_parts_/ModalConfirmContent.js.map +1 -0
- package/components/Form/FileUpload/_parts_/ModalWaitingContent.d.ts +8 -0
- package/components/Form/FileUpload/_parts_/ModalWaitingContent.d.ts.map +1 -0
- package/components/Form/FileUpload/_parts_/ModalWaitingContent.js +2 -0
- package/components/Form/FileUpload/_parts_/ModalWaitingContent.js.map +1 -0
- package/ds-lilly.css +113 -54
- package/package.json +1 -1
- /package/assets/{1ab73c9256fd39193095.gif → 1ac5798d1f0662570bb1.gif} +0 -0
- /package/assets/{568deb18c294f4b4263e.ttf → 21d7635a1fba6762771b.ttf} +0 -0
- /package/assets/{7125701998a36e6b9c92.woff → 2e42f30719ad68f3612c.woff} +0 -0
- /package/assets/{01f8e81c73fda7876a94.eot → 51e0a65ec90514e97d6d.eot} +0 -0
- /package/assets/{d8869c723b6e001b1a4a.ttf → 5774ee71ca174808db86.ttf} +0 -0
- /package/assets/{61706f659df8f59bda16.eot → 62fd63a4dc58097a693b.eot} +0 -0
- /package/assets/{6e6f08876cbb51f11af6.gif → 8409c71a94df2c6046c5.gif} +0 -0
- /package/assets/{296a93c6eed03226b370.svg → 91862453024aa6cedc5a.svg} +0 -0
- /package/assets/{8d3453b08711bd481d3d.eot → b31940e07effadbe95e5.eot} +0 -0
- /package/assets/{5e87e9d75ad0b1abdc26.svg → c6d40ded2b428c87ca5b.svg} +0 -0
- /package/assets/{924915000ccfb767d187.eot → d07b72c241feb13ac635.eot} +0 -0
- /package/assets/{bbbc509cb3213c5312d2.woff → fcc58815a70a1ea5344f.woff} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as e,__assign as t}from'./../../../ext/tslib/tslib.es6.js';import r,{useState as i,useMemo as
|
|
1
|
+
import{__rest as e,__assign as t}from'./../../../ext/tslib/tslib.es6.js';import r,{useState as i,useMemo as o,useCallback as a,Fragment as l}from"react";import{useHistory as n}from"react-router-dom";import"../../../utils/getDisplayName.js";import"../../../utils/getIntegerMask.js";import"../../../utils/isFilled.js";import"../../../utils/isNotFilled.js";import"../../../utils/isNotNilNorEmpty.js";import'./../../../ext/diacritic/diacritics.js';import{cx as d}from"../../../utils/classBinder.js";import'./../../../ext/text-mask-addons/dist/textMaskAddons.js';import{Avatar as c}from"../Avatar/Avatar.js";import{Card as s}from"../Card/Card.js";import{CardCustomTrigger as m}from"../Card/_elements_/CardCustomTrigger.js";import{DataTable as u}from"../DataTable/DataTable.js";import{DataTableItem as p}from"../DataTable/DataTableItem.js";import{Divider as C}from"../Divider/Divider.js";import{ProductHeader as b}from"../ProductHeader/ProductHeader.js";var v=function(v){var f=v.cardTestId,h=v.children,k=v.customContent,_=v.dividerTheme,E=v.headerSize,I=void 0===E?"medium":E,g=v.initialState,j=void 0!==g&&g,T=v.isCollapsible,y=void 0!==T&&T,D=v.isHeaderClickable,w=void 0!==D&&D,N=v.isInteractive,S=void 0!==N&&N,A=v.onClick,x=v.size,B=void 0===x?"large":x,z=v.tableContentAlignment,M=void 0===z?"left":z,F=v.tableDisableStackingOnMobile,H=void 0!==F&&F,O=v.tableFirstColumnSecondary,P=void 0===O||O,L=v.tableGaps,R=void 0===L?"small":L,G=v.tableIsBold,W=void 0!==G&&G,K=v.tableRows,U=v.tableTheme,q=v.tableWiderContent,J=void 0!==q&&q,Q=v.theme,V=v.withDivider,X=void 0!==V&&V,Y=e(v,["cardTestId","children","customContent","dividerTheme","headerSize","initialState","isCollapsible","isHeaderClickable","isInteractive","onClick","size","tableContentAlignment","tableDisableStackingOnMobile","tableFirstColumnSecondary","tableGaps","tableIsBold","tableRows","tableTheme","tableWiderContent","theme","withDivider"]),Z=n(),$=i(j),ee=$[0],te=$[1],re=Array.isArray(K)&&K.length>0,ie=r.Children.count(k)>0,oe=re||ie,ae=Boolean(Y.linkTo||Y.externalLink),le=Boolean(A||ae),ne=w&&le,de=Boolean(y&&S&&A&&!ne),ce=o((function(){return null!=f?f:Y.testId?"productCard-".concat(Y.testId):"productCard"}),[f,Y.testId]),se=function(){return te((function(e){return!e}))},me=Y.externalLink,ue=Y.linkTo,pe=a((function(){me?window.open(me,"_blank","noopener,noreferrer"):"function"!=typeof ue?ue&&Z.push(ue):ue()}),[me,Z,ue]),Ce=a((function(){ne&&(A?A():ae&&pe())}),[pe,ae,ne,A]),be=a((function(e){ne&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),Ce()))}),[Ce,ne]),ve=function(){y&&se(),A&&A()},fe=function(e){e.stopPropagation(),se()},he=function(){return oe?r.createElement("div",{className:"c-productCard__headerExtra"},X&&r.createElement(C,{theme:d("c-productCard__divider",_)}),re?r.createElement("div",{className:d("c-productCard__table",U)},r.createElement(u,{contentAlignment:M,disableStackingOnMobile:H,firstColumnSecondary:P,gaps:R,isBold:W,widerContent:J},K.map((function(e,t){return r.createElement(p,{key:"productCard-tableRow-".concat(t),firstColumnSecondary:e.firstColumnSecondary,isBold:e.isBold,label:e.label,perex:e.perex,testId:e.testId,theme:e.theme},e.content)})))):null,ie&&r.createElement("div",{className:"c-productCard__customContent"},k)):null},ke=function(){var e=ne?{onClick:Ce,onKeyDown:be,role:"button",tabIndex:0}:{};return r.createElement("div",t({},e,{className:d("c-productCard__headerArea",{"c-productCard__headerArea--clickable":ne,"c-productCard__headerArea--withSharedTitleLink":ne&&ae&&!A})}),r.createElement(b,t({},Y,{size:I})),he())};return y?r.createElement(s,{hasCustomTrigger:!0,isCollapsible:!0,header:r.createElement(l,null,ne?ke():r.createElement("div",{onClick:function(e){e.stopPropagation(),de?null==A||A():ve()}},r.createElement(b,t({},Y,{size:I})),he()),!ee&&r.createElement(m,null,r.createElement("div",{className:"c-productCard__collapsible--trigger",id:Y.testId?"productCard-".concat(Y.testId,"-collapsible-closed"):"productCard-collapsible-closed",onClick:fe},r.createElement(c,{iconName:"arrowDown"})))),isInteractive:S,isOpen:ee,size:B,testId:ce,theme:d("c-productCard__position",{"c-card--interactive--open":ee},Q),onClick:ne||de?void 0:ve},r.createElement("div",null,h,ee&&r.createElement(m,null,r.createElement("div",{className:"c-productCard__collapsible--trigger",id:Y.testId?"productCard-".concat(Y.testId,"-collapsible-opened"):"productCard-collapsible-opened",onClick:fe},r.createElement(c,{iconName:"arrowUp"}))))):r.createElement(s,{isInteractive:S,size:B,testId:null!=f?f:Y.testId,theme:Q,onClick:ne?void 0:ve},ke())};export{v as ProductCard};
|
|
2
2
|
//# sourceMappingURL=ProductCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCard.js","sources":["../../../../src/components/Components/ProductCard/ProductCard.tsx"],"sourcesContent":[null],"names":["ProductCard","_a","cardTestId","children","customContent","dividerTheme","_b","headerSize","
|
|
1
|
+
{"version":3,"file":"ProductCard.js","sources":["../../../../src/components/Components/ProductCard/ProductCard.tsx"],"sourcesContent":[null],"names":["ProductCard","_a","cardTestId","children","customContent","dividerTheme","_b","headerSize","_c","initialState","_d","isCollapsible","_e","isHeaderClickable","_f","isInteractive","onClick","_g","size","_h","tableContentAlignment","_j","tableDisableStackingOnMobile","_k","tableFirstColumnSecondary","_l","tableGaps","_m","tableIsBold","tableRows","tableTheme","_o","tableWiderContent","theme","_p","withDivider","productHeaderProps","__rest","history","useHistory","_q","useState","isOpen","setIsOpen","hasTable","Array","isArray","length","hasCustomContent","React","Children","count","hasExtraHeaderContent","hasTitleLink","Boolean","linkTo","externalLink","hasHeaderAction","isWholeHeaderClickable","separateHeaderAndCollapseClick","resolvedCardTestId","useMemo","testId","concat","toggleOpen","prev","executeHeaderNavigation","useCallback","window","open","push","handleWholeHeaderClick","handleWholeHeaderKeyDown","e","key","preventDefault","handleDefaultClick","handleArrowToggleClick","stopPropagation","renderExtraHeaderContent","createElement","className","Divider","cx","DataTable","contentAlignment","disableStackingOnMobile","firstColumnSecondary","gaps","isBold","widerContent","map","row","idx","DataTableItem","label","perex","content","renderHeaderArea","interactiveProps","onKeyDown","role","tabIndex","ProductHeader","__assign","Card","hasCustomTrigger","header","Fragment","CardCustomTrigger","id","Avatar","iconName","undefined"],"mappings":"y8BA2FO,IAAMA,EAAc,SAACC,GAC1B,IAAAC,EAAUD,EAAAC,WACVC,EAAQF,EAAAE,SACRC,EAAaH,EAAAG,cACbC,EAAYJ,EAAAI,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F3B,EAAA+B,cAAA,MAAA,KACG7E,EAEAuC,IACCO,EAAA+B,cAAC6B,EAAiB,KAChB5D,EACE+B,cAAA,MAAA,CAAAC,UAAU,sCACV6B,GACE1E,EAAmB0B,OACf,eAAAC,OAAe3B,EAAmB0B,OAA2B,uBAC7D,iCAEN9C,QAAS6D,IAET5B,EAAA+B,cAAC+B,EAAM,CAACC,SAAS,gBAjEzB/D,gBAACwD,EAAI,CACH1F,cAAeA,EACfG,KAAMA,EACN4C,OAAQ5D,QAAAA,EAAckC,EAAmB0B,OACzC7B,MAAOA,EACPjB,QAAU0C,QAA8CuD,EAArBrC,IAElCsB,KAiET"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { ColorType, IconNameType, Theme } from '../../../types';
|
|
3
3
|
import { AmountSizeType, AmountType, TextSizeType, TitleSize } from '../../Typography';
|
|
4
4
|
import { AvatarSizeType } from '../Avatar';
|
|
5
5
|
import { ButtonSize } from '../Button';
|
|
6
|
-
import {
|
|
6
|
+
import { CompactButtonsButtonType } from '../CompactButtons';
|
|
7
7
|
export type ProductHeaderSizeProps = 'small' | 'medium' | 'large' | 'xLarge';
|
|
8
8
|
type ProductHeaderClickableProps = {
|
|
9
9
|
/** Makes the whole header area clickable. */
|
|
@@ -26,7 +26,7 @@ type ProductHeaderBaseProps = {
|
|
|
26
26
|
*/
|
|
27
27
|
size?: ProductHeaderSizeProps;
|
|
28
28
|
/** Main title text shown in the top-left area. */
|
|
29
|
-
title
|
|
29
|
+
title: string;
|
|
30
30
|
/** Custom title content rendered in the top-left area instead of default `title`. */
|
|
31
31
|
customTitle?: ReactNode;
|
|
32
32
|
/** Title size. */
|
|
@@ -61,9 +61,9 @@ type ProductHeaderBaseProps = {
|
|
|
61
61
|
subtitleSize?: TextSizeType;
|
|
62
62
|
/** Visually hidden prefix rendered before the subtitle (for screen readers). */
|
|
63
63
|
subtitleHiddenPrefix?: ReactElement;
|
|
64
|
-
/** Main amount value shown in the top-right
|
|
64
|
+
/** Main amount value shown in the top-right cell. If amountis not defined,topRightButtons can be rendered instead. */
|
|
65
65
|
amount?: number;
|
|
66
|
-
/** Visually hidden prefix rendered before value shown in the top-right
|
|
66
|
+
/** Visually hidden prefix rendered before value shown in the top-right cell - usually the main amount (for screen readers). */
|
|
67
67
|
amountHiddenPrefix?: ReactElement;
|
|
68
68
|
/** Main amount size. */
|
|
69
69
|
amountSize?: AmountSizeType;
|
|
@@ -85,13 +85,13 @@ type ProductHeaderBaseProps = {
|
|
|
85
85
|
amountMaximumFractionDigits?: number;
|
|
86
86
|
/** Minimum fraction digits for main amount. */
|
|
87
87
|
amountMinimumFractionDigits?: number;
|
|
88
|
-
/** Buttons rendered in the top-right
|
|
88
|
+
/** Buttons rendered in the top-right cell (alternative to `amount`). This cell renders either `amount` OR `topRightButtons`, never both. */
|
|
89
89
|
topRightButtons?: ReactNode | ReactNode[];
|
|
90
|
-
/** Content rendered in the top-right
|
|
90
|
+
/** Content rendered in the top-right cell (alternative to `amount` or `topRightButtons`). This cell renders either `amount` OR `topRightButtons` OR `topRightCustomContent`. */
|
|
91
91
|
topRightCustomContent?: ReactNode;
|
|
92
|
-
/** Label rendered in the bottom-right
|
|
92
|
+
/** Label rendered in the bottom-right cell. Can be rendered alone or before secondary amount. */
|
|
93
93
|
secondaryLabel?: ReactNode;
|
|
94
|
-
/** Size of label rendered in the bottom-right
|
|
94
|
+
/** Size of label rendered in the bottom-right cell. Can be rendered alone or before secondary amount. */
|
|
95
95
|
secondaryLabelSize?: TextSizeType;
|
|
96
96
|
/** Secondary amount value rendered next to `secondaryLabel`. */
|
|
97
97
|
secondaryAmount?: number;
|
|
@@ -115,21 +115,18 @@ type ProductHeaderBaseProps = {
|
|
|
115
115
|
secondaryAmountMaximumFractionDigits?: number;
|
|
116
116
|
/** Minimum fraction digits for secondary amount. */
|
|
117
117
|
secondaryAmountMinimumFractionDigits?: number;
|
|
118
|
-
/** Buttons rendered below the header (full width). */
|
|
118
|
+
/** Buttons rendered below the header grid (full width). */
|
|
119
119
|
actions?: CompactButtonsButtonType[];
|
|
120
|
-
/** Size of buttons rendered below the header (full width). */
|
|
120
|
+
/** Size of buttons rendered below the header grid (full width). */
|
|
121
121
|
actionsSize?: ButtonSize;
|
|
122
|
-
|
|
123
|
-
/** Content rendered below the header (full width). Can contain any ReactNode, e.g. buttons, additional information, or custom components. */
|
|
122
|
+
/** Content rendered below the header grid (full width). Can contain any ReactNode, e.g. buttons, additional information, or custom components. */
|
|
124
123
|
belowHeaderContent?: ReactNode;
|
|
125
124
|
/** Locale for number formatting (e.g. 'cs-CZ', 'en-US'). Affects both main and secondary amounts. */
|
|
126
125
|
locale?: string;
|
|
127
126
|
/** Test ID for testing purposes. */
|
|
128
127
|
testId?: string;
|
|
129
|
-
/** Additional CSS class applied to the ProductHeader root element. */
|
|
130
|
-
theme?: string;
|
|
131
128
|
};
|
|
132
129
|
export type ProductHeaderPropTypes = ProductHeaderBaseProps & ProductHeaderInteractionProps;
|
|
133
|
-
export declare const ProductHeader: ({ actions,
|
|
130
|
+
export declare const ProductHeader: ({ actions, actionsSize, amount, amountHiddenPrefix, amountHideIcon, amountIsBold, amountIsInline, amountMaximumFractionDigits, amountMinimumFractionDigits, amountSize, amountType, amountUnitAfter, amountUnitBefore, amountUnitTheme, belowHeaderContent, customSubtitle, customTitle, externalLink, isHeaderClickable, linkTo, locale, onHeaderClick, secondaryAmount, secondaryAmountHideIcon, secondaryAmountIsBold, secondaryAmountIsInline, secondaryAmountMaximumFractionDigits, secondaryAmountMinimumFractionDigits, secondaryAmountSize, secondaryAmountType, secondaryAmountUnitAfter, secondaryAmountUnitBefore, secondaryAmountUnitTheme, secondaryLabel, secondaryLabelSize, size, subtitle, subtitleHiddenPrefix, subtitleSize, testId, title, titleHiddenPrefix, titleIconBackgroundColor, titleIconBackgroundCustom, titleIconColor, titleIconName, titleIconSize, titleIconText, titleSize, titleVisual, titleWithoutMargin, topRightButtons, topRightCustomContent }: ProductHeaderPropTypes) => React.JSX.Element;
|
|
134
131
|
export {};
|
|
135
132
|
//# sourceMappingURL=ProductHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/Components/ProductHeader/ProductHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"ProductHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/Components/ProductHeader/ProductHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAA;AAGnF,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAG/D,OAAO,EAAU,cAAc,EAAE,UAAU,EAAQ,YAAY,EAAS,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC3G,OAAO,EAAU,cAAc,EAAE,MAAM,WAAW,CAAA;AAClD,OAAO,EAAgB,UAAU,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,EAAkB,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAG5E,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAA;AAE5E,KAAK,2BAA2B,GAAG;IACjC,6CAA6C;IAC7C,iBAAiB,EAAE,IAAI,CAAA;IACvB,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;CAC3B,CAAA;AAED,KAAK,yBAAyB,GAAG;IAC/B,6CAA6C;IAC7C,iBAAiB,CAAC,EAAE,KAAK,CAAA;IACzB,kDAAkD;IAClD,aAAa,CAAC,EAAE,KAAK,CAAA;CACtB,CAAA;AAED,KAAK,6BAA6B,GAAG,2BAA2B,GAAG,yBAAyB,CAAA;AAqD5F,KAAK,sBAAsB,GAAG;IAC5B;;;;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AAO,CAAC,EAAE,wBAAwB,EAAE,CAAA;IACpC,mEAAmE;IACnE,WAAW,CAAC,EAAE,UAAU,CAAA;IACxB,kJAAkJ;IAClJ,kBAAkB,CAAC,EAAE,SAAS,CAAA;IAI9B,qGAAqG;IACrG,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,sBAAsB,GAAG,6BAA6B,CAAA;AAE3F,eAAO,MAAM,aAAa,67BAuDvB,sBAAsB,sBAwSxB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from'./../../../ext/tslib/tslib.es6.js';import t,{useCallback as o}from"react";import{useHistory as
|
|
1
|
+
import{__assign as e}from'./../../../ext/tslib/tslib.es6.js';import t,{useCallback as o}from"react";import{useHistory as i}from"react-router-dom";import"../../../utils/getDisplayName.js";import"../../../utils/getIntegerMask.js";import"../../../utils/isFilled.js";import"../../../utils/isNotFilled.js";import"../../../utils/isNotNilNorEmpty.js";import'./../../../ext/diacritic/diacritics.js';import{cx as n}from"../../../utils/classBinder.js";import'./../../../ext/text-mask-addons/dist/textMaskAddons.js';import{Flex as r}from"../../Layout/Flex/Flex.js";import"../Button/Button.js";import{ButtonsGroup as a}from"../Button/ButtonsGroup.js";import"../../../contexts/MobilePanelContext.js";import'./../../../ext/cuid/index.js';import{Amount as l}from"../../Typography/Amount/Amount.js";import{Text as s}from"../../Typography/Text/Text.js";import{Title as m}from"../../Typography/Title/Title.js";import{Avatar as c}from"../Avatar/Avatar.js";import"../ButtonTooltip/ButtonTooltip.js";import"../../../contexts/CardContext.js";import"../../../contexts/FormGroupContext.js";import"../../../contexts/ModalContext.js";import"../../../contexts/Select2Context.js";import"../../../contexts/TabsContext.js";import"react-slick";import"../Collapse/Collapse.js";import{CompactButtons as d}from"../CompactButtons/CompactButtons.js";import"../../../contexts/ContentTableContext.js";import"../ContentTable/ContentTableRow.js";import"../DataTable/DataTable.js";import'./../../../ext/lodash/_baseToString.js';import'./../../../ext/react-text-mask/dist/reactTextMask.js';import"../Dropdown/_elements_/DropdownDivider.js";import"../Dropdown/_elements_/DropdownItem.js";import"../Dropdown/_elements_/DropdownMenu.js";import"../Dropdown/_elements_/DropdownInfoText.js";import"../Dropdown/_elements_/DropdownLoading.js";import{Link as u}from"../Link/Link.js";import"react-dom";import"../SuperModal/SuperModal.context.js";import"../../Form/Autocomplete/Autocomplete.js";import'./../../../ext/react-device-detect/dist/lib.js';import"../../Form/FileUpload/_parts_/MergeImageCards.js";import'./../../../ext/jspdf/dist/jspdf.es.min.js';import'./../../../ext/@bugsnag/cuid/index.esm.js';import"../../Form/Select/_elements_/Select2CategorisedOptions.js";import"../../Form/Select/_elements_/Select2Options.js";import"../../Form/Slider/Slider.js";var p=function(p){var _=p.actions,g=p.actionsSize,y=p.amount,b=p.amountHiddenPrefix,f=p.amountHideIcon,j=void 0!==f&&f,x=p.amountIsBold,H=void 0===x||x,S=p.amountIsInline,v=p.amountMaximumFractionDigits,z=void 0===v?2:v,h=p.amountMinimumFractionDigits,C=void 0===h?2:h,I=p.amountSize,k=p.amountType,E=p.amountUnitAfter,T=p.amountUnitBefore,A=p.amountUnitTheme,D=p.belowHeaderContent,L=p.customSubtitle,B=p.customTitle,N=p.externalLink,F=p.isHeaderClickable,w=void 0!==F&&F,M=p.linkTo,U=p.locale,V=p.onHeaderClick,P=p.secondaryAmount,W=p.secondaryAmountHideIcon,O=void 0!==W&&W,R=p.secondaryAmountIsBold,G=p.secondaryAmountIsInline,K=p.secondaryAmountMaximumFractionDigits,q=void 0===K?2:K,J=p.secondaryAmountMinimumFractionDigits,Q=void 0===J?2:J,X=p.secondaryAmountSize,Y=p.secondaryAmountType,Z=p.secondaryAmountUnitAfter,$=p.secondaryAmountUnitBefore,ee=p.secondaryAmountUnitTheme,te=p.secondaryLabel,oe=p.secondaryLabelSize,ie=p.size,ne=void 0===ie?"medium":ie,re=p.subtitle,ae=p.subtitleHiddenPrefix,le=p.subtitleSize,se=p.testId,me=p.title,ce=p.titleHiddenPrefix,de=p.titleIconBackgroundColor,ue=void 0===de?"bgBrandDefault":de,pe=p.titleIconBackgroundCustom,_e=p.titleIconColor,ge=p.titleIconName,ye=p.titleIconSize,be=p.titleIconText,fe=p.titleSize,je=void 0===fe?"h2":fe,xe=p.titleVisual,He=p.titleWithoutMargin,Se=void 0===He||He,ve=p.topRightButtons,ze=p.topRightCustomContent,he=i(),Ce=function(e){switch(e){case"small":return{amountSize:"small",secondaryAmountSize:"xSmall",titleIconSize:"medium",actionsSize:"small"};case"medium":default:return{titleVisual:"h5",subtitleSize:"small",amountSize:"large",secondaryAmountSize:"small",titleIconSize:"medium",actionsSize:"small",secondaryLabelSize:"small"};case"large":return{titleVisual:"h4",subtitleSize:"small",amountSize:"xLarge",secondaryAmountSize:"small",titleIconSize:"large",secondaryLabelSize:"small"};case"xLarge":return{titleVisual:"h3",amountSize:"xLarge",titleIconSize:"xLarge"}}}(ne),Ie=null!=xe?xe:Ce.titleVisual,ke=null!=le?le:Ce.subtitleSize,Ee=null!=oe?oe:Ce.secondaryLabelSize,Te=null!=I?I:Ce.amountSize,Ae=null!=X?X:Ce.secondaryAmountSize,De=null!=ye?ye:Ce.titleIconSize,Le=null!=g?g:Ce.actionsSize,Be="small"===ne&&!I,Ne="small"===ne&&!X,Fe="xLarge"===ne&&!X,we=B||me,Me=!!L||"string"==typeof re,Ue=!!ge||!!be,Ve=t.Children.count(ze)>0,Pe=t.Children.count(ve)>0,We=Ve,Oe=!We&&Pe,Re=!We&&!Oe&&"number"==typeof y,Ge=We||Oe||Re,Ke=!!te||"number"==typeof P,qe=!!(null==_?void 0:_.length),Je=t.Children.count(D)>0,Qe=!(Ue||Me||Ge||Ke||qe||Je),Xe=Boolean(M||N),Ye=Boolean(V||Xe),Ze=w&&Ye,$e=o((function(){"function"!=typeof M?M&&he.push(M):M()}),[he,M]),et=o((function(){N&&window.open(N,"_blank","noopener,noreferrer")}),[N]),tt=o((function(){N?et():M&&$e()}),[et,$e,N,M]),ot=o((function(e){"preventDefault"in e&&e.preventDefault(),$e()}),[$e]),it=o((function(){Ze&&(V?V():Xe&&tt())}),[tt,Xe,Ze,V]),nt=o((function(e){Ze&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),it()))}),[it,Ze]),rt=function(){return M||N?t.createElement(u,{allowEventPropagation:!1,ariaLabel:me,"data-testid":se?"productHeader-link-".concat(se):void 0,linkUrl:N||("string"==typeof M?M:"#"),target:N?"_blank":void 0,theme:"c-productHeader__titleLink",onClick:N?void 0:ot},t.createElement(m,{isWithoutMargin:Se,size:je,theme:n("c-productHeader__title",{"c-productHeader__title--customVisual":!!xe}),visual:Ie},ce&&t.createElement("span",{className:"u-vHide"},ce),we)):t.createElement(m,{isWithoutMargin:Se,size:je,theme:n("c-productHeader__title",{"c-productHeader__title--customVisual":!!xe}),visual:Ie},ce&&t.createElement("span",{className:"u-vHide"},ce),we)},at=Ze?{onClick:it,onKeyDown:nt,role:"button",tabIndex:0}:{};return Qe?t.createElement("div",e({},at,{className:n("c-productHeader c-productHeader--titleOnly",{"c-productHeader--headerClickable":Ze,"c-productHeader--headerClickableWithTitleLink":Ze&&Xe}),"data-testid":se}),rt()):t.createElement("div",e({},at,{className:n("c-productHeader",{"c-productHeader--withTitleIcon":Ue,"c-productHeader--small":"small"===ne,"c-productHeader--xLarge":"xLarge"===ne,"c-productHeader--headerClickable":Ze,"c-productHeader--headerClickableWithTitleLink":Ze&&Xe}),"data-testid":se}),t.createElement("div",{className:"c-productHeader__grid"},Ue?t.createElement("div",{className:"c-productHeader__gridIcon"},t.createElement(c,{backgroundColor:ue,backgroundCustom:pe,color:_e,iconName:ge,size:De,text:be})):null,t.createElement("div",{className:"c-productHeader__gridTitle"},rt()),t.createElement("div",{className:"c-productHeader__gridSubtitle"},Me?L?t.createElement(t.Fragment,null,ae&&t.createElement("span",{className:"u-vHide"},ae),L):t.createElement(s,{size:ke,theme:n("c-productHeader__subtitle",{"c-productHeader__subtitle--customSize":!!le}),type:"secondary"},ae&&t.createElement("span",{className:"u-vHide"},ae),re):null),Ge?t.createElement("div",{className:"c-productHeader__gridAmount"},We?ze:null,Oe?t.createElement(a,null,ve):null,Re?t.createElement(t.Fragment,null,b&&t.createElement("span",{className:"u-vHide"},b),t.createElement(l,{amount:y,hideIcon:j,isBold:H,isInline:S,locale:U,maximumFractionDigits:z,minimumFractionDigits:C,size:Te,theme:n("c-productHeader__amount",{"c-productHeader__amount--small":Be}),type:k,unitAfter:E,unitBefore:T,unitTheme:A})):null):null,Ke?t.createElement("div",{className:"c-productHeader__gridSecondary"},te?t.createElement(r,{alignItems:"baseline",direction:"row",justifyContent:"end",theme:"c-productHeader__secondary"},t.createElement(s,{component:"span",size:Ee,theme:n("c-productHeader__secondaryLabel",{"c-productHeader__secondaryLabel--customSize":!!oe})},te),"number"==typeof P?t.createElement(l,{amount:P,hideIcon:O,isBold:R,isInline:G,locale:U,maximumFractionDigits:q,minimumFractionDigits:Q,size:Ae,theme:n("c-productHeader__amount",{"c-productHeader__amount--small":Ne,"c-productHeader__secondaryAmount--xLarge":Fe}),type:Y,unitAfter:Z,unitBefore:$,unitTheme:n(ee,{"c-productHeader__secondaryAmount--xLarge":Fe})}):null):null):null),qe?t.createElement("div",{className:"c-productHeader__actions"},t.createElement(d,{buttons:_,size:Le})):null,Je?t.createElement("div",{className:"c-productHeader__below"},D):null)};export{p as ProductHeader};
|
|
2
2
|
//# sourceMappingURL=ProductHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductHeader.js","sources":["../../../../src/components/Components/ProductHeader/ProductHeader.tsx"],"sourcesContent":[null],"names":["ProductHeader","_a","actions","
|
|
1
|
+
{"version":3,"file":"ProductHeader.js","sources":["../../../../src/components/Components/ProductHeader/ProductHeader.tsx"],"sourcesContent":[null],"names":["ProductHeader","_a","actions","actionsSize","amount","amountHiddenPrefix","_b","amountHideIcon","_c","amountIsBold","amountIsInline","_d","amountMaximumFractionDigits","_e","amountMinimumFractionDigits","amountSize","amountType","amountUnitAfter","amountUnitBefore","amountUnitTheme","belowHeaderContent","customSubtitle","customTitle","externalLink","_f","isHeaderClickable","linkTo","locale","onHeaderClick","secondaryAmount","_g","secondaryAmountHideIcon","secondaryAmountIsBold","secondaryAmountIsInline","_h","secondaryAmountMaximumFractionDigits","_j","secondaryAmountMinimumFractionDigits","secondaryAmountSize","secondaryAmountType","secondaryAmountUnitAfter","secondaryAmountUnitBefore","secondaryAmountUnitTheme","secondaryLabel","secondaryLabelSize","_k","size","subtitle","subtitleHiddenPrefix","subtitleSize","testId","title","titleHiddenPrefix","_l","titleIconBackgroundColor","titleIconBackgroundCustom","titleIconColor","titleIconName","titleIconSize","titleIconText","_m","titleSize","titleVisual","_o","titleWithoutMargin","topRightButtons","topRightCustomContent","history","useHistory","defaultSizes","getDefaultSizesByHeaderSize","resolvedTitleVisual","resolvedSubtitleSize","resolvedSecondaryLabelSize","resolvedAmountSize","resolvedSecondaryAmountSize","resolvedTitleIconSize","resolvedActionsSize","shouldUseSmallAmountTheme","shouldUseSmallSecondaryAmountTheme","shouldUseXLargeSecondaryAmountTheme","titleContent","hasSubtitle","hasIcon","hasTopRightCustomContent","React","Children","count","hasTopRightButtons","showTopRightCustomContent","showTopRightButtons","showAmount","hasTopRight","hasBottomRight","hasActions","length","hasBelowHeaderContent","isTitleOnly","hasTitleLink","Boolean","hasHeaderAction","isWholeHeaderClickable","executeInternalNavigation","useCallback","push","executeExternalNavigation","window","open","executeHeaderLinkAction","onInternalTitleClick","e","preventDefault","handleWholeHeaderClick","handleWholeHeaderKeyDown","key","renderTitle","createElement","Link","allowEventPropagation","ariaLabel","concat","undefined","linkUrl","target","theme","onClick","Title","isWithoutMargin","cx","visual","className","wrapperInteractiveProps","onKeyDown","role","tabIndex","Avatar","backgroundColor","backgroundCustom","color","iconName","text","Fragment","Text","type","ButtonsGroup","Amount","hideIcon","isBold","isInline","maximumFractionDigits","minimumFractionDigits","unitAfter","unitBefore","unitTheme","Flex","alignItems","direction","justifyContent","component","CompactButtons","buttons"],"mappings":"s0EAyCA,IA6KaA,EAAgB,SAACC,OAC5BC,EAAOD,EAAAC,QAEPC,EAAWF,EAAAE,YACXC,EAAMH,EAAAG,OACNC,EAAkBJ,EAAAI,mBAClBC,mBAAAC,cAAsBD,EACtBE,EAAmBP,EAAAQ,aAAnBA,OAAY,IAAAD,GAAOA,EACnBE,EAAcT,EAAAS,eACdC,EAA+BV,EAAAW,4BAA/BA,OAA8B,IAAAD,EAAA,EAACA,EAC/BE,EAA+BZ,EAAAa,4BAA/BA,OAA8B,IAAAD,EAAA,IAC9BE,eACAC,EAAUf,EAAAe,WACVC,EAAehB,EAAAgB,gBACfC,EAAgBjB,EAAAiB,iBAChBC,EAAelB,EAAAkB,gBACfC,EAAkBnB,EAAAmB,mBAClBC,EAAcpB,EAAAoB,eACdC,EAAWrB,EAAAqB,YACXC,EAAYtB,EAAAsB,aACZC,sBAAAC,OAAoB,IAAAD,GAAKA,EACzBE,EAAMzB,EAAAyB,OACNC,EAAM1B,EAAA0B,OACNC,EAAa3B,EAAA2B,cACbC,EAAe5B,EAAA4B,gBACfC,EAAA7B,EAAA8B,wBAAAA,OAAuB,IAAAD,GAAQA,EAC/BE,EAAqB/B,EAAA+B,sBACrBC,EAAuBhC,EAAAgC,wBACvBC,EAAAjC,EAAAkC,qCAAAA,OAAoC,IAAAD,EAAG,EAACA,EACxCE,yCAAAC,OAAuC,IAAAD,EAAA,EAACA,EACxCE,EAAmBrC,EAAAqC,oBACnBC,EAAmBtC,EAAAsC,oBACnBC,EAAwBvC,EAAAuC,yBACxBC,EAAyBxC,EAAAwC,0BACzBC,8BACAC,oBACAC,wBACAC,GAAA5C,EAAA6C,KAAAA,QAAO,IAAAD,GAAA,YACPE,cACAC,0BACAC,GAAYhD,EAAAgD,aACZC,GAAMjD,EAAAiD,OACNC,GAAKlD,EAAAkD,MACLC,GA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6B,GACNiD,MAAOI,EAAG,0BAA2B,CACnC,iCAAkCjD,GAClC,2CAA4CC,KAE9C+D,KAAMxG,EACNgH,UAAW/G,EACXgH,WAAY/G,EACZgH,UAAWzB,EAAGtF,GAA0B,CACtC,2CAA4CsC,OAG9C,MAEJ,MAEJ,MAGLc,GACCT,EAAK+B,cAAA,MAAA,CAAAc,UAAU,4BACb7C,EAAA+B,cAAC2C,EAAc,CAACC,QAAS9J,EAAS4C,KAAM+B,MAExC,KAEHmB,GAAwBX,EAAK+B,cAAA,MAAA,CAAAc,UAAU,0BAA0B9G,GAA4B,KAGpG"}
|
|
@@ -46,6 +46,18 @@ export interface FileUploadPropsType extends ComponentPropsType {
|
|
|
46
46
|
description: string;
|
|
47
47
|
add: string;
|
|
48
48
|
submit: string;
|
|
49
|
+
confirmDialog: {
|
|
50
|
+
checkFileTitle: string;
|
|
51
|
+
checkFileDescription: string;
|
|
52
|
+
checkFilePreview: string;
|
|
53
|
+
renameFileTitle: string;
|
|
54
|
+
back: string;
|
|
55
|
+
submit: string;
|
|
56
|
+
};
|
|
57
|
+
waitingDialog: {
|
|
58
|
+
title: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
49
61
|
};
|
|
50
62
|
};
|
|
51
63
|
/** Minimum file size (in bytes) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FileUpload/FileUpload.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAY,SAAS,
|
|
1
|
+
{"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FileUpload/FileUpload.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAY,SAAS,EAAa,MAAM,OAAO,CAAA;AAG7D,OAAO,EAAE,kBAAkB,EAAM,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAU,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAExD,OAAO,E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CAAC,2BAA2B,CAAC,CAAC,CAAA;IACnF,UAAU,CAAC,EAAE,aAAa,CAAA;IAC1B,eAAe,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAA;IACjC,kBAAkB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAA;IAC1E,mFAAmF;IACnF,cAAc,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAA;IACpD,sEAAsE;IACtE,eAAe,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAA;IACtD,+CAA+C;IAC/C,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,gBAAgB;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,6BAA6B;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,6CAA6C;IAC7C,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,yBAAyB;IACzB,MAAM,CAAC,EAAE,SAAS,EAAE,CAAA;IAEpB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,UAAU,8ZA+BpB,mBAAmB,KAAG,WA8LxB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as t,__awaiter as o,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import r from'./../../../ext/cuid/index.js';import n,{useEffect as l,Fragment as s}from"react";import{useDropzone as a}from'./../../../ext/react-dropzone/dist/es/index.js';import"../../../utils/getDisplayName.js";import"../../../utils/getIntegerMask.js";import"../../../utils/isFilled.js";import"../../../utils/isNotFilled.js";import"../../../utils/isNotNilNorEmpty.js";import'./../../../ext/diacritic/diacritics.js';import{cx as m}from"../../../utils/classBinder.js";import'./../../../ext/text-mask-addons/dist/textMaskAddons.js';import{matchMimeType as d}from"../../../utils/mimeType.js";import"../../Typography/Amount/Amount.js";import"../../Components/Button/Button.js";import{Avatar as p}from"../../Components/Avatar/Avatar.js";import"../../Components/ButtonTooltip/ButtonTooltip.js";import"../../../contexts/CardContext.js";import"../../../contexts/FormGroupContext.js";import"../../../contexts/ModalContext.js";import"../../../contexts/Select2Context.js";import"../../../contexts/TabsContext.js";import"react-slick";import"../../Components/Collapse/Collapse.js";import'./../../../ext/lodash/_baseToString.js';import'./../../../ext/react-text-mask/dist/reactTextMask.js';import{FormGroup2 as c}from"../FormGroup2/FormGroup2.js";import"../../Components/Dropdown/_elements_/DropdownDivider.js";import"../../Components/Dropdown/_elements_/DropdownItem.js";import"../../Components/Dropdown/_elements_/DropdownMenu.js";import"../../Components/Dropdown/_elements_/DropdownInfoText.js";import"../../Components/Dropdown/_elements_/DropdownLoading.js";import"../../../contexts/ContentTableContext.js";import"../../Components/ContentTable/ContentTableRow.js";import"../../Components/DataTable/DataTable.js";import{Link as u}from"../../Components/Link/Link.js";import"react-dom";import"react-router-dom";import"../../../contexts/MobilePanelContext.js";import"../../Components/SuperModal/SuperModal.context.js";import"../Autocomplete/Autocomplete.js";import'./../../../ext/react-device-detect/dist/lib.js';import{FileList as f}from"./_parts_/FileList.js";import g from"./_parts_/MergeDialog.js";import"../Select/_elements_/Select2CategorisedOptions.js";import"../Select/_elements_/Select2Options.js";import"../Slider/Slider.js";var v=function(v){var j=v.accept,_=v.enableMerge,D=void 0!==_&&_,h=v.label,C=v.labelTooltip,x=v.disableRemovalOfUploaded,b=v.fileLimit,F=void 0===b?1:b,w=v.files,T=v.filesToMerge,M=v.hideImagePreview,S=void 0!==M&&M,E=v.hideTitle,y=void 0!==E&&E,U=v.maxSizeBytes,k=v.messages,A=v.minSizeBytes,B=v.onDelete,N=v.onError,P=v.onSelectFile,L=v.onShow,R=v.selectMultiple,z=void 0!==R&&R,I=v.setFiles,O=v.setFilesToMerge,G=v.mergeModal,H=v.mergeDisplay,K=v.setMergeDisplay,Z=v.mergeFileDetail,q=v.setMergeFileDetail,J=v.theme,Q=v.uploadProgress,V=v.uploadedFiles,W=v.withProgressBar,X=void 0!==W&&W,Y=v.isFormGroupDisabled,$=void 0!==Y&&Y,ee={label:h,labelTooltip:C,theme:J},te=D&&!!G&&!!O&&!!H&&!!T&&!!K,oe=function(e,t){return{id:r(),src:e,name:t.name,info:t}},ie=a({getFilesFromEvent:function(e){return function(e){return o(this,void 0,void 0,(function(){var t,o,r,n,l,s;return i(this,(function(i){for(t=[],o=!1,r=e.dataTransfer?e.dataTransfer.files:e.target.files,n=0;n<r.length;n++)l=r.item(n),s=w.filter((function(e){return void 0===e.errors})),F>s.length+n?t.push(l):o=!0;return o&&N&&N([{code:"too-many-files",message:"Uploaded more files than fileLimit"}]),[2,t]}))}))}(e)},onDropRejected:function(e){e.map((function(e){if(z||1!==F){var o={id:r(),name:e.file.name,errors:e.errors};I((function(e){return t(t([],e,!0),[o],!1)}))}else N&&N(e.errors)}))},onDropAccepted:function(e){return o(void 0,void 0,void 0,(function(){var o,r;return i(this,(function(i){return o=te?e.filter((function(e){return d(e.type,["image/*"])})):[],r=te?e.filter((function(e){return!d(e.type,["image/*"])})):e,te&&o.length>0&&o.forEach((function(e){var o=new FileReader;o.onload=function(o){var i,r=oe(null===(i=o.target)||void 0===i?void 0:i.result,e);O((function(e){return t(t([],e,!0),[r],!1)}))},o.readAsDataURL(e)})),r.length>0&&r.forEach((function(e){var o=new FileReader;o.onload=function(o){var i,r=oe(null===(i=o.target)||void 0===i?void 0:i.result,e);I((function(e){return t(t([],e,!0),[r],!1)})),P&&P(r)},o.readAsDataURL(e)})),[2]}))}))},accept:j,maxSize:U,minSize:A,multiple:z,noClick:!0,noKeyboard:!0}),re=ie.getInputProps,ne=ie.getRootProps,le=ie.isDragActive,se=ie.open;l((function(){T&&(null==T?void 0:T.length)>0&&G&&G.show()}),[T,G]);var ae=m("f-fileUpload",{"f-fileUpload--active":le},J),me=Q&&0!==Object.keys(Q).length&&Object.keys(Q).find((function(e){return void 0!==Q[e]})),de=$?n.Fragment:c,pe=$?{}:ee;return n.createElement(de,e({},pe),te&&n.createElement(G.Modal,e({},G.modalProps,{size:"large"}),n.createElement(g,{messages:k.mergeDialog,display:H,onDisplay:K,files:T,fileDetail:Z,onFileDetail:q,onAddFiles:se,onUpdate:O,onSubmit:function(e){var o=oe(e.name,e);I((function(e){return t(t([],e,!0),[o],!1)})),G&&G.hide()}})),n.createElement("div",e({},ne(),{className:ae}),(X&&me||z||1!==w.length)&&n.createElement(s,null,n.createElement("input",e({},re())),n.createElement("div",{className:m("f-fileUpload__dropZone")},n.createElement(p,{backgroundColor:"bgBrandDefault",color:"fgBrandDefault",iconName:me?"loading":"upload",size:"xLarge",theme:"f-fileUpload__uploadIcon"}),le?n.createElement("div",{className:m("f-fileUpload__title")},k.dragHere):y?null:n.createElement("div",{className:m("f-fileUpload__title")},k.move,n.createElement(u,{isSmall:!0,theme:"f-fileUpload__titleButton",onClick:se},0===(null==w?void 0:w.length)?k.select:k.selectMore),n.createElement("div",{className:m("f-fileUpload__restrictions")},k.restriction)))),w.length>0&&n.createElement(f,{disableRemovalOfUploaded:x,files:w,handleOnDelete:function(e){B&&B(e),I((function(t){return t.filter((function(t){return t.id!==e}))}))},hideImagePreview:S,messages:k,selectMultiple:z,uploadProgress:Q,uploadedFiles:V,withProgressBar:X,onShow:L})))};export{v as FileUpload};
|
|
1
|
+
import{__assign as e,__spreadArray as t,__awaiter as o,__generator as i}from'./../../../ext/tslib/tslib.es6.js';import r from'./../../../ext/cuid/index.js';import n,{useEffect as l,Fragment as s}from"react";import{useDropzone as a}from'./../../../ext/react-dropzone/dist/es/index.js';import"../../../utils/getDisplayName.js";import"../../../utils/getIntegerMask.js";import"../../../utils/isFilled.js";import"../../../utils/isNotFilled.js";import"../../../utils/isNotNilNorEmpty.js";import'./../../../ext/diacritic/diacritics.js';import{cx as m}from"../../../utils/classBinder.js";import'./../../../ext/text-mask-addons/dist/textMaskAddons.js';import{matchMimeType as d}from"../../../utils/mimeType.js";import"../../Typography/Amount/Amount.js";import"../../Components/Button/Button.js";import{Avatar as p}from"../../Components/Avatar/Avatar.js";import"../../Components/ButtonTooltip/ButtonTooltip.js";import"../../../contexts/CardContext.js";import"../../../contexts/FormGroupContext.js";import"../../../contexts/ModalContext.js";import"../../../contexts/Select2Context.js";import"../../../contexts/TabsContext.js";import"react-slick";import"../../Components/Collapse/Collapse.js";import'./../../../ext/lodash/_baseToString.js';import'./../../../ext/react-text-mask/dist/reactTextMask.js';import{FormGroup2 as c}from"../FormGroup2/FormGroup2.js";import"../../Components/Dropdown/_elements_/DropdownDivider.js";import"../../Components/Dropdown/_elements_/DropdownItem.js";import"../../Components/Dropdown/_elements_/DropdownMenu.js";import"../../Components/Dropdown/_elements_/DropdownInfoText.js";import"../../Components/Dropdown/_elements_/DropdownLoading.js";import"../../../contexts/ContentTableContext.js";import"../../Components/ContentTable/ContentTableRow.js";import"../../Components/DataTable/DataTable.js";import{Link as u}from"../../Components/Link/Link.js";import"react-dom";import"react-router-dom";import"../../../contexts/MobilePanelContext.js";import"../../Components/SuperModal/SuperModal.context.js";import"../Autocomplete/Autocomplete.js";import'./../../../ext/react-device-detect/dist/lib.js';import{FileList as f}from"./_parts_/FileList.js";import g from"./_parts_/MergeDialog.js";import"../Select/_elements_/Select2CategorisedOptions.js";import"../Select/_elements_/Select2Options.js";import"../Slider/Slider.js";var v=function(v){var j=v.accept,_=v.enableMerge,D=void 0!==_&&_,h=v.label,C=v.labelTooltip,x=v.disableRemovalOfUploaded,b=v.fileLimit,F=void 0===b?1:b,w=v.files,T=v.filesToMerge,M=v.hideImagePreview,S=void 0!==M&&M,E=v.hideTitle,y=void 0!==E&&E,U=v.maxSizeBytes,k=v.messages,A=v.minSizeBytes,B=v.onDelete,N=v.onError,P=v.onSelectFile,L=v.onShow,R=v.selectMultiple,z=void 0!==R&&R,I=v.setFiles,O=v.setFilesToMerge,G=v.mergeModal,H=v.mergeDisplay,K=v.setMergeDisplay,Z=v.mergeFileDetail,q=v.setMergeFileDetail,J=v.theme,Q=v.uploadProgress,V=v.uploadedFiles,W=v.withProgressBar,X=void 0!==W&&W,Y=v.isFormGroupDisabled,$=void 0!==Y&&Y,ee={label:h,labelTooltip:C,theme:J},te=D&&!!G&&!!O&&!!H&&!!T&&!!K,oe=function(e,t){return{id:r(),src:e,name:t.name,info:t}},ie=a({getFilesFromEvent:function(e){return function(e){return o(this,void 0,void 0,(function(){var t,o,r,n,l,s;return i(this,(function(i){for(t=[],o=!1,r=e.dataTransfer?e.dataTransfer.files:e.target.files,n=0;n<r.length;n++)l=r.item(n),s=w.filter((function(e){return void 0===e.errors})),F>s.length+n?t.push(l):o=!0;return o&&N&&N([{code:"too-many-files",message:"Uploaded more files than fileLimit"}]),[2,t]}))}))}(e)},onDropRejected:function(e){e.map((function(e){if(z||1!==F){var o={id:r(),name:e.file.name,errors:e.errors};I((function(e){return t(t([],e,!0),[o],!1)}))}else N&&N(e.errors)}))},onDropAccepted:function(e){return o(void 0,void 0,void 0,(function(){var o,r;return i(this,(function(i){return o=te?e.filter((function(e){return d(e.type,["image/*"])})):[],r=te?e.filter((function(e){return!d(e.type,["image/*"])})):e,te&&o.length>0&&o.forEach((function(e){var o=new FileReader;o.onload=function(o){var i,r=oe(null===(i=o.target)||void 0===i?void 0:i.result,e);O((function(e){return t(t([],e,!0),[r],!1)}))},o.readAsDataURL(e)})),r.length>0&&r.forEach((function(e){var o=new FileReader;o.onload=function(o){var i,r=oe(null===(i=o.target)||void 0===i?void 0:i.result,e);I((function(e){return t(t([],e,!0),[r],!1)})),console.log("newFile",r),P&&P(r)},o.readAsDataURL(e)})),[2]}))}))},accept:j,maxSize:U,minSize:A,multiple:z,noClick:!0,noKeyboard:!0}),re=ie.getInputProps,ne=ie.getRootProps,le=ie.isDragActive,se=ie.open;l((function(){T&&(null==T?void 0:T.length)>0&&G&&G.show()}),[T,G]);var ae=m("f-fileUpload",{"f-fileUpload--active":le},J),me=Q&&0!==Object.keys(Q).length&&Object.keys(Q).find((function(e){return void 0!==Q[e]})),de=$?n.Fragment:c,pe=$?{}:ee;return n.createElement(de,e({},pe),te&&n.createElement(G.Modal,e({},G.modalProps,{size:"large"}),n.createElement(g,{messages:k.mergeDialog,display:H,onDisplay:K,files:T,fileDetail:Z,onFileDetail:q,onAddFiles:se,onUpdate:O,onSubmit:function(e){var o=oe(e.name,e);I((function(e){return t(t([],e,!0),[o],!1)})),P&&P(o),G&&G.hide()}})),n.createElement("div",e({},ne(),{className:ae}),(X&&me||z||1!==w.length)&&n.createElement(s,null,n.createElement("input",e({},re())),n.createElement("div",{className:m("f-fileUpload__dropZone")},n.createElement(p,{backgroundColor:"bgBrandDefault",color:"fgBrandDefault",iconName:me?"loading":"upload",size:"xLarge",theme:"f-fileUpload__uploadIcon"}),le?n.createElement("div",{className:m("f-fileUpload__title")},k.dragHere):y?null:n.createElement("div",{className:m("f-fileUpload__title")},k.move,n.createElement(u,{isSmall:!0,theme:"f-fileUpload__titleButton",onClick:se},0===(null==w?void 0:w.length)?k.select:k.selectMore),n.createElement("div",{className:m("f-fileUpload__restrictions")},k.restriction)))),w.length>0&&n.createElement(f,{disableRemovalOfUploaded:x,files:w,handleOnDelete:function(e){B&&B(e),I((function(t){return t.filter((function(t){return t.id!==e}))}))},hideImagePreview:S,messages:k,selectMultiple:z,uploadProgress:Q,uploadedFiles:V,withProgressBar:X,onShow:L})))};export{v as FileUpload};
|
|
2
2
|
//# sourceMappingURL=FileUpload.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUpload.js","sources":["../../../../src/components/Form/FileUpload/FileUpload.tsx"],"sourcesContent":[null],"names":["FileUpload","_a","accept","_b","enableMerge","label","labelTooltip","disableRemovalOfUploaded","_c","fileLimit","files","filesToMerge","_d","hideImagePreview","_e","hideTitle","maxSizeBytes","messages","minSizeBytes","onDelete","onError","onSelectFile","onShow","_f","selectMultiple","setFiles","setFilesToMerge","mergeModal","mergeDisplay","setMergeDisplay","mergeFileDetail","setMergeFileDetail","theme","uploadProgress","uploadedFiles","_g","withProgressBar","_h","isFormGroupDisabled","formGroupProps","inEnableMergeMode","transformFileToFileType","fileName","file","id","createId","src","name","info","_j","useDropzone","getFilesFromEvent","event","tempFiles","rejected","fileList","dataTransfer","target","i","length","item","filesWithoutError","filter","undefined","errors","push","code","message","applyFileLimit","onDropRejected","map","newFile_1","prevState","__spreadArray","onDropAccepted","__awaiter","images","f","matchMimeType","type","nonImages","forEach","reader","FileReader","onload","e","newFile","result","readAsDataURL","maxSize","minSize","multiple","noClick","noKeyboard","getInputProps","getRootProps","isDragActive","open","useEffect","show","componentClassName","cx","isUploadInProgress","Object","keys","find","key","Wrapper","React","Fragment","FormGroup2","wrapperProps","createElement","__assign","Modal","modalProps","size","MergeDialog","mergeDialog","display","onDisplay","fileDetail","onFileDetail","onAddFiles","onUpdate","onSubmit","hide","className","Avatar","backgroundColor","color","iconName","dragHere","move","Link","isSmall","onClick","select","selectMore","restriction","FileList","handleOnDelete"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileUpload.js","sources":["../../../../src/components/Form/FileUpload/FileUpload.tsx"],"sourcesContent":[null],"names":["FileUpload","_a","accept","_b","enableMerge","label","labelTooltip","disableRemovalOfUploaded","_c","fileLimit","files","filesToMerge","_d","hideImagePreview","_e","hideTitle","maxSizeBytes","messages","minSizeBytes","onDelete","onError","onSelectFile","onShow","_f","selectMultiple","setFiles","setFilesToMerge","mergeModal","mergeDisplay","setMergeDisplay","mergeFileDetail","setMergeFileDetail","theme","uploadProgress","uploadedFiles","_g","withProgressBar","_h","isFormGroupDisabled","formGroupProps","inEnableMergeMode","transformFileToFileType","fileName","file","id","createId","src","name","info","_j","useDropzone","getFilesFromEvent","event","tempFiles","rejected","fileList","dataTransfer","target","i","length","item","filesWithoutError","filter","undefined","errors","push","code","message","applyFileLimit","onDropRejected","map","newFile_1","prevState","__spreadArray","onDropAccepted","__awaiter","images","f","matchMimeType","type","nonImages","forEach","reader","FileReader","onload","e","newFile","result","readAsDataURL","console","log","maxSize","minSize","multiple","noClick","noKeyboard","getInputProps","getRootProps","isDragActive","open","useEffect","show","componentClassName","cx","isUploadInProgress","Object","keys","find","key","Wrapper","React","Fragment","FormGroup2","wrapperProps","createElement","__assign","Modal","modalProps","size","MergeDialog","mergeDialog","display","onDisplay","fileDetail","onFileDetail","onAddFiles","onUpdate","onSubmit","hide","className","Avatar","backgroundColor","color","iconName","dragHere","move","Link","isSmall","onClick","select","selectMore","restriction","FileList","handleOnDelete"],"mappings":"s1EA6HO,IAAMA,EAAa,SAACC,OACzBC,EAAMD,EAAAC,OACNC,EAAAF,EAAAG,YAAAA,cAAmBD,EACnBE,EAAKJ,EAAAI,MACLC,EAAYL,EAAAK,aACZC,EAAwBN,EAAAM,yBACxBC,EAAAP,EAAAQ,UAAAA,OAAY,IAAAD,EAAA,EAACA,EACbE,EAAKT,EAAAS,MACLC,EAAYV,EAAAU,aACZC,EAAAX,EAAAY,iBAAAA,OAAmB,IAAAD,GAAKA,EACxBE,EAAiBb,EAAAc,UAAjBA,OAAS,IAAAD,GAAQA,EACjBE,EAAYf,EAAAe,aACZC,EAAQhB,EAAAgB,SACRC,EAAYjB,EAAAiB,aACZC,EAAQlB,EAAAkB,SACRC,EAAOnB,EAAAmB,QACPC,EAAYpB,EAAAoB,aACZC,EAAMrB,EAAAqB,OACNC,EAAsBtB,EAAAuB,eAAtBA,OAAc,IAAAD,GAAQA,EACtBE,EAAQxB,EAAAwB,SACRC,EAAezB,EAAAyB,gBACfC,EAAU1B,EAAA0B,WACVC,EAAY3B,EAAA2B,aACZC,EAAe5B,EAAA4B,gBACfC,EAAe7B,EAAA6B,gBACfC,EAAkB9B,EAAA8B,mBAClBC,EAAK/B,EAAA+B,MACLC,EAAchC,EA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AG,wBAAyBtF,EAASqH,UAGzDvH,EAYE,KAVH+F,EAAKI,cAAA,MAAA,CAAAe,UAAW1B,EAAG,wBAChBtF,EAASsH,KACVzB,EAAAI,cAACsB,EAAI,CAACC,SAAO,EAACzG,MAAM,4BAA4B0G,QAASvC,IACpC,KAAlBzF,aAAK,EAALA,EAAOiD,QAAe1C,EAAS0H,OAAS1H,EAAS2H,YAEpD9B,EAAAI,cAAA,MAAA,CAAKe,UAAW1B,EAAG,+BAAgCtF,EAAS4H,gBAmD7DnI,EAAMiD,OAAS,GACdmD,EAACI,cAAA4B,EACC,CAAAvI,yBAA0BA,EAC1BG,MAAOA,EACPqI,eArFa,SAACnG,GACtBzB,GAAYA,EAASyB,GACrBnB,GAAS,SAAC+C,GAAc,OAAAA,EAAUV,QAAO,SAACnB,GAAS,OAAAA,EAAKC,KAAOA,CAAE,GAAC,GACpE,EAmFU/B,iBAAkBA,EAClBI,SAAUA,EACVO,eAAgBA,EAChBS,eAAgBA,EAChBC,cAAeA,EACfE,gBAAiBA,EACjBd,OAAQA,KAMpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MergeDialog.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FileUpload/_parts_/MergeDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"MergeDialog.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FileUpload/_parts_/MergeDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAA;AAG5D,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAC7D,OAAwB,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;AAQhF,UAAU,gBAAgB;IACxB,QAAQ,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC,CAAA;IACxD,OAAO,EAAE,2BAA2B,CAAA;IACpC,SAAS,EAAE,CAAC,KAAK,EAAE,2BAA2B,KAAK,IAAI,CAAA;IACvD,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,UAAU,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAA;IAC5B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAA;IAC1D,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;CAC/B;AAED,QAAA,MAAM,WAAW,sGAUd,gBAAgB,sBA2KlB,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__awaiter as t,__spreadArray as o,__generator as n}from'./../../../../ext/tslib/tslib.es6.js';import r,{useEffect as s,Fragment as
|
|
1
|
+
import{__assign as e,__awaiter as t,__spreadArray as o,__generator as n}from'./../../../../ext/tslib/tslib.es6.js';import r,{useState as i,useEffect as s,Fragment as l}from"react";import"../../../Typography/Amount/Amount.js";import{Text as m}from"../../../Typography/Text/Text.js";import"../../../../utils/getDisplayName.js";import"../../../../utils/getIntegerMask.js";import"../../../../utils/isFilled.js";import"../../../../utils/isNotFilled.js";import"../../../../utils/isNotNilNorEmpty.js";import'./../../../../ext/diacritic/diacritics.js';import"../../../../utils/classBinder.js";import'./../../../../ext/text-mask-addons/dist/textMaskAddons.js';import{Button as a}from"../../../Components/Button/Button.js";import{ButtonsGroup as p}from"../../../Components/Button/ButtonsGroup.js";import'./../../../../ext/camelcase/index.js';import"../../../Components/ButtonTooltip/ButtonTooltip.js";import'./../../../../ext/cuid/index.js';import"../../../../contexts/CardContext.js";import"../../../../contexts/FormGroupContext.js";import"../../../../contexts/ModalContext.js";import"../../../../contexts/Select2Context.js";import"../../../../contexts/TabsContext.js";import"react-slick";import"../../../Components/Collapse/Collapse.js";import'./../../../../ext/lodash/_baseToString.js';import'./../../../../ext/react-text-mask/dist/reactTextMask.js';import"../../../Components/Dropdown/_elements_/DropdownDivider.js";import"../../../Components/Dropdown/_elements_/DropdownItem.js";import"../../../Components/Dropdown/_elements_/DropdownMenu.js";import"../../../Components/Dropdown/_elements_/DropdownInfoText.js";import"../../../Components/Dropdown/_elements_/DropdownLoading.js";import"../../../../contexts/ContentTableContext.js";import"../../../Components/ContentTable/ContentTableRow.js";import"../../../Components/DataTable/DataTable.js";import"../../../Components/Link/Link.js";import{ModalContent as d}from"../../../Components/Modal/_elements_/ModalContent.js";import{ModalFooter as c}from"../../../Components/Modal/_elements_/ModalFooter.js";import{ModalHeader as u}from"../../../Components/Modal/_elements_/ModalHeader.js";import"react-dom";import{useModal as f}from"../../../Components/Modal/_elements_/Modal.hook.js";import"react-router-dom";import"../../../../contexts/MobilePanelContext.js";import"../../../Components/SuperModal/SuperModal.context.js";import"../../Autocomplete/Autocomplete.js";import'./../../../../ext/react-device-detect/dist/lib.js';import j from"./MergeImageCards.js";import C from"./MergeImageDetail.js";import{ImageToPdf as _}from'./../../../../ext/@refinanso/images-to-pdf/dist/image-to-pdf.es.js';import g from"./ModalConfirmContent.js";import M from"./ModalWaitingContent.js";import"../../Select/_elements_/Select2CategorisedOptions.js";import"../../Select/_elements_/Select2Options.js";import"../../Slider/Slider.js";import{formatDate as x}from'./../../../../ext/date-fns/format.js';var y=function(y){var E=y.messages,w=y.display,D=y.onDisplay,b=y.files,v=y.onAddFiles,h=y.fileDetail,S=y.onFileDetail,T=y.onUpdate,N=y.onSubmit,k=i(null),F=k[0],I=k[1],A=f({onHide:function(){S&&S(null)}}),B=A.Modal,R=A.modalProps,P=A.show,z=A.hide,H=f({onHide:function(){I(null)}}),L=H.Modal,U=H.modalProps,O=H.show,G=H.hide,W=f(),Z=W.Modal,q=W.modalProps,J=W.show,K=W.hide,Q=function(e){var t=e.oldIndex,n=e.newIndex,r=o([],b,!0),i=r.splice(t,1)[0];r.splice(n,0,i),T(r)},V=function(e){T(o([],b,!0).sort((function(t,o){return("ASC"===e?t.name<o.name:t.name>o.name)?-1:0})))},X=function(){D("grid"===w?"list":"grid")};return s((function(){h&&P()}),[h]),r.createElement(l,null,r.createElement(L,e({},U),r.createElement(g,{messages:E,fileName:"Merge ".concat(x(new Date,"yyyy-MM-dd HH:mm:ss")),onClose:G,onPreview:function(){if(F){var e=new Blob([F],{type:"application/pdf"}),t=URL.createObjectURL(e);window.open(t)}},onSubmit:function(e){if(F){var t=new File([F],"".concat(e,".pdf"),{type:"application/pdf"});N(t),G()}}})),r.createElement(Z,e({},q),r.createElement(M,{messages:E})),h&&r.createElement(B,e({},R),r.createElement(C,{messages:E,file:h,onClose:z})),r.createElement(_,{files:b.map((function(e){return e.info})).filter((function(e){return!!e}))},(function(e){var o=e.items,i=e.handleRotateImage,s=e.merge;return r.createElement(l,null,r.createElement(u,{closeText:E.close,title:E.title}),r.createElement(d,{theme:"f-fileMerge__modalBody"},r.createElement(m,null,E.description),r.createElement("div",{className:"f-fileMerge"},r.createElement("div",{className:"f-fileMerge__content"},r.createElement("div",{className:"f-fileMerge__cards"},r.createElement(j,{messages:E,images:o,axis:"grid"===w?"xy":"y",display:w,helperClass:"f-fileMerge__draggingItem",onSortEnd:Q,onDetail:function(e){S&&S(e)},onAddFiles:v,onRotate:i,onRemoveFile:function(e){var t;t=b[e].id,T((function(e){return e.filter((function(e){return e.id!==t}))}))},shouldCancelStart:function(e){return e.target.closest("button")}})),r.createElement("div",{className:"f-fileMerge__actions"},r.createElement(p,null,r.createElement(a,{onlyIconName:"plusFill",color:"primary",size:"small",onClick:v}),r.createElement(a,{onlyIconName:"grid"!==w?"tilesFill":"listUlFill",color:"primary",type:"border",size:"small",onClick:X}),r.createElement(a,{onlyIconName:"arrowDownAzFill",color:"primary",type:"border",size:"small",onClick:function(){return V("ASC")}}),r.createElement(a,{onlyIconName:"arrowDownZaFill",color:"primary",type:"border",size:"small",onClick:function(){return V("DESC")}})))))),r.createElement(c,null,r.createElement("div",{className:"u-textRight"},r.createElement(a,{isDisabled:0===b.length,onClick:function(){return t(void 0,void 0,void 0,(function(){var e,t;return n(this,(function(o){switch(o.label){case 0:return J(),[4,s(1)];case 1:return e=o.sent(),t=e.output("blob"),I(t),O(),K(),[2]}}))}))}},E.submit))))})))};export{y as default};
|
|
2
2
|
//# sourceMappingURL=MergeDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MergeDialog.js","sources":["../../../../../src/components/Form/FileUpload/_parts_/MergeDialog.tsx"],"sourcesContent":[null],"names":["MergeDialog","_a","messages","display","onDisplay","files","onAddFiles","fileDetail","onFileDetail","onUpdate","onSubmit","_b","useModal","onHide","ModalDetail","Modal","modalDetailProps","modalProps","showDetail","show","hideDetail","hide","handleSortEnd","oldIndex","newIndex","newFiles","__spreadArray","removed","splice","handleSort","direction","sort","a","b","name","toggleSetDisplay","useEffect","React","Fragment","createElement","
|
|
1
|
+
{"version":3,"file":"MergeDialog.js","sources":["../../../../../src/components/Form/FileUpload/_parts_/MergeDialog.tsx"],"sourcesContent":[null],"names":["MergeDialog","_a","messages","display","onDisplay","files","onAddFiles","fileDetail","onFileDetail","onUpdate","onSubmit","_b","useState","responseBlob","setResponseBlob","_c","useModal","onHide","ModalDetail","Modal","modalDetailProps","modalProps","showDetail","show","hideDetail","hide","_d","ModalConfirm","modalConfirmProps","showConfirm","hideConfirm","_e","ModalWaiting","modalWaitingProps","showWaiting","hideWaiting","handleSortEnd","oldIndex","newIndex","newFiles","__spreadArray","removed","splice","handleSort","direction","sort","a","b","name","toggleSetDisplay","useEffect","React","Fragment","createElement","ModalConfirmContent","fileName","concat","format","Date","onClose","onPreview","blob","Blob","type","url","URL","createObjectURL","window","open","file","File","ModalWaitingContent","MergeImageDetail","ImageToPdf","map","f","info","filter","items","handleRotateImage","merge","ModalHeader","closeText","close","title","ModalContent","theme","Text","description","className","MergeImageCards","images","axis","helperClass","onSortEnd","onDetail","onRotate","onRemoveFile","index","id","prev","shouldCancelStart","e","target","closest","ButtonsGroup","Button","onlyIconName","color","size","onClick","ModalFooter","isDisabled","length","__awaiter","response","sent","output","submit"],"mappings":"06FAwBM,IAAAA,EAAc,SAACC,OACnBC,EAAQD,EAAAC,SACRC,EAAOF,EAAAE,QACPC,EAASH,EAAAG,UACTC,EAAKJ,EAAAI,MACLC,eACAC,EAAUN,EAAAM,WACVC,EAAYP,EAAAO,aACZC,EAAQR,EAAAQ,SACRC,EAAQT,EAAAS,SAEFC,EAAkCC,EAAsB,MAAvDC,EAAYF,EAAA,GAAEG,EAAeH,EAAA,GAE9BI,EAKFC,EAAS,CACXC,OAAQ,WACNT,GAAgBA,EAAa,KAC9B,IAPMU,EAAWH,EAAAI,MACNC,EAAgBL,EAAAM,WACtBC,EAAUP,EAAAQ,KACVC,EAAUT,EAAAU,KAOZC,EAKFV,EAAS,CACXC,OAAQ,WACNH,EAAgB,KACjB,IAPMa,EAAYD,EAAAP,MACPS,EAAiBF,EAAAL,WACvBQ,EAAWH,EAAAH,KACXO,EAAWJ,EAAAD,KAObM,EAA+Ff,IAAtFgB,EAAYD,EAAAZ,MAAcc,EAAiBF,EAAAV,WAAQa,EAAWH,EAAAR,KAAQY,SAE/EC,EAAgB,SAACnC,OAAEoC,EAAQpC,EAAAoC,SAAEC,EAAQrC,EAAAqC,SACnCC,EAAQC,EAAA,GAAOnC,GAAK,GACnBoC,EAAWF,EAASG,OAAOL,EAAU,GAAE,GAC9CE,EAASG,OAAOJ,EAAU,EAAGG,GAC7BhC,EAAS8B,EACX,EAMMI,EAAa,SAACC,GAClBnC,EAAS+B,EAAI,GAAAnC,GAAO,GAAAwC,MAAK,SAACC,EAAGC,GAAM,OAAgB,QAAdH,EAAsBE,EAAEE,KAAOD,EAAEC,KAAOF,EAAEE,KAAOD,EAAEC,OAAS,EAAI,CAAlE,IACrC,EAEMC,EAAmB,WACvB7C,EAAsB,SAAZD,EAAqB,OAAS,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AAcmH,OACzBvD,EAAOsD,EAASE,OAAO,QAC7BvG,EAAgB+C,GAChBhC,IACAM,cACD,GAEAjC,EAASoH,UAMrB,IAIT"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FileUploadPropsType } from '../FileUpload';
|
|
3
|
+
interface ModalConfirmContentProps {
|
|
4
|
+
messages: FileUploadPropsType['messages']['mergeDialog'];
|
|
5
|
+
fileName: string;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onPreview: () => void;
|
|
8
|
+
onSubmit: (fileName: string) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const ModalConfirmContent: ({ messages, onClose, onPreview, onSubmit, ...props }: ModalConfirmContentProps) => React.JSX.Element;
|
|
11
|
+
export default ModalConfirmContent;
|
|
12
|
+
//# sourceMappingURL=ModalConfirmContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalConfirmContent.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/FileUpload/_parts_/ModalConfirmContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;AAajD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAKnD,UAAU,wBAAwB;IAChC,QAAQ,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC,CAAA;IACxD,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;CACrC;AAED,QAAA,MAAM,mBAAmB,yDAA0D,wBAAwB,sBAkD1G,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__rest as e}from'./../../../../ext/tslib/tslib.es6.js';import t,{useState as o,Fragment as n}from"react";import"../../../Typography/Amount/Amount.js";import{Text as r}from"../../../Typography/Text/Text.js";import"../../../../utils/getDisplayName.js";import"../../../../utils/getIntegerMask.js";import"../../../../utils/isFilled.js";import"../../../../utils/isNotFilled.js";import"../../../../utils/isNotNilNorEmpty.js";import'./../../../../ext/diacritic/diacritics.js';import"../../../../utils/classBinder.js";import'./../../../../ext/text-mask-addons/dist/textMaskAddons.js';import{Button as m}from"../../../Components/Button/Button.js";import{ButtonsGroup as s}from"../../../Components/Button/ButtonsGroup.js";import{Avatar as i}from"../../../Components/Avatar/Avatar.js";import"../../../Components/ButtonTooltip/ButtonTooltip.js";import'./../../../../ext/cuid/index.js';import"../../../../contexts/CardContext.js";import"../../../../contexts/FormGroupContext.js";import"../../../../contexts/ModalContext.js";import"../../../../contexts/Select2Context.js";import"../../../../contexts/TabsContext.js";import"react-slick";import"../../../Components/Collapse/Collapse.js";import'./../../../../ext/lodash/_baseToString.js';import{Input as l}from"../../Input/Input.js";import"../../../Components/Dropdown/_elements_/DropdownDivider.js";import"../../../Components/Dropdown/_elements_/DropdownItem.js";import"../../../Components/Dropdown/_elements_/DropdownMenu.js";import"../../../Components/Dropdown/_elements_/DropdownInfoText.js";import"../../../Components/Dropdown/_elements_/DropdownLoading.js";import"../../../../contexts/ContentTableContext.js";import"../../../Components/ContentTable/ContentTableRow.js";import"../../../Components/DataTable/DataTable.js";import{IconList as p}from"../../../Components/IconList/IconList.js";import{IconListItem as a}from"../../../Components/IconList/IconListItem.js";import{Link as c}from"../../../Components/Link/Link.js";import{ModalContent as d}from"../../../Components/Modal/_elements_/ModalContent.js";import{ModalFooter as u}from"../../../Components/Modal/_elements_/ModalFooter.js";import{ModalHeader as j}from"../../../Components/Modal/_elements_/ModalHeader.js";import"react-dom";import"react-router-dom";import{Flex as C}from"../../../Layout/Flex/Flex.js";import"../../../../contexts/MobilePanelContext.js";import"../../../Components/SuperModal/SuperModal.context.js";import"../../Autocomplete/Autocomplete.js";import'./../../../../ext/react-device-detect/dist/lib.js';import"./MergeImageCards.js";import'./../../../../ext/jspdf/dist/jspdf.es.min.js';import'./../../../../ext/@bugsnag/cuid/index.esm.js';import"../../Select/_elements_/Select2CategorisedOptions.js";import"../../Select/_elements_/Select2Options.js";import"../../Slider/Slider.js";var x=function(x){var f=x.messages,g=x.onClose,_=x.onPreview,b=x.onSubmit,D=e(x,["messages","onClose","onPreview","onSubmit"]),E=o(D.fileName),T=E[0],w=E[1];return t.createElement(n,null,t.createElement(j,{closeText:"close",title:f.title}),t.createElement(d,null,t.createElement(p,null,t.createElement(a,{avatarText:"1",iconBackgroundColor:"bgErrorBold",theme:"u-mb--xxLarge"},t.createElement(r,{weight:"bold",theme:"u-mb--0"},f.confirmDialog.checkFileTitle),t.createElement(r,{theme:"u-mb--xxSmall"},f.confirmDialog.checkFileDescription),t.createElement(c,{onClick:_},t.createElement(i,{iconName:"download"}),f.confirmDialog.checkFilePreview)),t.createElement(a,{avatarText:"2",iconBackgroundColor:"bgErrorBold"},t.createElement(r,{weight:"bold",theme:"u-mb--0"},f.confirmDialog.renameFileTitle),t.createElement(C,{theme:"f-fileMergeConfirm"},t.createElement(l,{type:"text",placeholder:"Název souboru",name:"fileName",value:T.replace(".pdf",""),onChange:function(e){return w(e)},theme:"u-mt--xxSmall"}),".pdf")))),t.createElement(u,null,t.createElement("div",{className:"u-textRight"},t.createElement(s,{isFlex:!0,justifyContent:"space-between"},t.createElement(m,{onClick:g,type:"border",color:"primary"},f.confirmDialog.back),t.createElement(m,{onClick:function(){return b(T)},color:"primary"},f.confirmDialog.submit)))))};export{x as default};
|
|
2
|
+
//# sourceMappingURL=ModalConfirmContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalConfirmContent.js","sources":["../../../../../src/components/Form/FileUpload/_parts_/ModalConfirmContent.tsx"],"sourcesContent":[null],"names":["ModalConfirmContent","_a","messages","onClose","onPreview","onSubmit","props","__rest","_b","useState","fileName","setFileName","React","Fragment","createElement","ModalHeader","closeText","title","ModalContent","IconList","IconListItem","avatarText","iconBackgroundColor","theme","Text","weight","confirmDialog","checkFileTitle","checkFileDescription","Link","onClick","Avatar","iconName","checkFilePreview","renameFileTitle","Flex","Input","type","placeholder","name","value","replace","onChange","ModalFooter","className","ButtonsGroup","isFlex","justifyContent","Button","color","back","submit"],"mappings":"uyFA0BM,IAAAA,EAAsB,SAACC,GAAE,IAAAC,EAAQD,EAAAC,SAAEC,YAASC,EAASH,EAAAG,UAAEC,EAAQJ,EAAAI,SAAKC,EAAKC,EAAAN,EAAlD,+CACrBO,EAA0BC,EAASH,EAAMI,UAAxCA,EAAQF,EAAA,GAAEG,OAEjB,OACEC,gBAACC,EAAQ,KACPD,EAACE,cAAAC,EAAY,CAAAC,UAAU,QAAQC,MAAOf,EAASe,QAC/CL,EAAAE,cAACI,EAAY,KACXN,EAAAE,cAACK,EAAQ,KACPP,EAAAE,cAACM,EAAY,CAACC,WAAW,IAAIC,oBAAoB,cAAcC,MAAM,iBACnEX,EAAAE,cAACU,EAAI,CAACC,OAAO,OAAOF,MAAM,WACvBrB,EAASwB,cAAcC,gBAE1Bf,EAACE,cAAAU,EAAK,CAAAD,MAAM,iBAAiBrB,EAASwB,cAAcE,sBACpDhB,EAAAE,cAACe,EAAI,CAACC,QAAS1B,GACbQ,EAAAE,cAACiB,EAAM,CAACC,SAAS,aAChB9B,EAASwB,cAAcO,mBAG5BrB,EAACE,cAAAM,GAAaC,WAAW,IAAIC,oBAAoB,eAC/CV,EAAAE,cAACU,EAAI,CAACC,OAAO,OAAOF,MAAM,WACvBrB,EAASwB,cAAcQ,iBAE1BtB,EAAAE,cAACqB,EAAI,CAACZ,MAAM,sBACVX,EAAAE,cAACsB,EACC,CAAAC,KAAK,OACLC,YAAY,gBACZC,KAAK,WACLC,MAAO9B,EAAS+B,QAAQ,OAAQ,IAChCC,SAAU,SAACF,GAA2B,OAAA7B,EAAY6B,EAAZ,EACtCjB,MAAM,kBAGH,WAIbX,EAAAE,cAAC6B,EAAW,KACV/B,EAAKE,cAAA,MAAA,CAAA8B,UAAU,eACbhC,EAAAE,cAAC+B,EAAa,CAAAC,QAAO,EAAAC,eAAe,iBAClCnC,EAAAE,cAACkC,EAAO,CAAAlB,QAAS3B,EAASkC,KAAK,SAASY,MAAM,WAC3C/C,EAASwB,cAAcwB,MAE1BtC,EAAAE,cAACkC,EAAM,CAAClB,QAAS,WAAM,OAAAzB,EAASK,EAAS,EAAEuC,MAAM,WAC9C/C,EAASwB,cAAcyB,WAOtC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FileUploadPropsType } from '../FileUpload';
|
|
3
|
+
interface ModalWaitingContentProps {
|
|
4
|
+
messages: FileUploadPropsType['messages']['mergeDialog'];
|
|
5
|
+
}
|
|
6
|
+
declare const ModalWaitingContent: ({ messages }: ModalWaitingContentProps) => React.JSX.Element;
|
|
7
|
+
export default ModalWaitingContent;
|
|
8
|
+
//# sourceMappingURL=ModalWaitingContent.d.ts.map
|