iguazio.dashboard-react-controls 3.1.6 → 3.1.7
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/scss/common.scss
CHANGED
|
@@ -221,6 +221,8 @@ a {
|
|
|
221
221
|
min-width: 800px;
|
|
222
222
|
padding: 15px 24px 10px;
|
|
223
223
|
background-color: colors.$white;
|
|
224
|
+
overflow: auto;
|
|
225
|
+
min-height: 0;
|
|
224
226
|
|
|
225
227
|
@include mixins.displayFlex;
|
|
226
228
|
|
|
@@ -263,12 +265,14 @@ a {
|
|
|
263
265
|
flex: 1 1;
|
|
264
266
|
flex-direction: column;
|
|
265
267
|
min-width: 100%;
|
|
268
|
+
min-height: 0;
|
|
266
269
|
}
|
|
267
270
|
|
|
268
271
|
&__action-bar-wrapper {
|
|
269
272
|
display: flex;
|
|
270
273
|
flex-flow: row wrap;
|
|
271
274
|
align-items: center;
|
|
275
|
+
background-color: colors.$white;
|
|
272
276
|
|
|
273
277
|
&_hidden {
|
|
274
278
|
display: none;
|
|
@@ -283,27 +287,6 @@ a {
|
|
|
283
287
|
white-space: nowrap;
|
|
284
288
|
}
|
|
285
289
|
}
|
|
286
|
-
|
|
287
|
-
.action-bar {
|
|
288
|
-
display: flex;
|
|
289
|
-
flex: 1;
|
|
290
|
-
align-items: flex-start;
|
|
291
|
-
justify-content: flex-end;
|
|
292
|
-
width: 100%;
|
|
293
|
-
margin-bottom: 15px;
|
|
294
|
-
|
|
295
|
-
&_hidden {
|
|
296
|
-
display: none;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
&__filters {
|
|
300
|
-
&-item {
|
|
301
|
-
&:not(:last-child) {
|
|
302
|
-
margin: 0 15px 0 0;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
290
|
}
|
|
308
291
|
|
|
309
292
|
&__history-back-link-wrapper {
|
|
@@ -313,6 +296,27 @@ a {
|
|
|
313
296
|
max-width: 100%;
|
|
314
297
|
}
|
|
315
298
|
}
|
|
299
|
+
|
|
300
|
+
.action-bar {
|
|
301
|
+
display: flex;
|
|
302
|
+
flex: 1;
|
|
303
|
+
align-items: flex-start;
|
|
304
|
+
justify-content: flex-end;
|
|
305
|
+
width: 100%;
|
|
306
|
+
margin-bottom: 15px;
|
|
307
|
+
|
|
308
|
+
&_hidden {
|
|
309
|
+
display: none;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
&__filters {
|
|
313
|
+
&-item {
|
|
314
|
+
&:not(:last-child) {
|
|
315
|
+
margin: 0 15px 0 0;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
316
320
|
}
|
|
317
321
|
|
|
318
322
|
/* =========== CONTENT MENU ============= */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.util.d.ts","sourceRoot":"","sources":["../../src/lib/utils/form.util.js"],"names":[],"mappings":"AAkBO,2DAUN;AAEM,+EAaN;AAEM,sEAMN;AAEM;;;;;IASN;AAEM,sDAEN"}
|
|
1
|
+
{"version":3,"file":"form.util.d.ts","sourceRoot":"","sources":["../../src/lib/utils/form.util.js"],"names":[],"mappings":"AAkBO,2DAUN;AAEM,+EAaN;AAEM,sEAMN;AAEM;;;;;IASN;AAEM,sDAEN;AAUM,sEAIN"}
|
package/dist/utils/form.util.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { set as u, isEqual as l, mapValues as
|
|
2
|
-
const
|
|
1
|
+
import { set as u, isEqual as l, mapValues as m, some as c, get as d, isNil as o, isEmpty as y } from "lodash";
|
|
2
|
+
const b = (e, t) => {
|
|
3
3
|
let r = e[0], i = e[1], n = t.fields[r];
|
|
4
4
|
if (n)
|
|
5
5
|
for (let s in i)
|
|
6
6
|
u(n, s, i[s]);
|
|
7
|
-
},
|
|
7
|
+
}, O = (e, t) => {
|
|
8
8
|
const r = (i, n) => {
|
|
9
9
|
if (n !== "")
|
|
10
10
|
return n;
|
|
@@ -13,17 +13,18 @@ const p = (e, t) => {
|
|
|
13
13
|
JSON.stringify(a(e), r),
|
|
14
14
|
JSON.stringify(a(t), r)
|
|
15
15
|
);
|
|
16
|
-
},
|
|
16
|
+
}, F = (e = []) => e.reduce((t, r) => (t[r.data.key] = r.data.value, t), {}), g = (e = {}) => Object.entries(e).map(([t, r]) => ({
|
|
17
17
|
data: {
|
|
18
18
|
key: t,
|
|
19
19
|
value: r
|
|
20
20
|
}
|
|
21
|
-
})),
|
|
21
|
+
})), E = (e) => e.submitting || e.invalid && e.submitFailed, a = (e = {}) => m(e, (t) => Array.isArray(t) ? f(t) : t), f = (e = []) => e.filter((t) => c(d(t, "data", t), (r) => !o(r) && !y(r)));
|
|
22
22
|
export {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
F as
|
|
23
|
+
O as areFormValuesChanged,
|
|
24
|
+
f as clearArrayFromEmptyObjectElements,
|
|
25
|
+
F as generateObjectFromKeyValue,
|
|
26
|
+
E as isSubmitDisabled,
|
|
26
27
|
g as parseObjectToKeyValue,
|
|
27
|
-
|
|
28
|
+
b as setFieldState
|
|
28
29
|
};
|
|
29
30
|
//# sourceMappingURL=form.util.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.util.mjs","sources":["../../src/lib/utils/form.util.js"],"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 { get, isEmpty, isEqual, isNil, mapValues, set, some } from 'lodash'\n\nexport const setFieldState = (args, state) => {\n let fieldName = args[0]\n let states = args[1]\n let field = state.fields[fieldName]\n\n if (field) {\n for (let stateName in states) {\n set(field, stateName, states[stateName])\n }\n }\n}\n\nexport const areFormValuesChanged = (initialValues, values) => {\n const replacer = (key, value) => {\n if (value === '') {\n return undefined\n }\n\n return value\n }\n\n return !isEqual(\n JSON.stringify(clearObjectFromEmptyArrayElements(initialValues), replacer),\n JSON.stringify(clearObjectFromEmptyArrayElements(values), replacer)\n )\n}\n\nexport const generateObjectFromKeyValue = (keyValueList = []) => {\n return keyValueList.reduce((acc, keyValue) => {\n acc[keyValue.data.key] = keyValue.data.value\n\n return acc\n }, {})\n}\n\nexport const parseObjectToKeyValue = (object = {}) => {\n return Object.entries(object).map(([key, value]) => {\n return {\n data: {\n key,\n value\n }\n }\n })\n}\n\nexport const isSubmitDisabled = formState => {\n return formState.submitting || (formState.invalid && formState.submitFailed)\n}\n\nconst clearObjectFromEmptyArrayElements = (obj = {}) => {\n return mapValues(obj, objValue => {\n if (!Array.isArray(objValue)) return objValue\n\n return objValue.filter(arrayElement => {\n
|
|
1
|
+
{"version":3,"file":"form.util.mjs","sources":["../../src/lib/utils/form.util.js"],"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 { get, isEmpty, isEqual, isNil, mapValues, set, some } from 'lodash'\n\nexport const setFieldState = (args, state) => {\n let fieldName = args[0]\n let states = args[1]\n let field = state.fields[fieldName]\n\n if (field) {\n for (let stateName in states) {\n set(field, stateName, states[stateName])\n }\n }\n}\n\nexport const areFormValuesChanged = (initialValues, values) => {\n const replacer = (key, value) => {\n if (value === '') {\n return undefined\n }\n\n return value\n }\n\n return !isEqual(\n JSON.stringify(clearObjectFromEmptyArrayElements(initialValues), replacer),\n JSON.stringify(clearObjectFromEmptyArrayElements(values), replacer)\n )\n}\n\nexport const generateObjectFromKeyValue = (keyValueList = []) => {\n return keyValueList.reduce((acc, keyValue) => {\n acc[keyValue.data.key] = keyValue.data.value\n\n return acc\n }, {})\n}\n\nexport const parseObjectToKeyValue = (object = {}) => {\n return Object.entries(object).map(([key, value]) => {\n return {\n data: {\n key,\n value\n }\n }\n })\n}\n\nexport const isSubmitDisabled = formState => {\n return formState.submitting || (formState.invalid && formState.submitFailed)\n}\n\nconst clearObjectFromEmptyArrayElements = (obj = {}) => {\n return mapValues(obj, objValue => {\n if (!Array.isArray(objValue)) return objValue\n\n return clearArrayFromEmptyObjectElements(objValue)\n })\n}\n\nexport const clearArrayFromEmptyObjectElements = (arr = []) => {\n return arr.filter(arrayElement => {\n return some(get(arrayElement, 'data', arrayElement), val => !isNil(val) && !isEmpty(val))\n })\n}\n"],"names":["setFieldState","args","state","fieldName","states","field","stateName","set","areFormValuesChanged","initialValues","values","replacer","key","value","isEqual","clearObjectFromEmptyArrayElements","generateObjectFromKeyValue","keyValueList","acc","keyValue","parseObjectToKeyValue","object","isSubmitDisabled","formState","obj","mapValues","objValue","clearArrayFromEmptyObjectElements","arr","arrayElement","some","get","val","isNil","isEmpty"],"mappings":";AAkBY,MAACA,IAAgB,CAACC,GAAMC,MAAU;AAC5C,MAAIC,IAAYF,EAAK,CAAC,GAClBG,IAASH,EAAK,CAAC,GACfI,IAAQH,EAAM,OAAOC,CAAS;AAElC,MAAIE;AACF,aAASC,KAAaF;AACpB,MAAAG,EAAIF,GAAOC,GAAWF,EAAOE,CAAS,CAAC;AAG7C,GAEaE,IAAuB,CAACC,GAAeC,MAAW;AAC7D,QAAMC,IAAW,CAACC,GAAKC,MAAU;AAC/B,QAAIA,MAAU;AAId,aAAOA;AAAA,EACX;AAEE,SAAO,CAACC;AAAA,IACN,KAAK,UAAUC,EAAkCN,CAAa,GAAGE,CAAQ;AAAA,IACzE,KAAK,UAAUI,EAAkCL,CAAM,GAAGC,CAAQ;AAAA,EACtE;AACA,GAEaK,IAA6B,CAACC,IAAe,OACjDA,EAAa,OAAO,CAACC,GAAKC,OAC/BD,EAAIC,EAAS,KAAK,GAAG,IAAIA,EAAS,KAAK,OAEhCD,IACN,CAAE,CAAA,GAGME,IAAwB,CAACC,IAAS,OACtC,OAAO,QAAQA,CAAM,EAAE,IAAI,CAAC,CAACT,GAAKC,CAAK,OACrC;AAAA,EACL,MAAM;AAAA,IACJ,KAAAD;AAAA,IACA,OAAAC;AAAA,EACR;AACA,EACG,GAGUS,IAAmB,CAAAC,MACvBA,EAAU,cAAeA,EAAU,WAAWA,EAAU,cAG3DR,IAAoC,CAACS,IAAM,OACxCC,EAAUD,GAAK,CAAAE,MACf,MAAM,QAAQA,CAAQ,IAEpBC,EAAkCD,CAAQ,IAFZA,CAGtC,GAGUC,IAAoC,CAACC,IAAM,OAC/CA,EAAI,OAAO,CAAAC,MACTC,EAAKC,EAAIF,GAAc,QAAQA,CAAY,GAAG,CAAAG,MAAO,CAACC,EAAMD,CAAG,KAAK,CAACE,EAAQF,CAAG,CAAC,CACzF;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iguazio.dashboard-react-controls",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.7",
|
|
4
4
|
"description": "Collection of resources (such as CSS styles, fonts and images) and ReactJS 17.x components to share among different Iguazio React repos.",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.mjs",
|