@gisce/react-ooui 1.2.0-rc.81 → 1.2.0-rc.83

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.
@@ -1,7 +1,7 @@
1
1
  import * as React$s from "react";
2
2
  import React__default, { useContext, useState as useState$1, useEffect, useRef, cloneElement as cloneElement$1, forwardRef, useImperativeHandle, createElement, useMemo as useMemo$3, useLayoutEffect as useLayoutEffect$3, useCallback } from "react";
3
3
  import { Tooltip as Tooltip$3, theme as theme$1, Typography as Typography$2, Form as Form$3, Row, Col, Modal, Button as Button$1, Dropdown, Menu, Spin, Divider, Space, Input as Input$3, Select, Checkbox, Alert, Timeline as Timeline$1, Statistic, Card, Tag as Tag$1, message, DatePicker as DatePicker$1, TimePicker, InputNumber, Progress, Pagination, Tabs, Popover, Radio as Radio$1, Switch as Switch$1, Steps as Steps$1, Layout } from "antd";
4
- import { Label as Label$1, Field as Field$2, Tree as Tree$1, Reference as Reference$1, Selection as Selection$1, Many2one as Many2one$1, Boolean as Boolean$2, Container as Container$1, parseContext, Form as Form$4, Integer as Integer$1, SearchFilter as SearchFilter$1, transformDomainForChildWidget, graphProcessor, parseGraph, graphFieldUtils } from "@gisce/ooui";
4
+ import { Label as Label$1, Field as Field$2, Tree as Tree$1, Reference as Reference$1, Selection as Selection$1, Many2one as Many2one$1, Boolean as Boolean$2, Container as Container$1, parseContext, Form as Form$4, Integer as Integer$1, SearchFieldTypes, SearchFilter as SearchFilter$1, transformDomainForChildWidget, graphProcessor, parseGraph, graphFieldUtils } from "@gisce/ooui";
5
5
  import * as AntIcons from "@ant-design/icons";
6
6
  import AntIcons__default, { QuestionCircleOutlined, ExclamationCircleOutlined, LoadingOutlined, DownOutlined, WarningOutlined, CloseOutlined, CheckOutlined as CheckOutlined$4, TranslationOutlined, FolderOpenOutlined, DownloadOutlined, ClearOutlined, StarFilled, StarOutlined, UpOutlined, SearchOutlined, RightCircleOutlined, ThunderboltOutlined, PrinterOutlined, EnterOutlined as EnterOutlined$4, PlusSquareOutlined, MinusSquareOutlined, FileAddOutlined, AlignLeftOutlined, ApiOutlined, DeleteOutlined, LeftOutlined, RightOutlined, EyeOutlined, FormOutlined, TableOutlined, AreaChartOutlined, CalendarOutlined, LinkOutlined, SaveOutlined, CopyOutlined as CopyOutlined$4, InfoCircleOutlined, ReloadOutlined, EditOutlined as EditOutlined$4, FilterOutlined, CloseCircleFilled as CloseCircleFilled$4, BorderOuterOutlined, SettingOutlined, ExportOutlined } from "@ant-design/icons";
7
7
  import { Interweave } from "interweave";
@@ -5877,12 +5877,12 @@ var required$1 = function(t, r, n, o, a, s) {
5877
5877
  }, pattern$2 = {
5878
5878
  email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
5879
5879
  hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
5880
- }, types$2 = {
5880
+ }, types$1 = {
5881
5881
  integer: function(t) {
5882
- return types$2.number(t) && parseInt(t, 10) === t;
5882
+ return types$1.number(t) && parseInt(t, 10) === t;
5883
5883
  },
5884
5884
  float: function(t) {
5885
- return types$2.number(t) && !types$2.integer(t);
5885
+ return types$1.number(t) && !types$1.integer(t);
5886
5886
  },
5887
5887
  array: function(t) {
5888
5888
  return Array.isArray(t);
@@ -5903,7 +5903,7 @@ var required$1 = function(t, r, n, o, a, s) {
5903
5903
  return isNaN(t) ? !1 : typeof t == "number";
5904
5904
  },
5905
5905
  object: function(t) {
5906
- return typeof t == "object" && !types$2.array(t);
5906
+ return typeof t == "object" && !types$1.array(t);
5907
5907
  },
5908
5908
  method: function(t) {
5909
5909
  return typeof t == "function";
@@ -5923,7 +5923,7 @@ var required$1 = function(t, r, n, o, a, s) {
5923
5923
  return;
5924
5924
  }
5925
5925
  var s = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], l = t.type;
5926
- s.indexOf(l) > -1 ? types$2[l](r) || o.push(format$1(a.messages.types[l], t.fullField, t.type)) : l && typeof r !== t.type && o.push(format$1(a.messages.types[l], t.fullField, t.type));
5926
+ s.indexOf(l) > -1 ? types$1[l](r) || o.push(format$1(a.messages.types[l], t.fullField, t.type)) : l && typeof r !== t.type && o.push(format$1(a.messages.types[l], t.fullField, t.type));
5927
5927
  }, range = function(t, r, n, o, a) {
5928
5928
  var s = typeof t.len == "number", l = typeof t.min == "number", c = typeof t.max == "number", u = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = r, f = null, p = typeof r == "number", y = typeof r == "string", m = Array.isArray(r);
5929
5929
  if (p ? f = "number" : y ? f = "string" : m && (f = "array"), !f)
@@ -17711,19 +17711,7 @@ const {
17711
17711
  &.ant-select:not(.ant-select-customize-input) .ant-select-selector {
17712
17712
  background-color: ${mapToken$1.colorPrimaryBg};
17713
17713
  }
17714
- `, types$1 = {
17715
- text: "text",
17716
- many2one: "many2one",
17717
- char: "char",
17718
- boolean: "boolean",
17719
- selection: "selection",
17720
- float: "float",
17721
- float_time: "float_time",
17722
- progressbar: "progressbar",
17723
- integer: "integer",
17724
- date: "date",
17725
- datetime: "datetime"
17726
- };
17714
+ `;
17727
17715
  function SearchField(e) {
17728
17716
  const {
17729
17717
  field: t
@@ -17733,7 +17721,7 @@ function SearchField(e) {
17733
17721
  t: r
17734
17722
  } = useContext(LocaleContext$1);
17735
17723
  switch (t.type) {
17736
- case types$1.boolean: {
17724
+ case SearchFieldTypes.boolean: {
17737
17725
  const o = new Selection$1({
17738
17726
  name: t._id,
17739
17727
  string: t.label,
@@ -17745,27 +17733,27 @@ function SearchField(e) {
17745
17733
  showLabel: !0
17746
17734
  });
17747
17735
  }
17748
- case types$1.float:
17749
- case types$1.progressbar:
17750
- case types$1.float_time:
17751
- case types$1.integer:
17736
+ case SearchFieldTypes.float:
17737
+ case SearchFieldTypes.progressbar:
17738
+ case SearchFieldTypes.float_time:
17739
+ case SearchFieldTypes.integer:
17752
17740
  return /* @__PURE__ */ jsx(PairFields, {
17753
17741
  ooui: t,
17754
17742
  showLabel: !0
17755
17743
  });
17756
- case types$1.date:
17744
+ case SearchFieldTypes.date:
17757
17745
  return /* @__PURE__ */ jsx(DateRangePicker, {
17758
17746
  ooui: t,
17759
17747
  layout: "vertical",
17760
17748
  showLabel: !0
17761
17749
  });
17762
- case types$1.datetime:
17750
+ case SearchFieldTypes.datetime:
17763
17751
  return /* @__PURE__ */ jsx(DateTimeRangePicker, {
17764
17752
  ooui: t,
17765
17753
  layout: "vertical",
17766
17754
  showLabel: !0
17767
17755
  });
17768
- case types$1.selection:
17756
+ case SearchFieldTypes.selection:
17769
17757
  return /* @__PURE__ */ jsx(MultiSelection, {
17770
17758
  layout: "vertical",
17771
17759
  ooui: t,
@@ -24170,17 +24158,14 @@ const One2manyInput = (e) => {
24170
24158
  }
24171
24159
  };
24172
24160
  async function Z() {
24173
- k && (B.current = transformDomainForChildWidget({
24174
- domain: await ConnectionProvider.getHandler().evalDomain({
24175
- domain: k,
24176
- values: transformPlainMany2Ones({
24177
- fields: p(),
24178
- values: y()
24179
- }),
24161
+ k && (B.current = await ConnectionProvider.getHandler().evalDomain({
24162
+ domain: k,
24163
+ values: transformPlainMany2Ones({
24180
24164
  fields: p(),
24181
- context: m()
24165
+ values: y()
24182
24166
  }),
24183
- widgetFieldName: X
24167
+ fields: p(),
24168
+ context: m()
24184
24169
  })), h && h.length > 0 && (B.current = B.current.concat(transformDomainForChildWidget({
24185
24170
  domain: h,
24186
24171
  widgetFieldName: X