@gisce/react-ooui 1.1.64 → 1.1.65

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 from "react";
2
2
  import React__default, { useContext, useState, useEffect, useRef, useLayoutEffect, Component, useCallback, forwardRef, useImperativeHandle } from "react";
3
3
  import { Tooltip as Tooltip$2, Typography as Typography$1, Form as Form$3, Row, Col, Modal, Button as Button$1, Dropdown, Menu, Spin, Divider, Space, Input as Input$1, Select, Checkbox, Alert, Timeline as Timeline$1, Statistic, Card, Tag as Tag$1, message as message$1, 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 as ExclamationCircleOutlined$3, LoadingOutlined as LoadingOutlined$3, DownOutlined, WarningOutlined, CloseOutlined as CloseOutlined$3, CheckOutlined as CheckOutlined$3, TranslationOutlined, FolderOpenOutlined, DownloadOutlined, ClearOutlined, StarFilled, StarOutlined, UpOutlined, SearchOutlined, RightCircleOutlined, ThunderboltOutlined, PrinterOutlined, EnterOutlined as EnterOutlined$3, PlusSquareOutlined, MinusSquareOutlined, FileAddOutlined, AlignLeftOutlined, ApiOutlined, DeleteOutlined, LeftOutlined, RightOutlined, EyeOutlined, FormOutlined, TableOutlined, AreaChartOutlined, CalendarOutlined, LinkOutlined, SaveOutlined, CopyOutlined as CopyOutlined$3, InfoCircleOutlined as InfoCircleOutlined$3, ReloadOutlined, EditOutlined as EditOutlined$3, FilterOutlined, CloseCircleFilled as CloseCircleFilled$3, BorderOuterOutlined, SettingOutlined, ExportOutlined } from "@ant-design/icons";
7
7
  import { Interweave } from "interweave";
@@ -3682,12 +3682,12 @@ var pattern = {
3682
3682
  email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
3683
3683
  url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", "i"),
3684
3684
  hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
3685
- }, types$2 = {
3685
+ }, types$1 = {
3686
3686
  integer: function(t) {
3687
- return types$2.number(t) && parseInt(t, 10) === t;
3687
+ return types$1.number(t) && parseInt(t, 10) === t;
3688
3688
  },
3689
3689
  float: function(t) {
3690
- return types$2.number(t) && !types$2.integer(t);
3690
+ return types$1.number(t) && !types$1.integer(t);
3691
3691
  },
3692
3692
  array: function(t) {
3693
3693
  return Array.isArray(t);
@@ -3708,7 +3708,7 @@ var pattern = {
3708
3708
  return isNaN(t) ? !1 : typeof t == "number";
3709
3709
  },
3710
3710
  object: function(t) {
3711
- return typeof t == "object" && !types$2.array(t);
3711
+ return typeof t == "object" && !types$1.array(t);
3712
3712
  },
3713
3713
  method: function(t) {
3714
3714
  return typeof t == "function";
@@ -3729,7 +3729,7 @@ function type(e, t, r, n, a) {
3729
3729
  return;
3730
3730
  }
3731
3731
  var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], s = e.type;
3732
- o.indexOf(s) > -1 ? types$2[s](t) || n.push(format$1(a.messages.types[s], e.fullField, e.type)) : s && typeof t !== e.type && n.push(format$1(a.messages.types[s], e.fullField, e.type));
3732
+ o.indexOf(s) > -1 ? types$1[s](t) || n.push(format$1(a.messages.types[s], e.fullField, e.type)) : s && typeof t !== e.type && n.push(format$1(a.messages.types[s], e.fullField, e.type));
3733
3733
  }
3734
3734
  function range(e, t, r, n, a) {
3735
3735
  var o = typeof e.len == "number", s = typeof e.min == "number", u = typeof e.max == "number", l = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, c = t, d = null, f = typeof t == "number", p = typeof t == "string", h = Array.isArray(t);
@@ -14620,19 +14620,7 @@ const {
14620
14620
  &.ant-select:not(.ant-select-customize-input) .ant-select-selector {
14621
14621
  background-color: ${Config.requiredColor};
14622
14622
  }
14623
- `, types$1 = {
14624
- text: "text",
14625
- many2one: "many2one",
14626
- char: "char",
14627
- boolean: "boolean",
14628
- selection: "selection",
14629
- float: "float",
14630
- float_time: "float_time",
14631
- progressbar: "progressbar",
14632
- integer: "integer",
14633
- date: "date",
14634
- datetime: "datetime"
14635
- };
14623
+ `;
14636
14624
  function SearchField(e) {
14637
14625
  const {
14638
14626
  field: t
@@ -14642,7 +14630,7 @@ function SearchField(e) {
14642
14630
  t: r
14643
14631
  } = useContext(LocaleContext);
14644
14632
  switch (t.type) {
14645
- case types$1.boolean: {
14633
+ case SearchFieldTypes.boolean: {
14646
14634
  const a = new Selection$1({
14647
14635
  name: t._id,
14648
14636
  string: t.label,
@@ -14654,27 +14642,27 @@ function SearchField(e) {
14654
14642
  showLabel: !0
14655
14643
  });
14656
14644
  }
14657
- case types$1.float:
14658
- case types$1.progressbar:
14659
- case types$1.float_time:
14660
- case types$1.integer:
14645
+ case SearchFieldTypes.float:
14646
+ case SearchFieldTypes.progressbar:
14647
+ case SearchFieldTypes.float_time:
14648
+ case SearchFieldTypes.integer:
14661
14649
  return /* @__PURE__ */ jsx(PairFields, {
14662
14650
  ooui: t,
14663
14651
  showLabel: !0
14664
14652
  });
14665
- case types$1.date:
14653
+ case SearchFieldTypes.date:
14666
14654
  return /* @__PURE__ */ jsx(DateRangePicker, {
14667
14655
  ooui: t,
14668
14656
  layout: "vertical",
14669
14657
  showLabel: !0
14670
14658
  });
14671
- case types$1.datetime:
14659
+ case SearchFieldTypes.datetime:
14672
14660
  return /* @__PURE__ */ jsx(DateTimeRangePicker, {
14673
14661
  ooui: t,
14674
14662
  layout: "vertical",
14675
14663
  showLabel: !0
14676
14664
  });
14677
- case types$1.selection:
14665
+ case SearchFieldTypes.selection:
14678
14666
  return /* @__PURE__ */ jsx(MultiSelection, {
14679
14667
  layout: "vertical",
14680
14668
  ooui: t,