datastake-daf 0.6.143 → 0.6.145

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.
@@ -3065,7 +3065,7 @@ const config$3 = {
3065
3065
  Integration: config$4
3066
3066
  };
3067
3067
 
3068
- const _excluded$r = ["width", "height", "size", "name", "fill"];
3068
+ const _excluded$q = ["width", "height", "size", "name", "fill"];
3069
3069
  const CustomIcon = _ref => {
3070
3070
  let {
3071
3071
  width = 14,
@@ -3074,7 +3074,7 @@ const CustomIcon = _ref => {
3074
3074
  name = "",
3075
3075
  fill = "none"
3076
3076
  } = _ref,
3077
- props = _objectWithoutProperties(_ref, _excluded$r);
3077
+ props = _objectWithoutProperties(_ref, _excluded$q);
3078
3078
  const conf = config$3[name];
3079
3079
  if (conf) {
3080
3080
  return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
@@ -9276,7 +9276,7 @@ createCommonjsModule(function (module, exports) {
9276
9276
  !function(e,n){module.exports=n();}(commonjsGlobal,(function(){return {name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var n=["th","st","nd","rd"],t=e%100;return "["+e+(n[(t-20)%10]||n[t]||n[0])+"]"}}}));
9277
9277
  });
9278
9278
 
9279
- const _excluded$q = ["view", "module", "scope", "form", "meta"];
9279
+ const _excluded$p = ["view", "module", "scope", "form", "meta"];
9280
9280
  dayjs__default["default"].extend(customParseFormat);
9281
9281
  dayjs__default["default"].extend(utc);
9282
9282
  dayjs__default["default"].extend(utc);
@@ -9650,7 +9650,7 @@ const filterCreateData = data => {
9650
9650
  form,
9651
9651
  meta
9652
9652
  } = data,
9653
- rest = _objectWithoutProperties(data, _excluded$q);
9653
+ rest = _objectWithoutProperties(data, _excluded$p);
9654
9654
  const _meta = isObjectEmpty(meta) ? undefined : meta;
9655
9655
  return _objectSpread2(_objectSpread2({}, rest), {}, {
9656
9656
  meta: _meta
@@ -10035,7 +10035,7 @@ SelectFilters.propTypes = {
10035
10035
  apiUrl: PropTypes__default["default"].string
10036
10036
  };
10037
10037
 
10038
- const _excluded$p = ["columns", "data", "defaultFilters", "style", "pagination", "loading", "onChange", "onFilterChange", "selectOptions", "filtersConfig", "rowSelection", "setShowFilters", "rowKey", "showFilters", "hideOnLoading", "sourcesKey", "className", "projects", "t", "selectedProject", "sourceId", "projectSources", "language", "scrollX", "apiUrl", "app", "doEmptyRows"];
10038
+ const _excluded$o = ["columns", "data", "defaultFilters", "style", "pagination", "loading", "onChange", "onFilterChange", "selectOptions", "filtersConfig", "rowSelection", "setShowFilters", "rowKey", "showFilters", "hideOnLoading", "sourcesKey", "className", "projects", "t", "selectedProject", "sourceId", "projectSources", "language", "scrollX", "apiUrl", "app", "doEmptyRows"];
10039
10039
  function DAFTable(_ref) {
10040
10040
  let {
10041
10041
  columns = [],
@@ -10066,7 +10066,7 @@ function DAFTable(_ref) {
10066
10066
  app,
10067
10067
  doEmptyRows
10068
10068
  } = _ref,
10069
- rest = _objectWithoutProperties(_ref, _excluded$p);
10069
+ rest = _objectWithoutProperties(_ref, _excluded$o);
10070
10070
  const [source, setSource] = React.useState([]);
10071
10071
  const projectData = (projects || []).find(p => p.id === selectedProject);
10072
10072
  const [filtersInit, setFiltersInit] = React.useState(!loading);
@@ -10788,7 +10788,7 @@ Pagination.propTypes = {
10788
10788
  isMobile: PropTypes__default["default"].bool
10789
10789
  };
10790
10790
 
10791
- const _excluded$o = ["size", "maxHeight", "dataSource", "columns", "pagination"];
10791
+ const _excluded$n = ["size", "maxHeight", "dataSource", "columns", "pagination"];
10792
10792
  function StickyTable(_ref) {
10793
10793
  let {
10794
10794
  size = null,
@@ -10797,7 +10797,7 @@ function StickyTable(_ref) {
10797
10797
  columns = {},
10798
10798
  pagination = false
10799
10799
  } = _ref,
10800
- props = _objectWithoutProperties(_ref, _excluded$o);
10800
+ props = _objectWithoutProperties(_ref, _excluded$n);
10801
10801
  return /*#__PURE__*/jsxRuntime.jsx("div", {
10802
10802
  className: "daf-sticky-table",
10803
10803
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Table, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -11262,7 +11262,7 @@ const BTN_SIZE = {
11262
11262
  LG: 'large'
11263
11263
  };
11264
11264
 
11265
- const _excluded$n = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
11265
+ const _excluded$m = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
11266
11266
  function DafButton(_ref) {
11267
11267
  let {
11268
11268
  content = '',
@@ -11276,7 +11276,7 @@ function DafButton(_ref) {
11276
11276
  style = {},
11277
11277
  className = ''
11278
11278
  } = _ref,
11279
- restProps = _objectWithoutProperties(_ref, _excluded$n);
11279
+ restProps = _objectWithoutProperties(_ref, _excluded$m);
11280
11280
  return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
11281
11281
  icon: icon,
11282
11282
  type: type,
@@ -11510,12 +11510,12 @@ const Style$H = dt.div`
11510
11510
  }
11511
11511
  `;
11512
11512
 
11513
- const _excluded$m = ["children"];
11513
+ const _excluded$l = ["children"];
11514
11514
  const BorderedButton = _ref => {
11515
11515
  let {
11516
11516
  children
11517
11517
  } = _ref,
11518
- props = _objectWithoutProperties(_ref, _excluded$m);
11518
+ props = _objectWithoutProperties(_ref, _excluded$l);
11519
11519
  return /*#__PURE__*/jsxRuntime.jsx(Style$H, {
11520
11520
  className: "d-btn-cont",
11521
11521
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
@@ -11524,7 +11524,7 @@ const BorderedButton = _ref => {
11524
11524
  });
11525
11525
  };
11526
11526
 
11527
- var _templateObject$c;
11527
+ var _templateObject$b;
11528
11528
  const variantConfig = {
11529
11529
  default: {
11530
11530
  className: "default-badge",
@@ -11642,7 +11642,7 @@ function Badge(_ref) {
11642
11642
  })
11643
11643
  });
11644
11644
  }
11645
- const Style$G = dt.div(_templateObject$c || (_templateObject$c = _taggedTemplateLiteral(["\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 4px;\n\tpadding: 4px;\n\tmax-width: 100%;\n\n\toverflow: hidden;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n\n\t> svg {\n\t\tflex-shrink: 0;\n\t}\n\n\t> span {\n\t\tall: unset;\n\t\tmargin-left: 4px;\n\t\tfont-weight: 600;\n\t\tfont-size: 12px;\n\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t\tdisplay: block;\n\t\tmax-width: 100%;\n\t}\n"])));
11645
+ const Style$G = dt.div(_templateObject$b || (_templateObject$b = _taggedTemplateLiteral(["\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 4px;\n\tpadding: 4px;\n\tmax-width: 100%;\n\n\toverflow: hidden;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n\n\t> svg {\n\t\tflex-shrink: 0;\n\t}\n\n\t> span {\n\t\tall: unset;\n\t\tmargin-left: 4px;\n\t\tfont-weight: 600;\n\t\tfont-size: 12px;\n\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t\tdisplay: block;\n\t\tmax-width: 100%;\n\t}\n"])));
11646
11646
  Badge.propTypes = {
11647
11647
  children: PropTypes__default["default"].node,
11648
11648
  className: PropTypes__default["default"].string,
@@ -11655,12 +11655,12 @@ Badge.propTypes = {
11655
11655
  props: PropTypes__default["default"].object
11656
11656
  };
11657
11657
 
11658
- const _excluded$l = ["icon"];
11658
+ const _excluded$k = ["icon"];
11659
11659
  function GetIcon(_ref) {
11660
11660
  let {
11661
11661
  icon
11662
11662
  } = _ref,
11663
- props = _objectWithoutProperties(_ref, _excluded$l);
11663
+ props = _objectWithoutProperties(_ref, _excluded$k);
11664
11664
  let Icon = Icons__namespace.CloseOutlined;
11665
11665
  if (Icons__namespace[icon]) {
11666
11666
  Icon = Icons__namespace[icon];
@@ -11982,7 +11982,7 @@ GoToSelect.propTypes = {
11982
11982
  t: PropTypes__default["default"].func
11983
11983
  };
11984
11984
 
11985
- const _excluded$k = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
11985
+ const _excluded$j = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
11986
11986
  const {
11987
11987
  useToken: useToken$i
11988
11988
  } = antd.theme;
@@ -12075,7 +12075,7 @@ function Multiselect(_ref) {
12075
12075
  isSingle = false,
12076
12076
  selectionType = SELECTION_TYPES.DEFAULT
12077
12077
  } = _ref,
12078
- restProps = _objectWithoutProperties(_ref, _excluded$k);
12078
+ restProps = _objectWithoutProperties(_ref, _excluded$j);
12079
12079
  const {
12080
12080
  token
12081
12081
  } = useToken$i();
@@ -12401,25 +12401,26 @@ function Loading(_ref) {
12401
12401
  const {
12402
12402
  Paragraph
12403
12403
  } = antd.Typography;
12404
- const useHeader = ({
12405
- title = '',
12406
- tooltip = '',
12407
- supportText = '',
12408
- tags = [],
12409
- actionButtons: _actionButtons = [],
12410
- titleTooltip,
12411
- className,
12412
- addedHeader = null,
12413
- addedHeaderFirst,
12414
- extraButtons: _extraButtons = [],
12415
- onDownload,
12416
- downloadDisabled,
12417
- goBackTo,
12418
- loading,
12419
- renderExtraComponents,
12420
- app = '',
12421
- isViewMode = false
12422
- }) => {
12404
+ const useHeader = _ref => {
12405
+ let {
12406
+ title = '',
12407
+ tooltip = '',
12408
+ supportText = '',
12409
+ tags = [],
12410
+ actionButtons: _actionButtons = [],
12411
+ titleTooltip,
12412
+ className,
12413
+ addedHeader = null,
12414
+ addedHeaderFirst,
12415
+ extraButtons: _extraButtons = [],
12416
+ onDownload,
12417
+ downloadDisabled,
12418
+ goBackTo,
12419
+ loading,
12420
+ renderExtraComponents,
12421
+ app = '',
12422
+ isViewMode = false
12423
+ } = _ref;
12423
12424
  const downloadButtonAction = app && app === 'sbg' && isViewMode ? null : {
12424
12425
  onClick: onDownload,
12425
12426
  disabled: downloadDisabled,
@@ -12445,9 +12446,9 @@ const useHeader = ({
12445
12446
  const buttonCont = React.useRef();
12446
12447
  const [mainContWidth, setMainContWidth] = React.useState(600);
12447
12448
  const [buttonContWidth, setButtonContWidth] = React.useState(0);
12448
- const hasSupportText = !!supportText?.length;
12449
- const hasTags = !!tags?.length;
12450
- const hasButtons = !!(actionButtons?.length || extraButtons?.length);
12449
+ const hasSupportText = !!(supportText !== null && supportText !== void 0 && supportText.length);
12450
+ const hasTags = !!(tags !== null && tags !== void 0 && tags.length);
12451
+ const hasButtons = !!(actionButtons !== null && actionButtons !== void 0 && actionButtons.length || extraButtons !== null && extraButtons !== void 0 && extraButtons.length);
12451
12452
  React.useEffect(() => {
12452
12453
  const mainContObserver = new ResizeObserver(entries => {
12453
12454
  const _mainEntry = entries[0];
@@ -12741,7 +12742,7 @@ DAFHeader.propTypes = {
12741
12742
  downloadDisabled: PropTypes__default["default"].any
12742
12743
  };
12743
12744
 
12744
- const _excluded$j = ["tabs", "onChange", "value", "className"];
12745
+ const _excluded$i = ["tabs", "onChange", "value", "className"];
12745
12746
  function TabsHeader(_ref) {
12746
12747
  let {
12747
12748
  tabs = [],
@@ -12749,7 +12750,7 @@ function TabsHeader(_ref) {
12749
12750
  value = '',
12750
12751
  className = 'mt-2'
12751
12752
  } = _ref,
12752
- rest = _objectWithoutProperties(_ref, _excluded$j);
12753
+ rest = _objectWithoutProperties(_ref, _excluded$i);
12753
12754
  return /*#__PURE__*/jsxRuntime.jsx("div", {
12754
12755
  className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
12755
12756
  children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
@@ -12846,16 +12847,14 @@ DrawerHeader.propTypes = {
12846
12847
  tabsConfig: PropTypes__default["default"].any
12847
12848
  };
12848
12849
 
12849
- const _excluded$i = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
12850
- const useFooter = _ref => {
12851
- let {
12852
- leftContent,
12853
- centerContent,
12854
- rightContent,
12855
- actionButtons,
12856
- app,
12857
- isViewMode
12858
- } = _ref;
12850
+ const useFooter = ({
12851
+ leftContent,
12852
+ centerContent,
12853
+ rightContent,
12854
+ actionButtons,
12855
+ app,
12856
+ isViewMode
12857
+ }) => {
12859
12858
  const renderFooterContent = React.useMemo(() => {
12860
12859
  const FooterContent = () => /*#__PURE__*/jsxRuntime.jsxs("div", {
12861
12860
  className: "daf-footer-content",
@@ -12871,18 +12870,18 @@ const useFooter = _ref => {
12871
12870
  className: "daf-footer-actions",
12872
12871
  children: actionButtons.map((button, index) => {
12873
12872
  const {
12874
- label,
12875
- onClick,
12876
- icon,
12877
- type = BTN_TYPES.PRIMARY,
12878
- tooltip,
12879
- disabled = false,
12880
- loading = false,
12881
- style = {},
12882
- className = ""
12883
- } = button,
12884
- restProps = _objectWithoutProperties(button, _excluded$i);
12885
- return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
12873
+ label,
12874
+ onClick,
12875
+ icon,
12876
+ type = BTN_TYPES.PRIMARY,
12877
+ tooltip,
12878
+ disabled = false,
12879
+ loading = false,
12880
+ style = {},
12881
+ className = "",
12882
+ ...restProps
12883
+ } = button;
12884
+ return /*#__PURE__*/jsxRuntime.jsx(DafButton, {
12886
12885
  content: label,
12887
12886
  type: type,
12888
12887
  size: BTN_SIZE.MD,
@@ -12894,8 +12893,9 @@ const useFooter = _ref => {
12894
12893
  loading: loading,
12895
12894
  title: tooltip,
12896
12895
  style: style,
12897
- className: className
12898
- }, restProps), index);
12896
+ className: className,
12897
+ ...restProps
12898
+ }, index);
12899
12899
  })
12900
12900
  })]
12901
12901
  })]
@@ -12908,8 +12908,180 @@ const useFooter = _ref => {
12908
12908
  };
12909
12909
  };
12910
12910
 
12911
- var _templateObject$b;
12912
- const FooterContainer = dt.div(_templateObject$b || (_templateObject$b = _taggedTemplateLiteral(["\n\t.daf-footer {\n\t\tbackground: #ffffff;\n\t\tborder-top: 1px solid #e8e8e8;\n\t\tborder-left: none;\n\t\tborder-right: none;\n\t\tborder-bottom: none;\n\t\tborder-radius: 0;\n\t\tpadding: 24px;\n\t\tmargin: 0;\n\t\tbox-shadow: none;\n\t\tz-index: 100;\n\t\tposition: relative;\n\t\tmin-height: 80px;\n\n\t\t&.daf-footer-fixed {\n\t\t\tposition: fixed;\n\t\t\tbottom: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tz-index: 1000;\n\t\t}\n\n\t\t.daf-footer-content {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\twidth: 100%;\n\t\t\tmin-height: 32px;\n\n\t\t\t.daf-footer-left {\n\t\t\t\tflex: 1;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: flex-start;\n\t\t\t}\n\n\t\t\t.daf-footer-center {\n\t\t\t\tflex: 1;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t}\n\n\t\t\t.daf-footer-right {\n\t\t\t\tflex: 1;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: flex-end;\n\t\t\t\tgap: 12px;\n\n\t\t\t\t.daf-footer-actions {\n\t\t\t\t\t.ant-btn {\n\t\t\t\t\t\theight: 40px;\n\t\t\t\t\t\tpadding: 0 24px;\n\t\t\t\t\t\tborder-radius: 6px;\n\t\t\t\t\t\tfont-weight: 500;\n\t\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\t\ttransition: all 0.3s ease;\n\t\t\t\t\t\tborder: 1px solid transparent;\n\n\t\t\t\t\t\t&.ant-btn-primary {\n\t\t\t\t\t\t\tbackground-color: var(--color-primary-70);\n\t\t\t\t\t\t\tcolor: #ffffff;\n\t\t\t\t\t\t\tborder-color: var(--color-primary-70);\n\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tbackground-color: var(--color-primary-60);\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-60);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:active {\n\t\t\t\t\t\t\t\tbackground-color: var(--color-primary-80);\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-80);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:disabled {\n\t\t\t\t\t\t\t\tbackground-color: #f5f5f5;\n\t\t\t\t\t\t\t\tcolor: #bfbfbf;\n\t\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&.ant-btn-default {\n\t\t\t\t\t\t\tbackground: #ffffff;\n\t\t\t\t\t\t\tcolor: #666666;\n\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-70);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-70);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:active {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-80);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-80);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:disabled {\n\t\t\t\t\t\t\t\tbackground-color: #f5f5f5;\n\t\t\t\t\t\t\t\tcolor: #bfbfbf;\n\t\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&.ant-btn-ghost {\n\t\t\t\t\t\t\tbackground: transparent;\n\t\t\t\t\t\t\tcolor: #666666;\n\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\n\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-70);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-70);\n\t\t\t\t\t\t\t\tbackground: rgba(0, 0, 0, 0.02);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:active {\n\t\t\t\t\t\t\t\tborder-color: var(--color-primary-80);\n\t\t\t\t\t\t\t\tcolor: var(--color-primary-80);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&:disabled {\n\t\t\t\t\t\t\t\tcolor: #bfbfbf;\n\t\t\t\t\t\t\t\tborder-color: #d9d9d9;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Responsive design */\n\t@media (max-width: 768px) {\n\t\t.daf-footer {\n\t\t\tmargin: 0;\n\t\t\tpadding: 16px;\n\n\t\t\t.daf-footer-content {\n\t\t\t\tflex-direction: column;\n\t\t\t\tgap: 16px;\n\t\t\t\talign-items: stretch;\n\n\t\t\t\t.daf-footer-left,\n\t\t\t\t.daf-footer-center,\n\t\t\t\t.daf-footer-right {\n\t\t\t\t\tflex: none;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\n\t\t\t\t.daf-footer-right {\n\t\t\t\t\t.daf-footer-actions {\n\t\t\t\t\t\tjustify-content: center;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/* App-specific styling */\n\t&.sbg-app {\n\t\t.daf-footer {\n\t\t\tbackground: #f8f9fa;\n\t\t\tborder-color: #e9ecef;\n\t\t}\n\t}\n\n\t&.nashiriki-app {\n\t\t.daf-footer {\n\t\t\tbackground: #fff;\n\t\t\tborder-color: #d9d9d9;\n\t\t}\n\t}\n"])));
12911
+ const FooterContainer = dt.div`
12912
+ .daf-footer {
12913
+ background: #ffffff;
12914
+ border-top: 1px solid #e8e8e8;
12915
+ border-left: none;
12916
+ border-right: none;
12917
+ border-bottom: none;
12918
+ border-radius: 0;
12919
+ padding: 24px;
12920
+ margin: 0;
12921
+ box-shadow: none;
12922
+ z-index: 100;
12923
+ position: relative;
12924
+ min-height: 80px;
12925
+
12926
+ &.daf-footer-fixed {
12927
+ position: fixed;
12928
+ bottom: 0;
12929
+ left: 0;
12930
+ right: 0;
12931
+ z-index: 1000;
12932
+ }
12933
+
12934
+ .daf-footer-content {
12935
+ display: flex;
12936
+ align-items: center;
12937
+ justify-content: space-between;
12938
+ width: 100%;
12939
+ min-height: 32px;
12940
+
12941
+ .daf-footer-left {
12942
+ flex: 1;
12943
+ display: flex;
12944
+ align-items: center;
12945
+ justify-content: flex-start;
12946
+ }
12947
+
12948
+ .daf-footer-center {
12949
+ flex: 1;
12950
+ display: flex;
12951
+ align-items: center;
12952
+ justify-content: center;
12953
+ }
12954
+
12955
+ .daf-footer-right {
12956
+ flex: 1;
12957
+ display: flex;
12958
+ align-items: center;
12959
+ justify-content: flex-end;
12960
+ gap: 12px;
12961
+
12962
+ .daf-footer-actions {
12963
+ .ant-btn {
12964
+ height: 40px;
12965
+ padding: 0 24px;
12966
+ border-radius: 6px;
12967
+ font-weight: 500;
12968
+ font-size: 14px;
12969
+ transition: all 0.3s ease;
12970
+ border: 1px solid transparent;
12971
+
12972
+ &.ant-btn-primary {
12973
+ background-color: var(--color-primary-70);
12974
+ color: #ffffff;
12975
+ border-color: var(--color-primary-70);
12976
+
12977
+ &:hover {
12978
+ background-color: var(--color-primary-60);
12979
+ border-color: var(--color-primary-60);
12980
+ }
12981
+
12982
+ &:active {
12983
+ background-color: var(--color-primary-80);
12984
+ border-color: var(--color-primary-80);
12985
+ }
12986
+
12987
+ &:disabled {
12988
+ background-color: #f5f5f5;
12989
+ color: #bfbfbf;
12990
+ border-color: #d9d9d9;
12991
+ }
12992
+ }
12993
+
12994
+ &.ant-btn-default {
12995
+ background: #ffffff;
12996
+ color: #666666;
12997
+ border-color: #d9d9d9;
12998
+
12999
+ &:hover {
13000
+ border-color: var(--color-primary-70);
13001
+ color: var(--color-primary-70);
13002
+ }
13003
+
13004
+ &:active {
13005
+ border-color: var(--color-primary-80);
13006
+ color: var(--color-primary-80);
13007
+ }
13008
+
13009
+ &:disabled {
13010
+ background-color: #f5f5f5;
13011
+ color: #bfbfbf;
13012
+ border-color: #d9d9d9;
13013
+ }
13014
+ }
13015
+
13016
+ &.ant-btn-ghost {
13017
+ background: transparent;
13018
+ color: #666666;
13019
+ border-color: #d9d9d9;
13020
+
13021
+ &:hover {
13022
+ border-color: var(--color-primary-70);
13023
+ color: var(--color-primary-70);
13024
+ background: rgba(0, 0, 0, 0.02);
13025
+ }
13026
+
13027
+ &:active {
13028
+ border-color: var(--color-primary-80);
13029
+ color: var(--color-primary-80);
13030
+ }
13031
+
13032
+ &:disabled {
13033
+ color: #bfbfbf;
13034
+ border-color: #d9d9d9;
13035
+ }
13036
+ }
13037
+ }
13038
+ }
13039
+ }
13040
+ }
13041
+ }
13042
+
13043
+ /* Responsive design */
13044
+ @media (max-width: 768px) {
13045
+ .daf-footer {
13046
+ margin: 0;
13047
+ padding: 16px;
13048
+
13049
+ .daf-footer-content {
13050
+ flex-direction: column;
13051
+ gap: 16px;
13052
+ align-items: stretch;
13053
+
13054
+ .daf-footer-left,
13055
+ .daf-footer-center,
13056
+ .daf-footer-right {
13057
+ flex: none;
13058
+ justify-content: center;
13059
+ }
13060
+
13061
+ .daf-footer-right {
13062
+ .daf-footer-actions {
13063
+ justify-content: center;
13064
+ }
13065
+ }
13066
+ }
13067
+ }
13068
+ }
13069
+
13070
+ /* App-specific styling */
13071
+ &.sbg-app {
13072
+ .daf-footer {
13073
+ background: #f8f9fa;
13074
+ border-color: #e9ecef;
13075
+ }
13076
+ }
13077
+
13078
+ &.nashiriki-app {
13079
+ .daf-footer {
13080
+ background: #fff;
13081
+ border-color: #d9d9d9;
13082
+ }
13083
+ }
13084
+ `;
12913
13085
 
12914
13086
  function DAFFooter(_ref) {
12915
13087
  let {
@@ -13777,9 +13949,8 @@ const determineHasChildren = ({
13777
13949
 
13778
13950
  const sortByPosition = (items, getConfig) => {
13779
13951
  return items.sort((a, b) => {
13780
- var _getConfig, _getConfig2;
13781
- const positionA = ((_getConfig = getConfig(a)) === null || _getConfig === void 0 ? void 0 : _getConfig.position) || 0;
13782
- const positionB = ((_getConfig2 = getConfig(b)) === null || _getConfig2 === void 0 ? void 0 : _getConfig2.position) || 0;
13952
+ const positionA = getConfig(a)?.position || 0;
13953
+ const positionB = getConfig(b)?.position || 0;
13783
13954
  return positionA - positionB;
13784
13955
  });
13785
13956
  };
@@ -13796,7 +13967,7 @@ const resolveDynamicLabel = (labelConfig, item, defaultLabel) => {
13796
13967
  const parts = labelKey.split(' is ');
13797
13968
  if (parts.length === 2) {
13798
13969
  const [conditionKey, conditionValue] = parts;
13799
- if ((item === null || item === void 0 ? void 0 : item[conditionKey]) === conditionValue) {
13970
+ if (item?.[conditionKey] === conditionValue) {
13800
13971
  return labelConfig[labelKey];
13801
13972
  }
13802
13973
  }
@@ -16856,7 +17027,7 @@ function StakeholderIcon$1({
16856
17027
  const isSmall = isSmallMarker(zoom) || isExtraSmallMarker(zoom);
16857
17028
  const isMedium = isMediumMarker(zoom);
16858
17029
  const isSelected = React.useMemo(() => selectedMarkersId.includes(data.datastakeId), [selectedMarkersId, data.datastakeId]);
16859
- const isOpen = React.useMemo(() => openPopupIdRef.current === data.datastakeId, [openPopupIdRef.current, data.datastakeId]);
17030
+ React.useMemo(() => openPopupIdRef.current === data.datastakeId, [openPopupIdRef.current, data.datastakeId]);
16860
17031
  const linkNodesData = React.useMemo(() => {
16861
17032
  const nodes = [];
16862
17033
  const links = data.links || [];
@@ -16998,39 +17169,45 @@ function StakeholderIcon$1({
16998
17169
  });
16999
17170
  });
17000
17171
  }, [mapRef, x, y, parentData, linkNodesData, isSelected, zoom, isForceOpen]);
17001
- return /*#__PURE__*/jsxRuntime.jsx(antd.Popover, {
17002
- content: renderTooltipJsx({
17003
- title: data.name,
17004
- subTitle: data.subTitle,
17005
- total: data.sources,
17006
- className: "pt-0 pb-0",
17007
- items: renderTooltip(data),
17008
- link,
17009
- onClickLink: () => {
17010
- const popovers = document.querySelectorAll(".ant-popover");
17011
- popovers.forEach(popover => {
17012
- if (popover && popover.parentNode) {
17013
- popover.parentNode.removeChild(popover);
17014
- }
17015
- });
17016
- onClickLink(data);
17017
- }
17018
- }),
17019
- trigger: "click",
17020
- open: isOpen,
17021
- children: /*#__PURE__*/jsxRuntime.jsx(StakeholderMarker, {
17022
- className: `${data.type} ${isSelected ? "selected" : selectedMarkersId.length > 0 ? "unselected" : ""}
17172
+ return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
17173
+ children: /*#__PURE__*/jsxRuntime.jsx(antd.Popover, {
17174
+ content: renderTooltipJsx({
17175
+ title: data.name,
17176
+ subTitle: data.subTitle,
17177
+ total: data.sources,
17178
+ className: "pt-0 pb-0",
17179
+ items: renderTooltip(data),
17180
+ link,
17181
+ onClickLink: () => {
17182
+ // const popovers = document.querySelectorAll(".ant-popover");
17183
+
17184
+ // popovers.forEach((popover) => {
17185
+ // if (popover && popover.parentNode) {
17186
+ // popover.parentNode.removeChild(popover);
17187
+ // }
17188
+ // });
17189
+ onClickLink(data);
17190
+ }
17191
+ })
17192
+ // trigger="click"
17193
+ // zIndex={1000}
17194
+ // open={isOpen}
17195
+ ,
17196
+ getPopupContainer: () => document.getElementById(data.datastakeId),
17197
+ children: /*#__PURE__*/jsxRuntime.jsx(StakeholderMarker, {
17198
+ className: `${data.type} ${isSelected ? "selected" : selectedMarkersId.length > 0 ? "unselected" : ""}
17023
17199
  ${isSmall ? "small" : isMedium ? "medium" : "large"}
17024
17200
  ${className}`,
17025
- onClick: () => handleSelectMarker(data),
17026
- style: {
17027
- opacity: isExtraSmallMarker(zoom) && !isForceOpen ? 0 : 1,
17028
- pointerEvents: isExtraSmallMarker(zoom) && !isForceOpen ? "none" : "auto"
17029
- },
17030
- children: !isSmall && /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
17031
- name: getStakeholderIcon(data?.type || ""),
17032
- size: isMedium ? 13 : 16,
17033
- color: !isSelected && selectedMarkersId.length > 0 ? "white" : "white"
17201
+ onClick: () => handleSelectMarker(data),
17202
+ style: {
17203
+ opacity: isExtraSmallMarker(zoom) && !isForceOpen ? 0 : 1,
17204
+ pointerEvents: isExtraSmallMarker(zoom) && !isForceOpen ? "none" : "auto"
17205
+ },
17206
+ children: !isSmall && /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
17207
+ name: getStakeholderIcon(data?.type || ""),
17208
+ size: isMedium ? 13 : 16,
17209
+ color: !isSelected && selectedMarkersId.length > 0 ? "white" : "white"
17210
+ })
17034
17211
  })
17035
17212
  })
17036
17213
  });
@@ -17045,6 +17222,7 @@ function LocationIcon({
17045
17222
  onClickLink,
17046
17223
  selectedMarkersId,
17047
17224
  handleSelectMarker,
17225
+ i,
17048
17226
  mapRef,
17049
17227
  setMapMarkers,
17050
17228
  openPopupIdRef,
@@ -17090,7 +17268,7 @@ function LocationIcon({
17090
17268
  }, [data.stakeholders, zoom]);
17091
17269
  React.useEffect(() => {
17092
17270
  stakeholdersOfLocation.map((stakeholder, index) => {
17093
- const markerId = `${index}${stakeholder.datastakeId}`;
17271
+ const markerId = `${stakeholder.datastakeId}`;
17094
17272
  const {
17095
17273
  x,
17096
17274
  y,
@@ -17212,8 +17390,14 @@ function LocationIcon({
17212
17390
  items: renderTooltip(data),
17213
17391
  link,
17214
17392
  onClickLink: () => onClickLink(data)
17215
- }),
17216
- open: (!openPopupIdRef.current || openPopupIdRef.current === data.datastakeId) && isHovering,
17393
+ })
17394
+ // open={
17395
+ // (!openPopupIdRef.current || openPopupIdRef.current === data.datastakeId) &&
17396
+ // isHovering
17397
+ // }
17398
+ ,
17399
+
17400
+ getPopupContainer: () => document.getElementById(i),
17217
17401
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
17218
17402
  style: {
17219
17403
  position: "relative",
@@ -17240,9 +17424,7 @@ function LocationIcon({
17240
17424
  zoom: zoom,
17241
17425
  onMouseEnter: () => setIsHovering(true),
17242
17426
  onMouseLeave: () => {
17243
- setTimeout(() => {
17244
- setIsHovering(false);
17245
- }, 100);
17427
+ setIsHovering(false);
17246
17428
  },
17247
17429
  selectedMarkersId: selectedMarkersId
17248
17430
  })]
@@ -17699,6 +17881,7 @@ function useMapHelper$1({
17699
17881
  root.render( /*#__PURE__*/jsxRuntime.jsx(LocationIcon, {
17700
17882
  data: data,
17701
17883
  zoom: zoom,
17884
+ i: i,
17702
17885
  allData: allData,
17703
17886
  link: link,
17704
17887
  renderTooltip: renderTooltip,
@@ -17948,7 +18131,6 @@ const useMap$1 = ({
17948
18131
  handleSelectMarker
17949
18132
  });
17950
18133
  function handleSelectMarker(clickedMarker) {
17951
- destroyAllPopovers();
17952
18134
  setSelectedMarkersId(prev => {
17953
18135
  if (prev.includes(clickedMarker.datastakeId)) {
17954
18136
  openPopupIdRef.current = null;
@@ -17970,14 +18152,14 @@ const useMap$1 = ({
17970
18152
  setMarkerWithPopup(null);
17971
18153
  }
17972
18154
  function destroyAllPopovers() {
17973
- if (isStakeholder(markerWithPopup?.type)) {
17974
- const popovers = document.querySelectorAll(".ant-popover");
17975
- popovers.forEach(popover => {
17976
- if (popover && popover.parentNode) {
17977
- popover.parentNode.removeChild(popover);
17978
- }
17979
- });
17980
- }
18155
+ // if (isStakeholder(markerWithPopup?.type)) {
18156
+ // const popovers = document.querySelectorAll(".ant-popover");
18157
+ // popovers.forEach((popover) => {
18158
+ // if (popover && popover.parentNode) {
18159
+ // popover.parentNode.removeChild(popover);
18160
+ // }
18161
+ // });
18162
+ // }
17981
18163
  }
17982
18164
  const addAllDataToMap = () => {
17983
18165
  if (type === "chain" && markerWithPopup && isStakeholder(markerWithPopup?.type)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.143",
3
+ "version": "0.6.145",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",