datastake-daf 0.6.188 → 0.6.189

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.
@@ -20994,6 +20994,11 @@ const Style$x = dt.div`
20994
20994
  .daf-widget {
20995
20995
  background-color: ${props => props.backgroundColor} !important;
20996
20996
  border-color: ${props => props.backgroundBorderColor} !important;
20997
+ transition: box-shadow 0.2s ease-in-out;
20998
+
20999
+ &:hover {
21000
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
21001
+ }
20997
21002
  }
20998
21003
 
20999
21004
  .widget-card-logo-icon {
@@ -21006,6 +21011,11 @@ const Style$x = dt.div`
21006
21011
  align-items: center;
21007
21012
  border: 1px solid #E5E7EB;
21008
21013
  }
21014
+
21015
+ .disabled-anchor {
21016
+ cursor: not-allowed;
21017
+ opacity: 0.5;
21018
+ }
21009
21019
  `;
21010
21020
 
21011
21021
  const {
@@ -21023,7 +21033,9 @@ const WidgetCard = _ref => {
21023
21033
  loading = false,
21024
21034
  iconColor,
21025
21035
  buttonIcon,
21026
- imageUrl
21036
+ imageUrl,
21037
+ buttonConfig = {},
21038
+ t = () => {}
21027
21039
  } = _ref;
21028
21040
  useToken$h();
21029
21041
  return /*#__PURE__*/jsxRuntime.jsx(Style$x, {
@@ -21053,13 +21065,17 @@ const WidgetCard = _ref => {
21053
21065
  addedHeader: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
21054
21066
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
21055
21067
  className: "flex-1"
21056
- }), /*#__PURE__*/jsxRuntime.jsx("a", {
21057
- className: "widget-card-logo-icon",
21058
- href: link,
21059
- children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
21060
- name: buttonIcon,
21061
- size: 16,
21062
- color: iconColor || antd.theme.colorPrimary
21068
+ }), /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
21069
+ title: buttonConfig.disabled ? (buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.tooltipText) || t("Currently unavailable") : "",
21070
+ children: /*#__PURE__*/jsxRuntime.jsx("a", {
21071
+ className: formatClassname(["widget-card-logo-icon", buttonConfig.disabled && "disabled-anchor"]),
21072
+ href: buttonConfig.disabled ? undefined : link,
21073
+ onClick: buttonConfig.disabled ? e => e.preventDefault() : undefined,
21074
+ children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
21075
+ name: buttonIcon,
21076
+ size: 16,
21077
+ color: iconColor || antd.theme.colorPrimary
21078
+ })
21063
21079
  })
21064
21080
  })]
21065
21081
  }),
@@ -21102,15 +21118,11 @@ function CarouselWidget(_ref) {
21102
21118
  * @param {number} currentSlide - The index of the current slide after change
21103
21119
  * @private
21104
21120
  */
21105
- const onChange = currentSlide => {
21106
- console.log(currentSlide);
21107
- };
21121
+
21108
21122
  return /*#__PURE__*/jsxRuntime.jsx(Widget, {
21109
21123
  title: title,
21110
21124
  className: "with-border-header h-w-btn-header",
21111
- children: /*#__PURE__*/jsxRuntime.jsx(antd.Carousel, _objectSpread2(_objectSpread2({
21112
- afterChange: onChange
21113
- }, rest), {}, {
21125
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Carousel, _objectSpread2(_objectSpread2({}, rest), {}, {
21114
21126
  children: children
21115
21127
  }))
21116
21128
  });
@@ -6180,6 +6180,7 @@ const userHasInterface = (user, app, intf) => {
6180
6180
  };
6181
6181
 
6182
6182
  const en = {
6183
+ "Currently unavailable": "Currently unavailable",
6183
6184
  Description: "Description",
6184
6185
  "missing-inputs": "Missing Inputs",
6185
6186
  "all-inputs-fullfilled": "All inputs in this section are fullfilled",
@@ -7372,6 +7373,7 @@ const en = {
7372
7373
  };
7373
7374
 
7374
7375
  const fr = {
7376
+ "Currently unavailable": "Actuellement indisponible",
7375
7377
  "Description": "Description",
7376
7378
  "missing-inputs": "Données Manquantes",
7377
7379
  "all-inputs-fullfilled": "Toutes les données de cette section ont été saisies.",
@@ -9204,6 +9206,7 @@ const fr = {
9204
9206
  };
9205
9207
 
9206
9208
  const sp = {
9209
+ "Currently unavailable": "Actualmente no disponible",
9207
9210
  "Description": "Descripción",
9208
9211
  "missing-inputs": "Datos que Faltan",
9209
9212
  "all-inputs-fullfilled": "Todas las entradas de esta sección están completas.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.188",
3
+ "version": "0.6.189",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -53,16 +53,13 @@ function CarouselWidget({title, children, ...rest}) {
53
53
  * @param {number} currentSlide - The index of the current slide after change
54
54
  * @private
55
55
  */
56
- const onChange = (currentSlide) => {
57
- console.log(currentSlide);
58
- };
59
56
 
60
57
  return (
61
58
  <Widget
62
59
  title={title}
63
60
  className="with-border-header h-w-btn-header"
64
61
  >
65
- <Carousel afterChange={onChange} {...rest}>
62
+ <Carousel {...rest}>
66
63
  {children}
67
64
  </Carousel>
68
65
  </Widget>
@@ -34,6 +34,10 @@ export const Primary = {
34
34
  }
35
35
  ],
36
36
  "backgroundColor": "#F6FEF9",
37
- "backgroundBorderColor": "#B0F3CB"
37
+ "backgroundBorderColor": "#B0F3CB",
38
+ "buttonConfig": {
39
+ "disabled": true
40
+ },
41
+ t: (s) => s
38
42
  },
39
43
  };
@@ -3,6 +3,7 @@ import Widget from '../index.jsx'
3
3
  import { theme, Tooltip, Tag } from 'antd'
4
4
  import CustomIcon from '../../../Icon/CustomIcon.jsx'
5
5
  import Style from './style.js'
6
+ import { formatClassname } from '../../../../../../helpers/ClassesHelper.js'
6
7
 
7
8
  const { useToken } = theme;
8
9
 
@@ -18,26 +19,35 @@ const WidgetCard = ({
18
19
  iconColor,
19
20
  buttonIcon,
20
21
  imageUrl,
22
+ buttonConfig = {},
23
+ t = () => {},
21
24
  }) => {
22
25
  const { token } = useToken();
23
26
  return (
24
27
  <Style backgroundColor={backgroundColor} backgroundBorderColor={backgroundBorderColor}>
25
28
  <Widget
26
- title={
27
- <div style={{display: "flex", alignItems: "center"}}>
28
- {imageUrl ? <img src={imageUrl} className="widget-card-logo-icon mr-2" />
29
- : <div className="widget-card-logo-icon mr-2">
30
- <CustomIcon name={logoIcon} width={25} height={25} />
31
- </div>
32
- }
33
- <Tooltip title={title}>{title}</Tooltip>
34
- </div>
35
- }
29
+ title={
30
+ <div style={{display: "flex", alignItems: "center"}}>
31
+ {imageUrl ? <img src={imageUrl} className="widget-card-logo-icon mr-2" />
32
+ : <div className="widget-card-logo-icon mr-2">
33
+ <CustomIcon name={logoIcon} width={25} height={25} />
34
+ </div>
35
+ }
36
+ <Tooltip title={title}>{title}</Tooltip>
37
+ </div>
38
+ }
36
39
  addedHeader={
37
40
  <>
38
- <div className="flex-1" /><a className="widget-card-logo-icon" href={link}>
39
- <CustomIcon name={buttonIcon} size={16} color={iconColor || theme.colorPrimary} />
40
- </a>
41
+ <div className="flex-1" />
42
+ <Tooltip title={buttonConfig.disabled ? (buttonConfig?.tooltipText || t("Currently unavailable")) : ""}>
43
+ <a
44
+ className={formatClassname(["widget-card-logo-icon", buttonConfig.disabled && "disabled-anchor"])}
45
+ href={buttonConfig.disabled ? undefined : link}
46
+ onClick={buttonConfig.disabled ? (e) => e.preventDefault() : undefined}
47
+ >
48
+ <CustomIcon name={buttonIcon} size={16} color={iconColor || theme.colorPrimary} />
49
+ </a>
50
+ </Tooltip>
41
51
  </>
42
52
  }
43
53
  loading={loading}
@@ -4,6 +4,11 @@ const Style = styled.div`
4
4
  .daf-widget {
5
5
  background-color: ${props => props.backgroundColor} !important;
6
6
  border-color: ${props => props.backgroundBorderColor} !important;
7
+ transition: box-shadow 0.2s ease-in-out;
8
+
9
+ &:hover {
10
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
11
+ }
7
12
  }
8
13
 
9
14
  .widget-card-logo-icon {
@@ -16,6 +21,11 @@ const Style = styled.div`
16
21
  align-items: center;
17
22
  border: 1px solid #E5E7EB;
18
23
  }
24
+
25
+ .disabled-anchor {
26
+ cursor: not-allowed;
27
+ opacity: 0.5;
28
+ }
19
29
  `;
20
30
 
21
31
  export default Style;
@@ -1,4 +1,5 @@
1
1
  const en = {
2
+ "Currently unavailable": "Currently unavailable",
2
3
  Description: "Description",
3
4
  "missing-inputs": "Missing Inputs",
4
5
  "all-inputs-fullfilled": "All inputs in this section are fullfilled",
@@ -1,4 +1,5 @@
1
1
  const fr = {
2
+ "Currently unavailable": "Actuellement indisponible",
2
3
  "Description": "Description",
3
4
  "missing-inputs": "Données Manquantes",
4
5
  "all-inputs-fullfilled": "Toutes les données de cette section ont été saisies.",
@@ -1,4 +1,5 @@
1
1
  const sp = {
2
+ "Currently unavailable": "Actualmente no disponible",
2
3
  "Description": "Descripción",
3
4
  "missing-inputs": "Datos que Faltan",
4
5
  "all-inputs-fullfilled": "Todas las entradas de esta sección están completas.",
package/.env DELETED
@@ -1,8 +0,0 @@
1
- REACT_APP_API_KEY=
2
- REACT_APP_AUTH_DOMAIN=
3
- REACT_APP_PROJECT_ID=
4
- REACT_APP_STORAGE_BUCKED=
5
- REACT_APP_SENDER_ID=
6
- REACT_APP_APP_ID=
7
- REACT_APP_MEASUREMENT_ID=
8
- REACT_APP_VAPID_KEY=
@@ -1,13 +0,0 @@
1
- {
2
- "cSpell.words": ["cukura"],
3
- "files.autoSave": "afterDelay",
4
- "editor.wordWrap": "on",
5
- "editor.autoClosingBrackets": "always",
6
- "editor.autoClosingComments": "always",
7
- "editor.autoClosingQuotes": "always",
8
- "editor.defaultFormatter": "esbenp.prettier-vscode",
9
- "editor.formatOnPaste": true,
10
- "editor.formatOnSave": true,
11
- "notebook.defaultFormatter": "esbenp.prettier-vscode",
12
- "javascript.format.semicolons": "insert"
13
- }