iguazio.dashboard-react-controls 3.2.5 → 3.2.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/utils/common.util.d.ts.map +1 -1
- package/dist/utils/common.util.mjs +71 -69
- package/dist/utils/common.util.mjs.map +1 -1
- package/dist/utils/datetime.util.d.ts +10 -1
- package/dist/utils/datetime.util.d.ts.map +1 -1
- package/dist/utils/datetime.util.mjs +36 -21
- package/dist/utils/datetime.util.mjs.map +1 -1
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.util.d.ts","sourceRoot":"","sources":["../../src/lib/utils/common.util.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"common.util.d.ts","sourceRoot":"","sources":["../../src/lib/utils/common.util.js"],"names":[],"mappings":"AAgCO,kEAEN;AAEM,kFAcN;AAEM,qGAcN;AAEM,2DAGJ;AAGI,uFAQN;AAYM,sCAHI,KAAK,GACH,MAAM,CAUlB;AASM,mCAJI,KAAK,gBACL,MAAM,GACJ,MAAM,CAoBlB;AAOM,6CAFM,MAAM,CAiBlB;AAEM,gEAEN;AAEM,iDAEN;AAEM,uHAqBN;AAEM,sEAwBN;AAEM,6DAWN;AAEM,6DAEN"}
|
|
@@ -1,107 +1,109 @@
|
|
|
1
|
-
import { create as
|
|
2
|
-
import { isEmpty as
|
|
1
|
+
import { create as g } from "react-modal-promise";
|
|
2
|
+
import { isEmpty as u, isNumber as E, differenceWith as w, isEqual as T, omit as a, get as s } from "lodash";
|
|
3
3
|
import d from "../components/ConfirmDialog/ConfirmDialog.mjs";
|
|
4
|
-
import { PRIMARY_BUTTON as b, TERTIARY_BUTTON as
|
|
5
|
-
import { setFiltersWasHandled as
|
|
6
|
-
import { setNotification as
|
|
4
|
+
import { PRIMARY_BUTTON as b, TERTIARY_BUTTON as m, DANGER_BUTTON as h, FORBIDDEN_ERROR_STATUS_CODE as v, VIEW_SEARCH_PARAMETER as y } from "../constants.mjs";
|
|
5
|
+
import { setFiltersWasHandled as C, showWarning as R } from "../reducers/commonDetailsReducer.mjs";
|
|
6
|
+
import { setNotification as N } from "../reducers/notificationReducer.mjs";
|
|
7
7
|
import { showErrorNotification as l } from "./notification.util.mjs";
|
|
8
|
-
const
|
|
8
|
+
const p = (e, t) => g(e)(t), S = (e, t) => p(d, {
|
|
9
9
|
cancelButton: {
|
|
10
10
|
label: "Cancel",
|
|
11
|
-
variant:
|
|
11
|
+
variant: m
|
|
12
12
|
},
|
|
13
13
|
confirmButton: {
|
|
14
14
|
label: "OK",
|
|
15
15
|
variant: b,
|
|
16
|
-
handler:
|
|
16
|
+
handler: t
|
|
17
17
|
},
|
|
18
18
|
header: "Are you sure?",
|
|
19
|
-
message:
|
|
20
|
-
}),
|
|
19
|
+
message: e
|
|
20
|
+
}), _ = (e, t, n) => p(d, {
|
|
21
21
|
cancelButton: {
|
|
22
22
|
label: "Cancel",
|
|
23
|
-
variant:
|
|
23
|
+
variant: m
|
|
24
24
|
},
|
|
25
25
|
confirmButton: {
|
|
26
26
|
label: "Delete",
|
|
27
|
-
variant:
|
|
28
|
-
handler:
|
|
27
|
+
variant: h,
|
|
28
|
+
handler: n
|
|
29
29
|
},
|
|
30
|
-
header:
|
|
31
|
-
message:
|
|
32
|
-
}), F = (
|
|
33
|
-
(
|
|
34
|
-
),
|
|
35
|
-
w(
|
|
36
|
-
),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
header: e,
|
|
31
|
+
message: t
|
|
32
|
+
}), F = (e) => Object.values(e).every(
|
|
33
|
+
(t) => !t || (t == null ? void 0 : t.length) === 0 || !E(t) && u(t)
|
|
34
|
+
), V = (e, t, n = []) => e.length !== t.length ? !1 : u(
|
|
35
|
+
w(e, t, (r, i) => T(a(r, n), a(i, n)))
|
|
36
|
+
), c = {
|
|
37
|
+
[v]: "You do not have a permission to view this data"
|
|
38
|
+
}, D = (e) => {
|
|
39
|
+
const t = s(e, "response.data.detail", null);
|
|
40
|
+
return typeof t == "string" ? t : s(t, "reason", "");
|
|
41
|
+
}, W = (e, t) => {
|
|
42
|
+
const r = D(e) || e.message;
|
|
43
|
+
return (!r || r === "Not Found" || r.startsWith("Request failed with status code")) && t ? t : c[e.status] ? c[e.status] : r || "";
|
|
44
|
+
}, x = () => {
|
|
45
|
+
const e = {
|
|
44
46
|
transition: "transitionend",
|
|
45
47
|
OTransition: "oTransitionEnd",
|
|
46
48
|
MozTransition: "transitionend",
|
|
47
49
|
WebkitTransition: "webkitTransitionEnd"
|
|
48
50
|
};
|
|
49
|
-
let
|
|
50
|
-
for (let
|
|
51
|
-
if (
|
|
52
|
-
return
|
|
53
|
-
},
|
|
54
|
-
var
|
|
55
|
-
return (
|
|
56
|
-
},
|
|
57
|
-
let
|
|
58
|
-
return
|
|
59
|
-
const o = (
|
|
60
|
-
window.removeEventListener("discardChanges", o), window.removeEventListener("cancelLeave", o), i(
|
|
51
|
+
let t = document.body.style;
|
|
52
|
+
for (let n in e)
|
|
53
|
+
if (t[n] !== void 0)
|
|
54
|
+
return e[n];
|
|
55
|
+
}, I = (e) => getComputedStyle(document.documentElement).getPropertyValue(e).trim(), q = (e) => {
|
|
56
|
+
var t;
|
|
57
|
+
return (t = new URLSearchParams(e).get(y)) == null ? void 0 : t.toLowerCase();
|
|
58
|
+
}, H = async (e, t, n = !1) => {
|
|
59
|
+
let r = Promise.resolve(!0);
|
|
60
|
+
return e.counter > 0 && (r = await new Promise((i) => {
|
|
61
|
+
const o = (f) => {
|
|
62
|
+
window.removeEventListener("discardChanges", o), window.removeEventListener("cancelLeave", o), i(f);
|
|
61
63
|
};
|
|
62
|
-
window.addEventListener("discardChanges", () => o(!0)), window.addEventListener("cancelLeave", () => o(!1)),
|
|
63
|
-
})),
|
|
64
|
-
},
|
|
65
|
-
var
|
|
66
|
-
if (!((
|
|
64
|
+
window.addEventListener("discardChanges", () => o(!0)), window.addEventListener("cancelLeave", () => o(!1)), t(C(n)), t(R(!0));
|
|
65
|
+
})), r;
|
|
66
|
+
}, Y = (e, t) => {
|
|
67
|
+
var n;
|
|
68
|
+
if (!((n = navigator.clipboard) != null && n.writeText))
|
|
67
69
|
return l(
|
|
68
|
-
|
|
70
|
+
t,
|
|
69
71
|
null,
|
|
70
72
|
"",
|
|
71
73
|
"Copy to clipboard failed due to unsecured connection"
|
|
72
74
|
);
|
|
73
|
-
navigator.clipboard.writeText(
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
navigator.clipboard.writeText(e).then(() => {
|
|
76
|
+
t(
|
|
77
|
+
N({
|
|
76
78
|
status: 200,
|
|
77
79
|
id: Math.random(),
|
|
78
80
|
message: "Copied to clipboard successfully"
|
|
79
81
|
})
|
|
80
82
|
);
|
|
81
|
-
}).catch((
|
|
82
|
-
l(
|
|
83
|
+
}).catch((r) => {
|
|
84
|
+
l(t, r, "", "Copy to clipboard failed");
|
|
83
85
|
});
|
|
84
|
-
},
|
|
85
|
-
if ((typeof
|
|
86
|
-
const
|
|
87
|
-
return
|
|
86
|
+
}, j = (e, t) => {
|
|
87
|
+
if ((typeof e == "string" && e.trim() !== "" || typeof e == "number") && !isNaN(e)) {
|
|
88
|
+
const n = parseFloat(e);
|
|
89
|
+
return n % 1 === 0 ? n : +n.toFixed(t ?? 2);
|
|
88
90
|
}
|
|
89
|
-
return
|
|
90
|
-
},
|
|
91
|
+
return e;
|
|
92
|
+
}, k = (e) => new URL(e, window.location.origin).toString();
|
|
91
93
|
export {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
V as areArraysEqual,
|
|
95
|
+
Y as copyToClipboard,
|
|
96
|
+
k as generateUrlFromRouterPath,
|
|
97
|
+
D as getErrorDetail,
|
|
98
|
+
W as getErrorMsg,
|
|
99
|
+
I as getScssVariableValue,
|
|
100
|
+
x as getTransitionEndEventName,
|
|
101
|
+
q as getViewMode,
|
|
100
102
|
F as isEveryObjectValueEmpty,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
S as openConfirmPopUp,
|
|
104
|
+
_ as openDeleteConfirmPopUp,
|
|
105
|
+
p as openPopUp,
|
|
106
|
+
H as performDetailsActionHelper,
|
|
107
|
+
j as roundFloats
|
|
106
108
|
};
|
|
107
109
|
//# sourceMappingURL=common.util.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.util.mjs","sources":["../../src/lib/utils/common.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 { create } from 'react-modal-promise'\nimport { differenceWith, isEqual, get, omit, isEmpty, isNumber } from 'lodash'\n\nimport ConfirmDialog from '../components/ConfirmDialog/ConfirmDialog'\n\nimport { DANGER_BUTTON, PRIMARY_BUTTON, TERTIARY_BUTTON, VIEW_SEARCH_PARAMETER } from '../constants'\nimport { setFiltersWasHandled, showWarning } from '../reducers/commonDetailsReducer'\nimport { setNotification } from '../reducers/notificationReducer'\nimport { showErrorNotification } from './notification.util'\n\nexport const openPopUp = (element, props) => {\n return create(element)(props)\n}\n\nexport const openConfirmPopUp = (message, confirmHandler) => {\n return openPopUp(ConfirmDialog, {\n cancelButton: {\n label: 'Cancel',\n variant: TERTIARY_BUTTON\n },\n confirmButton: {\n label: 'OK',\n variant: PRIMARY_BUTTON,\n handler: confirmHandler\n },\n header: 'Are you sure?',\n message\n })\n}\n\nexport const openDeleteConfirmPopUp = (header, message, confirmHandler) => {\n return openPopUp(ConfirmDialog, {\n cancelButton: {\n label: 'Cancel',\n variant: TERTIARY_BUTTON\n },\n confirmButton: {\n label: 'Delete',\n variant: DANGER_BUTTON,\n handler: confirmHandler\n },\n header,\n message\n })\n}\n\nexport const isEveryObjectValueEmpty = obj =>\n Object.values(obj).every(\n item => !item || item?.length === 0 || (!isNumber(item) && isEmpty(item))\n )\n\n// Checks, whether two arrays of objects are equal, can omit some keys if their comparison is not necessary\nexport const areArraysEqual = (firstArray, secondArray, omitBy = []) => {\n if (firstArray.length !== secondArray.length) return false\n\n return isEmpty(\n differenceWith(firstArray, secondArray, (a, b) => {\n return isEqual(omit(a, omitBy), omit(b, omitBy))\n })\n )\n}\n\n/**\n * Get error information from the error object.\n *\n * @param {Error} error - The error object.\n * @returns {string} - The detailed error information.\n */\nexport const getErrorDetail = error => {\n const errorDetail = get(error, 'response.data.detail', null)\n\n if (typeof errorDetail === 'string') {\n return errorDetail\n } else {\n return get(errorDetail, 'reason', '')\n }\n}\n\n/**\n * Get the error message from the error object or a default error message.\n *\n * @param {Error} error - The error object.\n * @param {string} defaultError - The default error message.\n * @returns {string} - The error message.\n */\nexport const getErrorMsg = (error, defaultError) => {\n const errorDetail = getErrorDetail(error)\n const errorMsg = errorDetail || error.message\n\n if (\n (!errorMsg ||\n errorMsg === 'Not Found' ||\n errorMsg.startsWith('Request failed with status code')) &&\n defaultError\n ) {\n return defaultError\n } else {\n return errorMsg || ''\n }\n}\n\n/**\n * Retrieves the appropriate transition end event name based on the browser.\n *\n * @returns {string} The transition end event name.\n */\nexport const getTransitionEndEventName = () => {\n const transitions = {\n transition: 'transitionend',\n OTransition: 'oTransitionEnd',\n MozTransition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd'\n }\n\n let bodyStyle = document.body.style\n\n for (let transition in transitions) {\n if (bodyStyle[transition] !== undefined) {\n return transitions[transition]\n }\n }\n}\n\nexport const getScssVariableValue = variableName => {\n return getComputedStyle(document.documentElement).getPropertyValue(variableName).trim()\n}\n\nexport const getViewMode = search => {\n return new URLSearchParams(search).get(VIEW_SEARCH_PARAMETER)?.toLowerCase()\n}\n\nexport const performDetailsActionHelper = async (changes, dispatch, filtersWasHandled = false) => {\n let actionCanBePerformed = Promise.resolve(true)\n\n if (changes.counter > 0) {\n actionCanBePerformed = await new Promise(resolve => {\n const resolver = isSuccess => {\n window.removeEventListener('discardChanges', resolver)\n window.removeEventListener('cancelLeave', resolver)\n\n resolve(isSuccess)\n }\n\n window.addEventListener('discardChanges', () => resolver(true))\n window.addEventListener('cancelLeave', () => resolver(false))\n\n dispatch(setFiltersWasHandled(filtersWasHandled))\n dispatch(showWarning(true))\n })\n }\n\n return actionCanBePerformed\n}\n\nexport const copyToClipboard = (textToCopy, dispatch) => {\n if (!navigator.clipboard?.writeText) {\n return showErrorNotification(\n dispatch,\n null,\n '',\n 'Copy to clipboard failed due to unsecured connection'\n )\n }\n\n navigator.clipboard\n .writeText(textToCopy)\n .then(() => {\n dispatch(\n setNotification({\n status: 200,\n id: Math.random(),\n message: 'Copied to clipboard successfully'\n })\n )\n })\n .catch(error => {\n showErrorNotification(dispatch, error, '', 'Copy to clipboard failed')\n })\n}\n\nexport const roundFloats = (value, precision) => {\n if (\n ((typeof value === 'string' && value.trim() !== '') || typeof value === 'number') &&\n !isNaN(value)\n ) {\n const parsedNum = parseFloat(value)\n\n return parsedNum % 1 === 0 ? parsedNum : +parsedNum.toFixed(precision ?? 2)\n }\n\n return value\n}\n\nexport const generateUrlFromRouterPath = link => {\n return new URL(link, window.location.origin).toString()\n}\n"],"names":["openPopUp","element","props","create","openConfirmPopUp","message","confirmHandler","ConfirmDialog","TERTIARY_BUTTON","PRIMARY_BUTTON","openDeleteConfirmPopUp","header","DANGER_BUTTON","isEveryObjectValueEmpty","obj","item","isNumber","isEmpty","areArraysEqual","firstArray","secondArray","omitBy","differenceWith","a","b","isEqual","omit","getErrorDetail","error","errorDetail","get","getErrorMsg","defaultError","errorMsg","getTransitionEndEventName","transitions","bodyStyle","transition","getScssVariableValue","variableName","getViewMode","search","_a","VIEW_SEARCH_PARAMETER","performDetailsActionHelper","changes","dispatch","filtersWasHandled","actionCanBePerformed","resolve","resolver","isSuccess","setFiltersWasHandled","showWarning","copyToClipboard","textToCopy","showErrorNotification","setNotification","roundFloats","value","precision","parsedNum","generateUrlFromRouterPath","link"],"mappings":";;;;;;;AA0BY,MAACA,IAAY,CAACC,GAASC,MAC1BC,EAAOF,CAAO,EAAEC,CAAK,GAGjBE,IAAmB,CAACC,GAASC,MACjCN,EAAUO,GAAe;AAAA,EAC9B,cAAc;AAAA,IACZ,OAAO;AAAA,IACP,SAASC;AAAA,EACf;AAAA,EACI,eAAe;AAAA,IACb,OAAO;AAAA,IACP,SAASC;AAAA,IACT,SAASH;AAAA,EACf;AAAA,EACI,QAAQ;AAAA,EACR,SAAAD;AACJ,CAAG,GAGUK,IAAyB,CAACC,GAAQN,GAASC,MAC/CN,EAAUO,GAAe;AAAA,EAC9B,cAAc;AAAA,IACZ,OAAO;AAAA,IACP,SAASC;AAAA,EACf;AAAA,EACI,eAAe;AAAA,IACb,OAAO;AAAA,IACP,SAASI;AAAA,IACT,SAASN;AAAA,EACf;AAAA,EACI,QAAAK;AAAA,EACA,SAAAN;AACJ,CAAG,GAGUQ,IAA0B,CAAAC,MACrC,OAAO,OAAOA,CAAG,EAAE;AAAA,EACjB,CAAAC,MAAQ,CAACA,MAAQA,KAAA,gBAAAA,EAAM,YAAW,KAAM,CAACC,EAASD,CAAI,KAAKE,EAAQF,CAAI;AAC3E,GAGaG,IAAiB,CAACC,GAAYC,GAAaC,IAAS,CAAA,MAC3DF,EAAW,WAAWC,EAAY,SAAe,KAE9CH;AAAA,EACLK,EAAeH,GAAYC,GAAa,CAACG,GAAGC,MACnCC,EAAQC,EA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GAE5DJ,EAASM,EAAqBL,CAAiB,CAAC,GAChDD,EAASO,EAAY,EAAI,CAAC;AAAA,EAC5B,CAAC,IAGIL;AACT,GAEaM,IAAkB,CAACC,GAAYT,MAAa;;AACvD,MAAI,GAACJ,IAAA,UAAU,cAAV,QAAAA,EAAqB;AACxB,WAAOc;AAAA,MACLV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACN;AAGE,YAAU,UACP,UAAUS,CAAU,EACpB,KAAK,MAAM;AACV,IAAAT;AAAA,MACEW,EAAgB;AAAA,QACd,QAAQ;AAAA,QACR,IAAI,KAAK,OAAM;AAAA,QACf,SAAS;AAAA,MACnB,CAAS;AAAA,IACT;AAAA,EACI,CAAC,EACA,MAAM,CAAA7B,MAAS;AACd,IAAA4B,EAAsBV,GAAUlB,GAAO,IAAI,0BAA0B;AAAA,EACvE,CAAC;AACL,GAEa8B,IAAc,CAACC,GAAOC,MAAc;AAC/C,OACI,OAAOD,KAAU,YAAYA,EAAM,WAAW,MAAO,OAAOA,KAAU,aACxE,CAAC,MAAMA,CAAK,GACZ;AACA,UAAME,IAAY,WAAWF,CAAK;AAElC,WAAOE,IAAY,MAAM,IAAIA,IAAY,CAACA,EAAU,QAAQD,KAAa,CAAC;AAAA,EAC5E;AAEA,SAAOD;AACT,GAEaG,IAA4B,CAAAC,MAChC,IAAI,IAAIA,GAAM,OAAO,SAAS,MAAM,EAAE,SAAQ;"}
|
|
1
|
+
{"version":3,"file":"common.util.mjs","sources":["../../src/lib/utils/common.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 { create } from 'react-modal-promise'\nimport { differenceWith, isEqual, get, omit, isEmpty, isNumber } from 'lodash'\n\nimport ConfirmDialog from '../components/ConfirmDialog/ConfirmDialog'\n\nimport {\n DANGER_BUTTON,\n FORBIDDEN_ERROR_STATUS_CODE,\n PRIMARY_BUTTON,\n TERTIARY_BUTTON,\n VIEW_SEARCH_PARAMETER\n} from '../constants'\nimport { setFiltersWasHandled, showWarning } from '../reducers/commonDetailsReducer'\nimport { setNotification } from '../reducers/notificationReducer'\nimport { showErrorNotification } from './notification.util'\n\nexport const openPopUp = (element, props) => {\n return create(element)(props)\n}\n\nexport const openConfirmPopUp = (message, confirmHandler) => {\n return openPopUp(ConfirmDialog, {\n cancelButton: {\n label: 'Cancel',\n variant: TERTIARY_BUTTON\n },\n confirmButton: {\n label: 'OK',\n variant: PRIMARY_BUTTON,\n handler: confirmHandler\n },\n header: 'Are you sure?',\n message\n })\n}\n\nexport const openDeleteConfirmPopUp = (header, message, confirmHandler) => {\n return openPopUp(ConfirmDialog, {\n cancelButton: {\n label: 'Cancel',\n variant: TERTIARY_BUTTON\n },\n confirmButton: {\n label: 'Delete',\n variant: DANGER_BUTTON,\n handler: confirmHandler\n },\n header,\n message\n })\n}\n\nexport const isEveryObjectValueEmpty = obj =>\n Object.values(obj).every(\n item => !item || item?.length === 0 || (!isNumber(item) && isEmpty(item))\n )\n\n// Checks, whether two arrays of objects are equal, can omit some keys if their comparison is not necessary\nexport const areArraysEqual = (firstArray, secondArray, omitBy = []) => {\n if (firstArray.length !== secondArray.length) return false\n\n return isEmpty(\n differenceWith(firstArray, secondArray, (a, b) => {\n return isEqual(omit(a, omitBy), omit(b, omitBy))\n })\n )\n}\n\nconst commonErrorMessagesMap = {\n [FORBIDDEN_ERROR_STATUS_CODE]: 'You do not have a permission to view this data'\n}\n\n/**\n * Get error information from the error object.\n *\n * @param {Error} error - The error object.\n * @returns {string} - The detailed error information.\n */\nexport const getErrorDetail = error => {\n const errorDetail = get(error, 'response.data.detail', null)\n\n if (typeof errorDetail === 'string') {\n return errorDetail\n } else {\n return get(errorDetail, 'reason', '')\n }\n}\n\n/**\n * Get the error message from the error object or a default error message.\n *\n * @param {Error} error - The error object.\n * @param {string} defaultError - The default error message.\n * @returns {string} - The error message.\n */\nexport const getErrorMsg = (error, defaultError) => {\n const errorDetail = getErrorDetail(error)\n const errorMsg = errorDetail || error.message\n\n if (\n (!errorMsg ||\n errorMsg === 'Not Found' ||\n errorMsg.startsWith('Request failed with status code')) &&\n defaultError\n ) {\n return defaultError\n } else {\n if (commonErrorMessagesMap[error.status]) {\n return commonErrorMessagesMap[error.status]\n }\n\n return errorMsg || ''\n }\n}\n\n/**\n * Retrieves the appropriate transition end event name based on the browser.\n *\n * @returns {string} The transition end event name.\n */\nexport const getTransitionEndEventName = () => {\n const transitions = {\n transition: 'transitionend',\n OTransition: 'oTransitionEnd',\n MozTransition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd'\n }\n\n let bodyStyle = document.body.style\n\n for (let transition in transitions) {\n if (bodyStyle[transition] !== undefined) {\n return transitions[transition]\n }\n }\n}\n\nexport const getScssVariableValue = variableName => {\n return getComputedStyle(document.documentElement).getPropertyValue(variableName).trim()\n}\n\nexport const getViewMode = search => {\n return new URLSearchParams(search).get(VIEW_SEARCH_PARAMETER)?.toLowerCase()\n}\n\nexport const performDetailsActionHelper = async (changes, dispatch, filtersWasHandled = false) => {\n let actionCanBePerformed = Promise.resolve(true)\n\n if (changes.counter > 0) {\n actionCanBePerformed = await new Promise(resolve => {\n const resolver = isSuccess => {\n window.removeEventListener('discardChanges', resolver)\n window.removeEventListener('cancelLeave', resolver)\n\n resolve(isSuccess)\n }\n\n window.addEventListener('discardChanges', () => resolver(true))\n window.addEventListener('cancelLeave', () => resolver(false))\n\n dispatch(setFiltersWasHandled(filtersWasHandled))\n dispatch(showWarning(true))\n })\n }\n\n return actionCanBePerformed\n}\n\nexport const copyToClipboard = (textToCopy, dispatch) => {\n if (!navigator.clipboard?.writeText) {\n return showErrorNotification(\n dispatch,\n null,\n '',\n 'Copy to clipboard failed due to unsecured connection'\n )\n }\n\n navigator.clipboard\n .writeText(textToCopy)\n .then(() => {\n dispatch(\n setNotification({\n status: 200,\n id: Math.random(),\n message: 'Copied to clipboard successfully'\n })\n )\n })\n .catch(error => {\n showErrorNotification(dispatch, error, '', 'Copy to clipboard failed')\n })\n}\n\nexport const roundFloats = (value, precision) => {\n if (\n ((typeof value === 'string' && value.trim() !== '') || typeof value === 'number') &&\n !isNaN(value)\n ) {\n const parsedNum = parseFloat(value)\n\n return parsedNum % 1 === 0 ? parsedNum : +parsedNum.toFixed(precision ?? 2)\n }\n\n return value\n}\n\nexport const generateUrlFromRouterPath = link => {\n return new URL(link, window.location.origin).toString()\n}\n"],"names":["openPopUp","element","props","create","openConfirmPopUp","message","confirmHandler","ConfirmDialog","TERTIARY_BUTTON","PRIMARY_BUTTON","openDeleteConfirmPopUp","header","DANGER_BUTTON","isEveryObjectValueEmpty","obj","item","isNumber","isEmpty","areArraysEqual","firstArray","secondArray","omitBy","differenceWith","a","b","isEqual","omit","commonErrorMessagesMap","FORBIDDEN_ERROR_STATUS_CODE","getErrorDetail","error","errorDetail","get","getErrorMsg","defaultError","errorMsg","getTransitionEndEventName","transitions","bodyStyle","transition","getScssVariableValue","variableName","getViewMode","search","_a","VIEW_SEARCH_PARAMETER","performDetailsActionHelper","changes","dispatch","filtersWasHandled","actionCanBePerformed","resolve","resolver","isSuccess","setFiltersWasHandled","showWarning","copyToClipboard","textToCopy","showErrorNotification","setNotification","roundFloats","value","precision","parsedNum","generateUrlFromRouterPath","link"],"mappings":";;;;;;;AAgCY,MAACA,IAAY,CAACC,GAASC,MAC1BC,EAAOF,CAAO,EAAEC,CAAK,GAGjBE,IAAmB,CAACC,GAASC,MACjCN,EAAUO,GAAe;AA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R,IAAI,KAAK,OAAM;AAAA,QACf,SAAS;AAAA,MACnB,CAAS;AAAA,IACT;AAAA,EACI,CAAC,EACA,MAAM,CAAA7B,MAAS;AACd,IAAA4B,EAAsBV,GAAUlB,GAAO,IAAI,0BAA0B;AAAA,EACvE,CAAC;AACL,GAEa8B,IAAc,CAACC,GAAOC,MAAc;AAC/C,OACI,OAAOD,KAAU,YAAYA,EAAM,WAAW,MAAO,OAAOA,KAAU,aACxE,CAAC,MAAMA,CAAK,GACZ;AACA,UAAME,IAAY,WAAWF,CAAK;AAElC,WAAOE,IAAY,MAAM,IAAIA,IAAY,CAACA,EAAU,QAAQD,KAAa,CAAC;AAAA,EAC5E;AAEA,SAAOD;AACT,GAEaG,IAA4B,CAAAC,MAChC,IAAI,IAAIA,GAAM,OAAO,SAAS,MAAM,EAAE,SAAQ;"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
export function
|
|
1
|
+
export function getSupportedLocale(): string;
|
|
2
|
+
export const supportedLocale: string;
|
|
3
|
+
export function formatDatetime(datetime: any, invalidDateMessage: any, options?: {
|
|
4
|
+
year: string;
|
|
5
|
+
month: string;
|
|
6
|
+
day: string;
|
|
7
|
+
hour: string;
|
|
8
|
+
minute: string;
|
|
9
|
+
second: string;
|
|
10
|
+
}, locale?: string): any;
|
|
2
11
|
export function getFormatTime(time: any): {
|
|
3
12
|
hour: any;
|
|
4
13
|
minute: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datetime.util.d.ts","sourceRoot":"","sources":["../../src/lib/utils/datetime.util.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"datetime.util.d.ts","sourceRoot":"","sources":["../../src/lib/utils/datetime.util.js"],"names":[],"mappings":"AAqBA,6CASC;AAED,qCAAmD;AAE5C;;;;;;;yBAgCN;AAEM;;;EAYN;AAEM,6DAyBN;AAEM,wEAEN;AAEM,sFAON"}
|
|
@@ -1,17 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import a from "moment";
|
|
2
|
+
function m() {
|
|
3
|
+
const t = /* @__PURE__ */ new Set(["en-GB", "en-US"]);
|
|
4
|
+
return (navigator.languages || [navigator.language]).find((o) => t.has(o)) || "en-US";
|
|
5
|
+
}
|
|
6
|
+
const c = m(), d = (t, e, r = {
|
|
7
|
+
year: "numeric",
|
|
8
|
+
month: "short",
|
|
9
|
+
day: "numeric",
|
|
10
|
+
hour: "2-digit",
|
|
11
|
+
minute: "2-digit",
|
|
12
|
+
second: "2-digit"
|
|
13
|
+
}, o = c) => {
|
|
3
14
|
if (!t)
|
|
4
15
|
return e;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
let n;
|
|
17
|
+
try {
|
|
18
|
+
n = new Date(t);
|
|
19
|
+
} catch {
|
|
20
|
+
return e;
|
|
21
|
+
}
|
|
22
|
+
return typeof n != "object" || !(n instanceof Date) || isNaN(n) ? e : new Intl.DateTimeFormat(o, {
|
|
23
|
+
numberingSystem: "latn",
|
|
24
|
+
calendar: "gregory",
|
|
25
|
+
...r
|
|
26
|
+
}).format(n);
|
|
27
|
+
}, g = (t) => {
|
|
15
28
|
const [e, r] = t.split(":");
|
|
16
29
|
return r ? {
|
|
17
30
|
hour: e.replace(/_/g, "0"),
|
|
@@ -20,7 +33,7 @@ const u = (t, e) => {
|
|
|
20
33
|
hour: "0",
|
|
21
34
|
minute: "0"
|
|
22
35
|
};
|
|
23
|
-
},
|
|
36
|
+
}, h = (t) => (a.updateLocale("en", {
|
|
24
37
|
relativeTime: {
|
|
25
38
|
future: "in %s",
|
|
26
39
|
past: "%s ago",
|
|
@@ -39,15 +52,17 @@ const u = (t, e) => {
|
|
|
39
52
|
y: "a year",
|
|
40
53
|
yy: "%d years"
|
|
41
54
|
}
|
|
42
|
-
}),
|
|
43
|
-
const
|
|
44
|
-
return r ?
|
|
55
|
+
}), a.utc(t).fromNow()), p = (t, e) => a(t).format(e), y = (t = [], e, r = !0) => [...t].sort((o, n) => {
|
|
56
|
+
const s = Date.parse(o[e]), u = Date.parse(n[e]);
|
|
57
|
+
return r ? s - u : u - s;
|
|
45
58
|
});
|
|
46
59
|
export {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
60
|
+
d as formatDatetime,
|
|
61
|
+
p as getDateAndTimeByFormat,
|
|
62
|
+
g as getFormatTime,
|
|
63
|
+
m as getSupportedLocale,
|
|
64
|
+
h as getTimeElapsedByDate,
|
|
65
|
+
y as sortListByDate,
|
|
66
|
+
c as supportedLocale
|
|
52
67
|
};
|
|
53
68
|
//# sourceMappingURL=datetime.util.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datetime.util.mjs","sources":["../../src/lib/utils/datetime.util.js"],"sourcesContent":["/*\nCopyright 2019 Iguazio Systems Ltd.\n\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.\n\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.\n\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 moment from 'moment'\n\nexport const formatDatetime = (datetime
|
|
1
|
+
{"version":3,"file":"datetime.util.mjs","sources":["../../src/lib/utils/datetime.util.js"],"sourcesContent":["/*\nCopyright 2019 Iguazio Systems Ltd.\n\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.\n\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.\n\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 moment from 'moment'\n\nexport function getSupportedLocale() {\n const SUPPORTED_LOCALES = new Set(['en-GB', 'en-US'])\n\n const userLocales = navigator.languages || [navigator.language]\n\n // browser always returns locales in descending order of preference\n const match = userLocales.find(locale => SUPPORTED_LOCALES.has(locale))\n\n return match || 'en-US'\n}\n\nexport const supportedLocale = getSupportedLocale()\n\nexport const formatDatetime = (\n datetime,\n invalidDateMessage,\n options = {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit'\n },\n locale = supportedLocale\n) => {\n if (!datetime) {\n return invalidDateMessage\n }\n\n let date\n\n try {\n date = new Date(datetime)\n } catch {\n return invalidDateMessage\n }\n\n return typeof date !== 'object' || !(date instanceof Date) || isNaN(date)\n ? invalidDateMessage\n : new Intl.DateTimeFormat(locale, {\n numberingSystem: 'latn',\n calendar: 'gregory',\n ...options\n }).format(date)\n}\n\nexport const getFormatTime = time => {\n const [hour, minute] = time.split(':')\n if (!minute) {\n return {\n hour: '0',\n minute: '0'\n }\n }\n return {\n hour: hour.replace(/_/g, '0'),\n minute: minute.replace(/_/g, '0')\n }\n}\n\nexport const getTimeElapsedByDate = creationDate => {\n moment.updateLocale('en', {\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n }\n })\n\n const time = moment.utc(creationDate)\n\n return time.fromNow()\n}\n\nexport const getDateAndTimeByFormat = (date, dateFormat) => {\n return moment(date).format(dateFormat)\n}\n\nexport const sortListByDate = (list = [], field, isAscending = true) => {\n return [...list].sort((prevElem, nextElem) => {\n const prev = Date.parse(prevElem[field])\n const next = Date.parse(nextElem[field])\n\n return isAscending ? prev - next : next - prev\n })\n}\n"],"names":["getSupportedLocale","SUPPORTED_LOCALES","locale","supportedLocale","formatDatetime","datetime","invalidDateMessage","options","date","getFormatTime","time","hour","minute","getTimeElapsedByDate","creationDate","moment","getDateAndTimeByFormat","dateFormat","sortListByDate","list","field","isAscending","prevElem","nextElem","prev","next"],"mappings":";AAqBO,SAASA,IAAqB;AACnC,QAAMC,IAAoB,oBAAI,IAAI,CAAC,SAAS,OAAO,CAAC;AAOpD,UALoB,UAAU,aAAa,CAAC,UAAU,QAAQ,GAGpC,KAAK,CAAAC,MAAUD,EAAkB,IAAIC,CAAM,CAAC,KAEtD;AAClB;AAEY,MAACC,IAAkBH,EAAkB,GAEpCI,IAAiB,CAC5BC,GACAC,GACAC,IAAU;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AACZ,GACEL,IAASC,MACN;AACH,MAAI,CAACE;AACH,WAAOC;AAGT,MAAIE;AAEJ,MAAI;AACF,IAAAA,IAAO,IAAI,KAAKH,CAAQ;AAAA,EAC1B,QAAQ;AACN,WAAOC;AAAA,EACT;AAEA,SAAO,OAAOE,KAAS,YAAY,EAAEA,aAAgB,SAAS,MAAMA,CAAI,IACpEF,IACA,IAAI,KAAK,eAAeJ,GAAQ;AAAA,IAC9B,iBAAiB;AAAA,IACjB,UAAU;AAAA,IACV,GAAGK;AAAA,EACX,CAAO,EAAE,OAAOC,CAAI;AACpB,GAEaC,IAAgB,CAAAC,MAAQ;AACnC,QAAM,CAACC,GAAMC,CAAM,IAAIF,EAAK,MAAM,GAAG;AACrC,SAAKE,IAME;AAAA,IACL,MAAMD,EAAK,QAAQ,MAAM,GAAG;AAAA,IAC5B,QAAQC,EAAO,QAAQ,MAAM,GAAG;AAAA,EACpC,IARW;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,EACd;AAMA,GAEaC,IAAuB,CAAAC,OAClCC,EAAO,aAAa,MAAM;AAAA,EACxB,cAAc;AAAA,IACZ,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,GAAG;AAAA,IACH,IAAI;AAAA,EACV;AACA,CAAG,GAEYA,EAAO,IAAID,CAAY,EAExB,QAAO,IAGRE,IAAyB,CAACR,GAAMS,MACpCF,EAAOP,CAAI,EAAE,OAAOS,CAAU,GAG1BC,IAAiB,CAACC,IAAO,CAAA,GAAIC,GAAOC,IAAc,OACtD,CAAC,GAAGF,CAAI,EAAE,KAAK,CAACG,GAAUC,MAAa;AAC5C,QAAMC,IAAO,KAAK,MAAMF,EAASF,CAAK,CAAC,GACjCK,IAAO,KAAK,MAAMF,EAASH,CAAK,CAAC;AAEvC,SAAOC,IAAcG,IAAOC,IAAOA,IAAOD;AAC5C,CAAC;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iguazio.dashboard-react-controls",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.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",
|
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@eslint/js": "^9.19.0",
|
|
62
62
|
"@reduxjs/toolkit": "^2.8.2",
|
|
63
|
-
"@storybook/addon-actions": "^8.
|
|
64
|
-
"@storybook/addon-essentials": "^8.
|
|
65
|
-
"@storybook/addon-interactions": "^8.
|
|
66
|
-
"@storybook/addon-links": "^8.
|
|
67
|
-
"@storybook/builder-webpack5": "^8.
|
|
63
|
+
"@storybook/addon-actions": "^8.6.15",
|
|
64
|
+
"@storybook/addon-essentials": "^8.6.15",
|
|
65
|
+
"@storybook/addon-interactions": "^8.6.15",
|
|
66
|
+
"@storybook/addon-links": "^8.6.15",
|
|
67
|
+
"@storybook/builder-webpack5": "^8.6.15",
|
|
68
68
|
"@storybook/manager-webpack5": "^6.5.16",
|
|
69
|
-
"@storybook/react": "^8.
|
|
69
|
+
"@storybook/react": "^8.6.15",
|
|
70
70
|
"@storybook/testing-library": "0.2.2",
|
|
71
71
|
"@types/react": "18.3.1",
|
|
72
72
|
"@types/react-dom": "18.3.1",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"react-final-form-arrays": "^3.1.4",
|
|
93
93
|
"react-modal-promise": "^1.0.2",
|
|
94
94
|
"react-redux": "^7.2.9",
|
|
95
|
-
"react-router-dom": "6.
|
|
95
|
+
"react-router-dom": "6.30.3",
|
|
96
96
|
"react-transition-group": "^4.4.5",
|
|
97
97
|
"sass": "^1.72.0",
|
|
98
98
|
"tsup": "^8.3.6",
|
|
@@ -105,10 +105,10 @@
|
|
|
105
105
|
"vite-plugin-svgr": "^4.3.0"
|
|
106
106
|
},
|
|
107
107
|
"scripts": {
|
|
108
|
-
"lint": "eslint
|
|
109
|
-
"lint:fix": "eslint
|
|
110
|
-
"prettier": "prettier --check
|
|
111
|
-
"prettier:fix": "prettier --write
|
|
108
|
+
"lint": "eslint \"src/**/*.{js,jsx}\" --quiet",
|
|
109
|
+
"lint:fix": "eslint \"src/**/*.{js,jsx}\" --fix",
|
|
110
|
+
"prettier": "prettier --check \"src/**/*.{js,jsx,scss}\"",
|
|
111
|
+
"prettier:fix": "prettier --write \"src/**/*.{js,jsx,scss}\"",
|
|
112
112
|
"build-storybook": "build-storybook",
|
|
113
113
|
"storybook": "start-storybook -p 6006",
|
|
114
114
|
"start": "vite",
|