iguazio.dashboard-react-controls 3.0.2 → 3.0.4
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/components/FormChipCell/FormChip/FormChip.d.ts +5 -1
- package/dist/components/FormChipCell/FormChip/FormChip.d.ts.map +1 -1
- package/dist/components/FormChipCell/FormChip/FormChip.mjs +50 -42
- package/dist/components/FormChipCell/FormChip/FormChip.mjs.map +1 -1
- package/dist/components/FormChipCell/FormChipCell.d.ts.map +1 -1
- package/dist/components/FormChipCell/FormChipCell.mjs +102 -99
- package/dist/components/FormChipCell/FormChipCell.mjs.map +1 -1
- package/dist/components/FormChipCell/FormChipCellView.d.ts +6 -1
- package/dist/components/FormChipCell/FormChipCellView.d.ts.map +1 -1
- package/dist/components/FormChipCell/FormChipCellView.mjs +104 -92
- package/dist/components/FormChipCell/FormChipCellView.mjs.map +1 -1
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.d.ts +3 -1
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.d.ts.map +1 -1
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.mjs +126 -117
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.mjs.map +1 -1
- package/dist/components/FormCombobox/FormCombobox.d.ts.map +1 -1
- package/dist/components/FormCombobox/FormCombobox.mjs +65 -65
- package/dist/components/FormCombobox/FormCombobox.mjs.map +1 -1
- package/dist/images/present-metrics-icon.svg +3 -0
- package/dist/index.css +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default FormChipCellView;
|
|
2
|
-
declare function FormChipCellView({ chipOptions, chips, editConfig, handleAddNewChip, handleEditChip, handleRemoveChip, handleShowElements, handleToEditMode, isEditable, name, setChipsSizes, setEditConfig, shortChips, showChips, showHiddenChips, validateFields, validationRules }: {
|
|
2
|
+
declare function FormChipCellView({ chipOptions, chipSizeIsRecalculated, setChipSizeIsRecalculated, chips, editConfig, handleAddNewChip, handleEditChip, handleRemoveChip, handleShowElements, handleToEditMode, isEditable, name, setChipsSizes, setEditConfig, shortChips, showChips, showHiddenChips, validateFields, validationRules }: {
|
|
3
3
|
chipOptions?: {
|
|
4
4
|
background: string;
|
|
5
5
|
boldValue: boolean;
|
|
@@ -8,6 +8,8 @@ declare function FormChipCellView({ chipOptions, chips, editConfig, handleAddNew
|
|
|
8
8
|
density: string;
|
|
9
9
|
font: string;
|
|
10
10
|
};
|
|
11
|
+
chipSizeIsRecalculated: any;
|
|
12
|
+
setChipSizeIsRecalculated: any;
|
|
11
13
|
chips: any;
|
|
12
14
|
editConfig: any;
|
|
13
15
|
handleAddNewChip: any;
|
|
@@ -34,8 +36,11 @@ declare namespace FormChipCellView {
|
|
|
34
36
|
let displayName: string;
|
|
35
37
|
namespace propTypes {
|
|
36
38
|
export { CHIP_OPTIONS as chipOptions };
|
|
39
|
+
export let chipSizeIsRecalculated: any;
|
|
40
|
+
export let setChipSizeIsRecalculated: any;
|
|
37
41
|
export let chips: any;
|
|
38
42
|
export let editConfig: any;
|
|
43
|
+
export let formState: any;
|
|
39
44
|
export let handleAddNewChip: any;
|
|
40
45
|
export let handleEditChip: any;
|
|
41
46
|
export let handleRemoveChip: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormChipCellView.d.ts","sourceRoot":"","sources":["../../../src/lib/components/FormChipCell/FormChipCellView.jsx"],"names":[],"mappings":";AAiCA
|
|
1
|
+
{"version":3,"file":"FormChipCellView.d.ts","sourceRoot":"","sources":["../../../src/lib/components/FormChipCell/FormChipCellView.jsx"],"names":[],"mappings":";AAiCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA6KC;;;;;;;;;;;;;;;;;;;;;;;;;;6BAnL4B,aAAa"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as i, jsxs as m, Fragment as M } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as G } from "react";
|
|
3
3
|
import r from "prop-types";
|
|
4
4
|
import p from "classnames";
|
|
5
|
-
import { FieldArray as
|
|
6
|
-
import { isEmpty as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { CHIP_OPTIONS as
|
|
12
|
-
import { isEveryObjectValueEmpty as
|
|
13
|
-
import { uniquenessError as
|
|
14
|
-
import
|
|
15
|
-
let
|
|
5
|
+
import { FieldArray as J } from "react-final-form-arrays";
|
|
6
|
+
import { isEmpty as L } from "lodash";
|
|
7
|
+
import Q from "./FormChip/FormChip.mjs";
|
|
8
|
+
import U from "./HiddenChipsBlock/HiddenChipsBlock.mjs";
|
|
9
|
+
import W from "../TooltipTemplate/TextTooltipTemplate.mjs";
|
|
10
|
+
import X from "../Tooltip/Tooltip.mjs";
|
|
11
|
+
import { CHIP_OPTIONS as Y } from "../../types.mjs";
|
|
12
|
+
import { isEveryObjectValueEmpty as Z } from "../../utils/common.util.mjs";
|
|
13
|
+
import { uniquenessError as g } from "./formChipCell.util.mjs";
|
|
14
|
+
import O from "../../images/add.svg.mjs";
|
|
15
|
+
let n = ({
|
|
16
16
|
chipOptions: e = {
|
|
17
17
|
background: "purple",
|
|
18
18
|
boldValue: !1,
|
|
@@ -21,132 +21,144 @@ let s = ({
|
|
|
21
21
|
density: "dense",
|
|
22
22
|
font: "purple"
|
|
23
23
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
24
|
+
chipSizeIsRecalculated: b,
|
|
25
|
+
setChipSizeIsRecalculated: $,
|
|
26
|
+
chips: o,
|
|
27
|
+
editConfig: f,
|
|
28
|
+
handleAddNewChip: w,
|
|
29
|
+
handleEditChip: T,
|
|
30
|
+
handleRemoveChip: j,
|
|
31
|
+
handleShowElements: C,
|
|
32
|
+
handleToEditMode: x,
|
|
33
|
+
isEditable: t = !1,
|
|
34
|
+
name: _,
|
|
35
|
+
setChipsSizes: F,
|
|
36
|
+
setEditConfig: V,
|
|
37
|
+
shortChips: E = !1,
|
|
38
|
+
showChips: S,
|
|
39
|
+
showHiddenChips: A,
|
|
40
|
+
validateFields: H,
|
|
41
|
+
validationRules: s = {}
|
|
42
|
+
}, { chipsCellRef: y, chipsWrapperRef: I, hiddenChipsCounterRef: N, hiddenChipsPopUpRef: P }) => {
|
|
43
|
+
var k;
|
|
44
|
+
const z = p(
|
|
42
45
|
"button-add",
|
|
43
46
|
e.background && `button-add-background_${e.background}`,
|
|
44
47
|
e.borderColor && `button-add-border_${e.borderColor}`,
|
|
45
48
|
e.font && `button-add-font_${e.font}`,
|
|
46
49
|
e.density && `button-add-density_${e.density}`
|
|
47
|
-
),
|
|
50
|
+
), B = p(
|
|
51
|
+
"chips-wrapper",
|
|
52
|
+
t && "fixed-max-width",
|
|
53
|
+
((k = o.visibleChips) == null ? void 0 : k.length) > 0 && !b && "chip_invisible"
|
|
54
|
+
), R = p(
|
|
48
55
|
"chip",
|
|
49
56
|
"chip__content",
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
t && "data-ellipsis",
|
|
58
|
+
E && "chip_short",
|
|
59
|
+
o.hiddenChips && "chip_hidden",
|
|
53
60
|
e.density && `chip-density_${e.density}`,
|
|
54
61
|
e.borderRadius && `chip-border_${e.borderRadius}`,
|
|
55
62
|
e.background && `chip-background_${e.background}`,
|
|
56
63
|
e.borderColor && `chip-border_${e.borderColor}`,
|
|
57
64
|
e.font && `chip-font_${e.font}`,
|
|
58
|
-
|
|
59
|
-
(
|
|
65
|
+
t && "editable",
|
|
66
|
+
(S || t) && "chip_visible"
|
|
60
67
|
);
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
let
|
|
63
|
-
return !
|
|
64
|
-
...
|
|
65
|
-
key: [...
|
|
66
|
-
}), (
|
|
67
|
-
|
|
68
|
-
var
|
|
69
|
-
const
|
|
70
|
-
return c < ((
|
|
71
|
-
|
|
68
|
+
return /* @__PURE__ */ i(J, { name: _, validate: H, children: ({ fields: a, meta: D }) => {
|
|
69
|
+
let v = { ...s };
|
|
70
|
+
return !L(s) && s.key.every((l) => l.name !== g.name) && (v = {
|
|
71
|
+
...s,
|
|
72
|
+
key: [...s.key, g]
|
|
73
|
+
}), (t || !Z(a)) && /* @__PURE__ */ i("div", { className: "chips-cell", ref: y, children: /* @__PURE__ */ m("div", { className: B, ref: I, children: [
|
|
74
|
+
a.map((l, c) => {
|
|
75
|
+
var q;
|
|
76
|
+
const d = a.value[c];
|
|
77
|
+
return c < ((q = o.visibleChips) == null ? void 0 : q.length) && /* @__PURE__ */ i("div", { className: "chip-block", children: /* @__PURE__ */ i(
|
|
78
|
+
X,
|
|
72
79
|
{
|
|
73
|
-
hidden:
|
|
74
|
-
template: /* @__PURE__ */
|
|
75
|
-
|
|
80
|
+
hidden: f.isEdit && !d.tooltip,
|
|
81
|
+
template: /* @__PURE__ */ i(
|
|
82
|
+
W,
|
|
76
83
|
{
|
|
77
|
-
text:
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
!
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */
|
|
84
|
+
text: d.tooltip || /* @__PURE__ */ m("span", { className: "chip__content", children: [
|
|
85
|
+
/* @__PURE__ */ i("span", { className: "chip__content-item", children: d.key }),
|
|
86
|
+
!d.isKeyOnly && /* @__PURE__ */ m(M, { children: [
|
|
87
|
+
/* @__PURE__ */ i("span", { className: "chip__delimiter", children: d.delimiter ? d.delimiter : ":" }),
|
|
88
|
+
/* @__PURE__ */ i("span", { className: "chip__content-item", children: d.value })
|
|
82
89
|
] })
|
|
83
90
|
] })
|
|
84
91
|
}
|
|
85
92
|
),
|
|
86
|
-
children: /* @__PURE__ */
|
|
87
|
-
|
|
93
|
+
children: /* @__PURE__ */ i(
|
|
94
|
+
Q,
|
|
88
95
|
{
|
|
89
|
-
chip:
|
|
96
|
+
chip: d,
|
|
97
|
+
chipSizeIsRecalculated: b,
|
|
98
|
+
setChipSizeIsRecalculated: $,
|
|
90
99
|
chipIndex: c,
|
|
91
100
|
chipOptions: e,
|
|
92
|
-
editConfig:
|
|
93
|
-
handleEditChip: (u, h,
|
|
94
|
-
handleRemoveChip: (u, h) =>
|
|
95
|
-
handleToEditMode:
|
|
96
|
-
isEditable:
|
|
101
|
+
editConfig: f,
|
|
102
|
+
handleEditChip: (u, h, K) => T(u, a, h, K),
|
|
103
|
+
handleRemoveChip: (u, h) => j(u, a, h),
|
|
104
|
+
handleToEditMode: x,
|
|
105
|
+
isEditable: t,
|
|
97
106
|
keyName: `${l}.key`,
|
|
98
|
-
meta:
|
|
107
|
+
meta: D,
|
|
99
108
|
ref: y,
|
|
100
|
-
setChipsSizes:
|
|
101
|
-
setEditConfig:
|
|
102
|
-
validationRules:
|
|
109
|
+
setChipsSizes: F,
|
|
110
|
+
setEditConfig: V,
|
|
111
|
+
validationRules: v,
|
|
103
112
|
valueName: `${l}.value`
|
|
104
113
|
}
|
|
105
114
|
)
|
|
106
115
|
},
|
|
107
|
-
|
|
108
|
-
) },
|
|
116
|
+
d.id
|
|
117
|
+
) }, d.id);
|
|
109
118
|
}),
|
|
110
119
|
/* @__PURE__ */ m("div", { className: "chip-block", children: [
|
|
111
|
-
|
|
112
|
-
|
|
120
|
+
o.hiddenChips.length > 0 && A && /* @__PURE__ */ i(
|
|
121
|
+
U,
|
|
113
122
|
{
|
|
114
|
-
chipClassNames:
|
|
123
|
+
chipClassNames: R,
|
|
115
124
|
chipOptions: e,
|
|
116
|
-
chips:
|
|
117
|
-
handleShowElements:
|
|
118
|
-
ref: { hiddenChipsCounterRef:
|
|
125
|
+
chips: o.hiddenChips,
|
|
126
|
+
handleShowElements: C,
|
|
127
|
+
ref: { hiddenChipsCounterRef: N, hiddenChipsPopUpRef: P },
|
|
119
128
|
textOverflowEllipsis: !0
|
|
120
129
|
}
|
|
121
130
|
),
|
|
122
|
-
|
|
131
|
+
o.hiddenChipsNumber && /* @__PURE__ */ i(
|
|
123
132
|
"span",
|
|
124
133
|
{
|
|
125
|
-
ref:
|
|
126
|
-
className: `${
|
|
127
|
-
onClick:
|
|
128
|
-
children:
|
|
134
|
+
ref: N,
|
|
135
|
+
className: `${R} chips_button`,
|
|
136
|
+
onClick: C,
|
|
137
|
+
children: o.hiddenChipsNumber
|
|
129
138
|
}
|
|
130
139
|
)
|
|
131
140
|
] }),
|
|
132
|
-
|
|
141
|
+
t && /* @__PURE__ */ i(
|
|
133
142
|
"button",
|
|
134
143
|
{
|
|
135
|
-
"data-testid": `${
|
|
136
|
-
className:
|
|
137
|
-
onClick: (l) =>
|
|
138
|
-
children: /* @__PURE__ */
|
|
144
|
+
"data-testid": `${_}-add-chip`,
|
|
145
|
+
className: z,
|
|
146
|
+
onClick: (l) => w(l, a),
|
|
147
|
+
children: /* @__PURE__ */ i(O, {})
|
|
139
148
|
}
|
|
140
149
|
)
|
|
141
150
|
] }) });
|
|
142
151
|
} });
|
|
143
152
|
};
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
chipOptions:
|
|
153
|
+
n = G(n);
|
|
154
|
+
n.displayName = "FormChipCellView";
|
|
155
|
+
n.propTypes = {
|
|
156
|
+
chipOptions: Y,
|
|
157
|
+
chipSizeIsRecalculated: r.bool.isRequired,
|
|
158
|
+
setChipSizeIsRecalculated: r.func.isRequired,
|
|
148
159
|
chips: r.object.isRequired,
|
|
149
160
|
editConfig: r.object.isRequired,
|
|
161
|
+
formState: r.object.isRequired,
|
|
150
162
|
handleAddNewChip: r.func.isRequired,
|
|
151
163
|
handleEditChip: r.func.isRequired,
|
|
152
164
|
handleRemoveChip: r.func.isRequired,
|
|
@@ -162,8 +174,8 @@ s.propTypes = {
|
|
|
162
174
|
validateFields: r.func.isRequired,
|
|
163
175
|
validationRules: r.object
|
|
164
176
|
};
|
|
165
|
-
const
|
|
177
|
+
const pe = n;
|
|
166
178
|
export {
|
|
167
|
-
|
|
179
|
+
pe as default
|
|
168
180
|
};
|
|
169
181
|
//# sourceMappingURL=FormChipCellView.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormChipCellView.mjs","sources":["../../../src/lib/components/FormChipCell/FormChipCellView.jsx"],"sourcesContent":["/*\nCopyright 2022 Iguazio Systems Ltd.\nLicensed under the Apache License, Version 2.0 (the \"License\") with\nan addition restriction as set forth herein. You may not use this\nfile except in compliance with the License. You may obtain a copy of\nthe License at http://www.apache.org/licenses/LICENSE-2.0.\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied. See the License for the specific language governing\npermissions and limitations under the License.\nIn addition, you may not use the software for any purposes that are\nillegal under applicable law, and the grant of the foregoing license\nunder the Apache 2.0 license is conditioned upon your compliance with\nsuch restriction.\n*/\nimport React, { forwardRef } from 'react'\nimport PropTypes from 'prop-types'\nimport classnames from 'classnames'\nimport { FieldArray } from 'react-final-form-arrays'\nimport { isEmpty } from 'lodash'\n\nimport FormChip from './FormChip/FormChip'\nimport HiddenChipsBlock from './HiddenChipsBlock/HiddenChipsBlock'\nimport TextTooltipTemplate from '../TooltipTemplate/TextTooltipTemplate'\nimport Tooltip from '../Tooltip/Tooltip'\n\nimport { CHIP_OPTIONS } from '../../types'\nimport { isEveryObjectValueEmpty } from '../../utils/common.util'\nimport { uniquenessError } from './formChipCell.util'\n\nimport Add from '../../images/add.svg?react'\n\nlet FormChipCellView = (\n {\n chipOptions = {\n background: 'purple',\n boldValue: false,\n borderRadius: 'primary',\n borderColor: 'transparent',\n density: 'dense',\n font: 'purple'\n },\n chips,\n editConfig,\n handleAddNewChip,\n handleEditChip,\n handleRemoveChip,\n handleShowElements,\n handleToEditMode,\n isEditable = false,\n name,\n setChipsSizes,\n setEditConfig,\n shortChips = false,\n showChips,\n showHiddenChips,\n validateFields,\n validationRules = {}\n },\n { chipsCellRef, chipsWrapperRef, hiddenChipsCounterRef, hiddenChipsPopUpRef }\n) => {\n const buttonAddClassNames = classnames(\n 'button-add',\n chipOptions.background && `button-add-background_${chipOptions.background}`,\n chipOptions.borderColor && `button-add-border_${chipOptions.borderColor}`,\n chipOptions.font && `button-add-font_${chipOptions.font}`,\n chipOptions.density && `button-add-density_${chipOptions.density}`\n )\n const wrapperClassNames = classnames('chips-wrapper', isEditable && 'fixed-max-width')\n const chipClassNames = classnames(\n 'chip',\n 'chip__content',\n isEditable && 'data-ellipsis',\n shortChips && 'chip_short',\n chips.hiddenChips && 'chip_hidden',\n chipOptions.density && `chip-density_${chipOptions.density}`,\n chipOptions.borderRadius && `chip-border_${chipOptions.borderRadius}`,\n chipOptions.background && `chip-background_${chipOptions.background}`,\n chipOptions.borderColor && `chip-border_${chipOptions.borderColor}`,\n chipOptions.font && `chip-font_${chipOptions.font}`,\n isEditable && 'editable',\n (showChips || isEditable) && 'chip_visible'\n )\n\n return (\n <FieldArray name={name} validate={validateFields}>\n {({ fields, meta }) => {\n let newValidationRules = { ...validationRules }\n\n if (\n !isEmpty(validationRules) &&\n validationRules.key.every(rule => rule.name !== uniquenessError.name)\n ) {\n newValidationRules = {\n ...validationRules,\n key: [...validationRules.key, uniquenessError]\n }\n }\n\n return (\n (isEditable || !isEveryObjectValueEmpty(fields)) && (\n <div className=\"chips-cell\" ref={chipsCellRef}>\n <div className={wrapperClassNames} ref={chipsWrapperRef}>\n {fields.map((contentItem, index) => {\n const chipData = fields.value[index]\n\n return (\n index < chips.visibleChips?.length && (\n <div className=\"chip-block\" key={chipData.id}>\n <Tooltip\n hidden={editConfig.isEdit && !chipData.tooltip}\n key={chipData.id}\n template={\n <TextTooltipTemplate\n text={\n chipData.tooltip || (\n <span className=\"chip__content\">\n <span className=\"chip__content-item\">{chipData.key}</span>\n {!chipData.isKeyOnly && (\n <>\n <span className=\"chip__delimiter\">\n {chipData.delimiter ? chipData.delimiter : ':'}\n </span>\n <span className=\"chip__content-item\">{chipData.value}</span>\n </>\n )}\n </span>\n )\n }\n />\n }\n >\n <FormChip\n chip={chipData}\n chipIndex={index}\n chipOptions={chipOptions}\n editConfig={editConfig}\n handleEditChip={(event, nameEvent, isOutsideClick) =>\n handleEditChip(event, fields, nameEvent, isOutsideClick)\n }\n handleRemoveChip={(event, index) =>\n handleRemoveChip(event, fields, index)\n }\n handleToEditMode={handleToEditMode}\n isEditable={isEditable}\n keyName={`${contentItem}.key`}\n meta={meta}\n ref={chipsCellRef}\n setChipsSizes={setChipsSizes}\n setEditConfig={setEditConfig}\n validationRules={newValidationRules}\n valueName={`${contentItem}.value`}\n />\n </Tooltip>\n </div>\n )\n )\n })}\n\n <div className=\"chip-block\">\n {chips.hiddenChips.length > 0 && showHiddenChips && (\n <HiddenChipsBlock\n chipClassNames={chipClassNames}\n chipOptions={chipOptions}\n chips={chips.hiddenChips}\n handleShowElements={handleShowElements}\n ref={{ hiddenChipsCounterRef, hiddenChipsPopUpRef }}\n textOverflowEllipsis\n />\n )}\n {chips.hiddenChipsNumber && (\n <span\n ref={hiddenChipsCounterRef}\n className={`${chipClassNames} chips_button`}\n onClick={handleShowElements}\n >\n {chips.hiddenChipsNumber}\n </span>\n )}\n </div>\n\n {isEditable && (\n <button\n data-testid={`${name}-add-chip`}\n className={buttonAddClassNames}\n onClick={e => handleAddNewChip(e, fields)}\n >\n <Add />\n </button>\n )}\n </div>\n </div>\n )\n )\n }}\n </FieldArray>\n )\n}\n\nFormChipCellView = forwardRef(FormChipCellView)\n\nFormChipCellView.displayName = 'FormChipCellView'\n\nFormChipCellView.propTypes = {\n chipOptions: CHIP_OPTIONS,\n chips: PropTypes.object.isRequired,\n editConfig: PropTypes.object.isRequired,\n handleAddNewChip: PropTypes.func.isRequired,\n handleEditChip: PropTypes.func.isRequired,\n handleRemoveChip: PropTypes.func.isRequired,\n handleShowElements: PropTypes.func.isRequired,\n handleToEditMode: PropTypes.func.isRequired,\n isEditable: PropTypes.bool,\n name: PropTypes.string.isRequired,\n setChipsSizes: PropTypes.func.isRequired,\n setEditConfig: PropTypes.func.isRequired,\n shortChips: PropTypes.bool,\n showChips: PropTypes.bool.isRequired,\n showHiddenChips: PropTypes.bool.isRequired,\n validateFields: PropTypes.func.isRequired,\n validationRules: PropTypes.object\n}\n\nexport default FormChipCellView\n"],"names":["FormChipCellView","chipOptions","chips","editConfig","handleAddNewChip","handleEditChip","handleRemoveChip","handleShowElements","handleToEditMode","isEditable","name","setChipsSizes","setEditConfig","shortChips","showChips","showHiddenChips","validateFields","validationRules","chipsCellRef","chipsWrapperRef","hiddenChipsCounterRef","hiddenChipsPopUpRef","buttonAddClassNames","classnames","wrapperClassNames","chipClassNames","jsx","FieldArray","fields","meta","newValidationRules","isEmpty","rule","uniquenessError","isEveryObjectValueEmpty","jsxs","contentItem","index","chipData","_a","Tooltip","TextTooltipTemplate","Fragment","FormChip","event","nameEvent","isOutsideClick","HiddenChipsBlock","e","Add","forwardRef","CHIP_OPTIONS","PropTypes","FormChipCellView$1"],"mappings":";;;;;;;;;;;;;;AAiCA,IAAIA,IAAmB,CACrB;AAAA,EACE,aAAAC,IAAc;AAAA,IACZ,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,aAAa;AAAA,IACb,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,MAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,WAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,iBAA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AU,KAAK;AAAA,EACjC,oBAAoBA,EAAU,KAAK;AAAA,EACnC,kBAAkBA,EAAU,KAAK;AAAA,EACjC,YAAYA,EAAU;AAAA,EACtB,MAAMA,EAAU,OAAO;AAAA,EACvB,eAAeA,EAAU,KAAK;AAAA,EAC9B,eAAeA,EAAU,KAAK;AAAA,EAC9B,YAAYA,EAAU;AAAA,EACtB,WAAWA,EAAU,KAAK;AAAA,EAC1B,iBAAiBA,EAAU,KAAK;AAAA,EAChC,gBAAgBA,EAAU,KAAK;AAAA,EAC/B,iBAAiBA,EAAU;AAC7B;AAEA,MAAAC,KAAerD;"}
|
|
1
|
+
{"version":3,"file":"FormChipCellView.mjs","sources":["../../../src/lib/components/FormChipCell/FormChipCellView.jsx"],"sourcesContent":["/*\nCopyright 2022 Iguazio Systems Ltd.\nLicensed under the Apache License, Version 2.0 (the \"License\") with\nan addition restriction as set forth herein. You may not use this\nfile except in compliance with the License. You may obtain a copy of\nthe License at http://www.apache.org/licenses/LICENSE-2.0.\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied. See the License for the specific language governing\npermissions and limitations under the License.\nIn addition, you may not use the software for any purposes that are\nillegal under applicable law, and the grant of the foregoing license\nunder the Apache 2.0 license is conditioned upon your compliance with\nsuch restriction.\n*/\nimport React, { forwardRef } from 'react'\nimport PropTypes from 'prop-types'\nimport classnames from 'classnames'\nimport { FieldArray } from 'react-final-form-arrays'\nimport { isEmpty } from 'lodash'\n\nimport FormChip from './FormChip/FormChip'\nimport HiddenChipsBlock from './HiddenChipsBlock/HiddenChipsBlock'\nimport TextTooltipTemplate from '../TooltipTemplate/TextTooltipTemplate'\nimport Tooltip from '../Tooltip/Tooltip'\n\nimport { CHIP_OPTIONS } from '../../types'\nimport { isEveryObjectValueEmpty } from '../../utils/common.util'\nimport { uniquenessError } from './formChipCell.util'\n\nimport Add from '../../images/add.svg?react'\n\nlet FormChipCellView = (\n {\n chipOptions = {\n background: 'purple',\n boldValue: false,\n borderRadius: 'primary',\n borderColor: 'transparent',\n density: 'dense',\n font: 'purple'\n },\n chipSizeIsRecalculated,\n setChipSizeIsRecalculated,\n chips,\n editConfig,\n handleAddNewChip,\n handleEditChip,\n handleRemoveChip,\n handleShowElements,\n handleToEditMode,\n isEditable = false,\n name,\n setChipsSizes,\n setEditConfig,\n shortChips = false,\n showChips,\n showHiddenChips,\n validateFields,\n validationRules = {}\n },\n { chipsCellRef, chipsWrapperRef, hiddenChipsCounterRef, hiddenChipsPopUpRef }\n) => {\n const buttonAddClassNames = classnames(\n 'button-add',\n chipOptions.background && `button-add-background_${chipOptions.background}`,\n chipOptions.borderColor && `button-add-border_${chipOptions.borderColor}`,\n chipOptions.font && `button-add-font_${chipOptions.font}`,\n chipOptions.density && `button-add-density_${chipOptions.density}`\n )\n const wrapperClassNames = classnames(\n 'chips-wrapper',\n isEditable && 'fixed-max-width',\n chips.visibleChips?.length > 0 && !chipSizeIsRecalculated && 'chip_invisible'\n )\n const chipClassNames = classnames(\n 'chip',\n 'chip__content',\n isEditable && 'data-ellipsis',\n shortChips && 'chip_short',\n chips.hiddenChips && 'chip_hidden',\n chipOptions.density && `chip-density_${chipOptions.density}`,\n chipOptions.borderRadius && `chip-border_${chipOptions.borderRadius}`,\n chipOptions.background && `chip-background_${chipOptions.background}`,\n chipOptions.borderColor && `chip-border_${chipOptions.borderColor}`,\n chipOptions.font && `chip-font_${chipOptions.font}`,\n isEditable && 'editable',\n (showChips || isEditable) && 'chip_visible'\n )\n\n return (\n <FieldArray name={name} validate={validateFields}>\n {({ fields, meta }) => {\n let newValidationRules = { ...validationRules }\n\n if (\n !isEmpty(validationRules) &&\n validationRules.key.every(rule => rule.name !== uniquenessError.name)\n ) {\n newValidationRules = {\n ...validationRules,\n key: [...validationRules.key, uniquenessError]\n }\n }\n\n return (\n (isEditable || !isEveryObjectValueEmpty(fields)) && (\n <div className=\"chips-cell\" ref={chipsCellRef}>\n <div className={wrapperClassNames} ref={chipsWrapperRef}>\n {fields.map((contentItem, index) => {\n const chipData = fields.value[index]\n\n return (\n index < chips.visibleChips?.length && (\n <div className=\"chip-block\" key={chipData.id}>\n <Tooltip\n hidden={editConfig.isEdit && !chipData.tooltip}\n key={chipData.id}\n template={\n <TextTooltipTemplate\n text={\n chipData.tooltip || (\n <span className=\"chip__content\">\n <span className=\"chip__content-item\">{chipData.key}</span>\n {!chipData.isKeyOnly && (\n <>\n <span className=\"chip__delimiter\">\n {chipData.delimiter ? chipData.delimiter : ':'}\n </span>\n <span className=\"chip__content-item\">{chipData.value}</span>\n </>\n )}\n </span>\n )\n }\n />\n }\n >\n <FormChip\n chip={chipData}\n chipSizeIsRecalculated={chipSizeIsRecalculated}\n setChipSizeIsRecalculated={setChipSizeIsRecalculated}\n chipIndex={index}\n chipOptions={chipOptions}\n editConfig={editConfig}\n handleEditChip={(event, nameEvent, isOutsideClick) =>\n handleEditChip(event, fields, nameEvent, isOutsideClick)\n }\n handleRemoveChip={(event, index) =>\n handleRemoveChip(event, fields, index)\n }\n handleToEditMode={handleToEditMode}\n isEditable={isEditable}\n keyName={`${contentItem}.key`}\n meta={meta}\n ref={chipsCellRef}\n setChipsSizes={setChipsSizes}\n setEditConfig={setEditConfig}\n validationRules={newValidationRules}\n valueName={`${contentItem}.value`}\n />\n </Tooltip>\n </div>\n )\n )\n })}\n\n <div className=\"chip-block\">\n {chips.hiddenChips.length > 0 && showHiddenChips && (\n <HiddenChipsBlock\n chipClassNames={chipClassNames}\n chipOptions={chipOptions}\n chips={chips.hiddenChips}\n handleShowElements={handleShowElements}\n ref={{ hiddenChipsCounterRef, hiddenChipsPopUpRef }}\n textOverflowEllipsis\n />\n )}\n {chips.hiddenChipsNumber && (\n <span\n ref={hiddenChipsCounterRef}\n className={`${chipClassNames} chips_button`}\n onClick={handleShowElements}\n >\n {chips.hiddenChipsNumber}\n </span>\n )}\n </div>\n\n {isEditable && (\n <button\n data-testid={`${name}-add-chip`}\n className={buttonAddClassNames}\n onClick={e => handleAddNewChip(e, fields)}\n >\n <Add />\n </button>\n )}\n </div>\n </div>\n )\n )\n }}\n </FieldArray>\n )\n}\n\nFormChipCellView = forwardRef(FormChipCellView)\n\nFormChipCellView.displayName = 'FormChipCellView'\n\nFormChipCellView.propTypes = {\n chipOptions: CHIP_OPTIONS,\n chipSizeIsRecalculated: PropTypes.bool.isRequired,\n setChipSizeIsRecalculated: PropTypes.func.isRequired,\n chips: PropTypes.object.isRequired,\n editConfig: PropTypes.object.isRequired,\n formState: PropTypes.object.isRequired,\n handleAddNewChip: PropTypes.func.isRequired,\n handleEditChip: PropTypes.func.isRequired,\n handleRemoveChip: PropTypes.func.isRequired,\n handleShowElements: PropTypes.func.isRequired,\n handleToEditMode: PropTypes.func.isRequired,\n isEditable: PropTypes.bool,\n name: PropTypes.string.isRequired,\n setChipsSizes: PropTypes.func.isRequired,\n setEditConfig: PropTypes.func.isRequired,\n shortChips: PropTypes.bool,\n showChips: PropTypes.bool.isRequired,\n showHiddenChips: PropTypes.bool.isRequired,\n validateFields: PropTypes.func.isRequired,\n validationRules: PropTypes.object\n}\n\nexport default FormChipCellView\n"],"names":["FormChipCellView","chipOptions","chipSizeIsRecalculated","setChipSizeIsRecalculated","chips","editConfig","handleAddNewChip","handleEditChip","handleRemoveChip","handleShowElements","handleToEditMode","isEditable","name","setChipsSizes","setEditConfig","shortChips","showChips","showHiddenChips","validateFields","validationRules","chipsCellRef","chipsWrapperRef","hiddenChipsCounterRef","hiddenChipsPopUpRef","buttonAddClassNames","classnames","wrapperClassNames","_a","chipClassNames","jsx","FieldArray","fields","meta","newValidationRules","isEmpty","rule","uniquenessError","isEveryObjectValueEmpty","jsxs","contentItem","index","chipData","Tooltip","TextTooltipTemplate","Fragment","FormChip","event","nameEvent","isOutsideClick","HiddenChipsBlock","e","Add","forwardRef","CHIP_OPTIONS","PropTypes","FormChipCellView$1"],"mappings":";;;;;;;;;;;;;;AAiCA,I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oveChip, isEditable, keyName, meta, onChange, setEditConfig, validationRules: rules, valueName }: {
|
|
2
|
+
declare function NewChipForm({ chip, chipIndex, chipOptions, className, editConfig, handleRemoveChip, isEditable, keyName, meta, onChange, setChipSizeIsRecalculated, setEditConfig, validationRules: rules, valueName }: {
|
|
3
3
|
chip: any;
|
|
4
4
|
chipIndex: any;
|
|
5
5
|
chipOptions: any;
|
|
@@ -10,6 +10,7 @@ declare function NewChipForm({ chip, chipIndex, chipOptions, className, editConf
|
|
|
10
10
|
keyName: any;
|
|
11
11
|
meta: any;
|
|
12
12
|
onChange: any;
|
|
13
|
+
setChipSizeIsRecalculated: any;
|
|
13
14
|
setEditConfig: any;
|
|
14
15
|
validationRules?: {};
|
|
15
16
|
valueName: any;
|
|
@@ -27,6 +28,7 @@ declare namespace NewChipForm {
|
|
|
27
28
|
let keyName: any;
|
|
28
29
|
let meta: any;
|
|
29
30
|
let onChange: any;
|
|
31
|
+
let setChipSizeIsRecalculated: any;
|
|
30
32
|
let setEditConfig: any;
|
|
31
33
|
let validationRules: any;
|
|
32
34
|
let valueName: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewChipForm.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/FormChipCell/NewChipForm/NewChipForm.jsx"],"names":[],"mappings":";AA6CA
|
|
1
|
+
{"version":3,"file":"NewChipForm.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/FormChipCell/NewChipForm/NewChipForm.jsx"],"names":[],"mappings":";AA6CA;;;;;;;;;;;;;;;0BAsaC"}
|