frst-components 0.22.74 → 0.22.77
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/dist/index.js
CHANGED
|
@@ -14092,7 +14092,7 @@ const ContentDescription = styled__default["default"].div `
|
|
|
14092
14092
|
gap: 16px;
|
|
14093
14093
|
`;
|
|
14094
14094
|
|
|
14095
|
-
const modalNewFeatures = ({ title = 'Novidades', open, onClose, onFinish, steps, Exit = 'X',
|
|
14095
|
+
const modalNewFeatures = ({ title = 'Novidades', open, onClose, onFinish, steps, Exit = 'X', onCurrentStep }) => {
|
|
14096
14096
|
const [numberCurrentStep, setNumberCurrentStep] = React.useState(0);
|
|
14097
14097
|
const [currentTopic, setCurrentTopic] = React.useState(steps[numberCurrentStep]);
|
|
14098
14098
|
const isLastStep = currentTopic === steps[steps.length - 1];
|
|
@@ -14101,14 +14101,16 @@ const modalNewFeatures = ({ title = 'Novidades', open, onClose, onFinish, steps,
|
|
|
14101
14101
|
React.useEffect(() => {
|
|
14102
14102
|
setCurrentTopic(steps[numberCurrentStep]);
|
|
14103
14103
|
}, [steps]);
|
|
14104
|
+
React.useEffect(() => {
|
|
14105
|
+
onCurrentStep && onCurrentStep(currentTopic);
|
|
14106
|
+
}, [currentTopic]);
|
|
14104
14107
|
const handleClickButtonNext = () => {
|
|
14105
|
-
if (isLastStep)
|
|
14106
|
-
onFinish();
|
|
14108
|
+
if (isLastStep) {
|
|
14109
|
+
onFinish && onFinish();
|
|
14110
|
+
}
|
|
14107
14111
|
else {
|
|
14108
14112
|
setCurrentTopic(steps[numberCurrentStep + 1]);
|
|
14109
14113
|
setNumberCurrentStep((prev) => prev + 1);
|
|
14110
|
-
if (onNext)
|
|
14111
|
-
onNext();
|
|
14112
14114
|
}
|
|
14113
14115
|
};
|
|
14114
14116
|
const handleClickTopic = (id) => {
|
|
@@ -19892,20 +19894,23 @@ var css_248z$3 = ".grid {\n display: flex;\n flex-wrap: wrap;\n margin-
|
|
|
19892
19894
|
styleInject(css_248z$3);
|
|
19893
19895
|
|
|
19894
19896
|
function FiltroGaleriaDesafios({ placeholderSelect, handleValueSelect, optionLabel, listItems, isDisabled, maxListItems, textButtonClear, textBusca, valueSelect = [] }) {
|
|
19895
|
-
|
|
19896
|
-
const [
|
|
19897
|
-
const [
|
|
19898
|
-
|
|
19897
|
+
/// TODO: Não está implementado Lazyloading nesse componente.
|
|
19898
|
+
// const [lazyItems, setLazyItems] = useState([])
|
|
19899
|
+
// const [lazyLoading, setLazyLoading] = useState(false)
|
|
19900
|
+
// useEffect(() => {
|
|
19901
|
+
// setLazyItems(Array.from({ length: 100000 }))
|
|
19902
|
+
// setLazyLoading(false)
|
|
19903
|
+
// }, [])
|
|
19904
|
+
///
|
|
19905
|
+
const [selectedListItems, setSelectedListItems] = React.useState([]);
|
|
19899
19906
|
const [textFilter, setTextFilter] = React.useState('');
|
|
19900
19907
|
const [listItemsFilter, setListItemsFilter] = React.useState(listItems);
|
|
19901
19908
|
React.useEffect(() => {
|
|
19902
|
-
|
|
19903
|
-
|
|
19904
|
-
|
|
19905
|
-
React.useEffect(() => {
|
|
19906
|
-
setSelectedListItems(valueSelect);
|
|
19909
|
+
if (valueSelect.length > 0) {
|
|
19910
|
+
setSelectedListItems(valueSelect);
|
|
19911
|
+
}
|
|
19907
19912
|
}, [valueSelect]);
|
|
19908
|
-
React.
|
|
19913
|
+
React.useMemo(() => {
|
|
19909
19914
|
handleValueSelect(selectedListItems);
|
|
19910
19915
|
}, [selectedListItems]);
|
|
19911
19916
|
const listFilterSearch = React.useMemo(() => {
|
|
@@ -19917,11 +19922,9 @@ function FiltroGaleriaDesafios({ placeholderSelect, handleValueSelect, optionLab
|
|
|
19917
19922
|
return listItems.length >= maxListItems ? (jsxRuntime.jsxs(searchAndButton$1, { children: [jsxRuntime.jsx("div", { children: jsxRuntime.jsx(SearchField, { placeholder: textBusca, className: null, handleClickButton: null, isButton: true, hasSearchIcon: true, onChange: (e) => {
|
|
19918
19923
|
setTextFilter(e.target.value);
|
|
19919
19924
|
} }) }), lengthList >= 2 ? (jsxRuntime.jsx(Button$4, { style: { marginTop: "1rem" }, variant: 'link', label: textButtonClear, disabled: false, handleClick: () => {
|
|
19920
|
-
setSelectedListItems(
|
|
19921
|
-
handleValueSelect([]);
|
|
19925
|
+
setSelectedListItems([]);
|
|
19922
19926
|
} })) : (jsxRuntime.jsx("div", {}))] })) : lengthList >= 1 ? (jsxRuntime.jsx(searchAndButton$1, { children: jsxRuntime.jsx(Button$4, { variant: 'link', label: textButtonClear, disabled: false, handleClick: () => {
|
|
19923
|
-
setSelectedListItems(
|
|
19924
|
-
handleValueSelect([]);
|
|
19927
|
+
setSelectedListItems([]);
|
|
19925
19928
|
} }) })) : (jsxRuntime.jsx("div", {}));
|
|
19926
19929
|
};
|
|
19927
19930
|
const handleDropdownIcon = () => {
|
|
@@ -19932,10 +19935,10 @@ function FiltroGaleriaDesafios({ placeholderSelect, handleValueSelect, optionLab
|
|
|
19932
19935
|
};
|
|
19933
19936
|
const selectedItems = selectedListItems;
|
|
19934
19937
|
const length = selectedItems ? selectedItems.length : 0;
|
|
19935
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(containerFiltro, { children: [length >= 1 && (jsxRuntime.jsx(countSelect, { children: jsxRuntime.jsx(textCountSelectNumber, { children: length }) })), jsxRuntime.jsx(FiltroPrimeReact, {
|
|
19938
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(containerFiltro, { children: [length >= 1 && (jsxRuntime.jsx(countSelect, { children: jsxRuntime.jsx(textCountSelectNumber, { children: length }) })), jsxRuntime.jsx(FiltroPrimeReact, { children: jsxRuntime.jsx(multiselect.MultiSelect, { value: selectedListItems, options: listFilterSearch, onChange: (e) => setSelectedListItems(e.value), optionLabel: optionLabel, placeholder: placeholderSelect ? placeholderSelect : 'Por favor escolha', className: "multiselect-custom",
|
|
19936
19939
|
// panelStyle={selectItemsCss}
|
|
19937
19940
|
// selectedItemTemplate={selectedCountriesTemplate()}
|
|
19938
|
-
selectedItemsLabel: placeholderSelect, disabled: isDisabled, maxSelectedLabels: 0, filter: false, showSelectAll: false,
|
|
19941
|
+
selectedItemsLabel: placeholderSelect, disabled: isDisabled, maxSelectedLabels: 0, filter: false, showSelectAll: false, panelHeaderTemplate: handleTemplateHeader(), removeIcon: handleRemoveIcon, dropdownIcon: handleDropdownIcon }) })] }) }));
|
|
19939
19942
|
}
|
|
19940
19943
|
|
|
19941
19944
|
const containerSelect = styled__default["default"].div `
|
|
@@ -12,10 +12,10 @@ type ModalNewFeaturesProps = {
|
|
|
12
12
|
open: boolean;
|
|
13
13
|
Exit?: string;
|
|
14
14
|
onClose: () => void;
|
|
15
|
-
onFinish
|
|
16
|
-
|
|
15
|
+
onFinish?: () => void;
|
|
16
|
+
onCurrentStep?: (CurrentStep: any) => void;
|
|
17
17
|
steps: TopicsNewFeatues[];
|
|
18
18
|
};
|
|
19
|
-
declare const modalNewFeatures: ({ title, open, onClose, onFinish, steps, Exit,
|
|
19
|
+
declare const modalNewFeatures: ({ title, open, onClose, onFinish, steps, Exit, onCurrentStep }: ModalNewFeaturesProps) => JSX.Element;
|
|
20
20
|
export default modalNewFeatures;
|
|
21
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/LXP/modalNewFeatures/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAIlD,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAA;IACrC,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,CAAA;CACrC,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,CAAC,EAAC,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/LXP/modalNewFeatures/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAIlD,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAA;IACrC,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,CAAA;CACrC,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,CAAC,EAAC,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,aAAa,CAAC,EAAE,CAAC,WAAW,KAAA,KAAK,IAAI,CAAA;IACrC,KAAK,EAAE,gBAAgB,EAAE,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,gBAAgB,mEAAsF,qBAAqB,gBAgHhI,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/filtro-galeria-desafio/index.tsx"],"names":[],"mappings":";AAIA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,yBAAyB,CAAA;AAChC,OAAO,wBAAwB,CAAA;AAM/B,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAC5C,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,UAAU,EACV,YAAY,EACZ,eAAe,EACf,SAAS,EACT,WAAc,EACf;;;;;;;;;;CAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/filtro-galeria-desafio/index.tsx"],"names":[],"mappings":";AAIA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,yBAAyB,CAAA;AAChC,OAAO,wBAAwB,CAAA;AAM/B,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAC5C,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,UAAU,EACV,YAAY,EACZ,eAAe,EACf,SAAS,EACT,WAAc,EACf;;;;;;;;;;CAAA,eAwHA"}
|