@pisell/materials 2.2.50 → 2.2.52
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +6 -6
- package/build/lowcode/preview.js +18 -22
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +25 -26
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +25 -26
- package/es/components/DragSortList/index.js +6 -6
- package/es/components/MultipleContainersSortList/index.js +11 -13
- package/es/components/Pagination/index.js +1 -1
- package/es/components/appVersionControl/index.d.ts +0 -1
- package/es/components/batch-editor/index.js +12 -12
- package/es/components/classicLayout/index.js +4 -5
- package/es/components/colorPicker/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +6 -6
- package/es/components/drag-sort-tree/TreeItem/index.js +10 -10
- package/es/components/drawer/index.js +6 -6
- package/es/components/filter/components/items/index.d.ts +0 -1
- package/es/components/filter/components/items/text/Editor/index.d.ts +0 -1
- package/es/components/filter/components/items/text/Preview/index.d.ts +0 -1
- package/es/components/filter/components/items/text/index.d.ts +0 -1
- package/es/components/filter/index.js +1 -1
- package/es/components/icon/index.js +5 -5
- package/es/components/input-number-range/index.js +6 -6
- package/es/components/list/index.js +6 -6
- package/es/components/pisell-config-provider/context.js +3 -3
- package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.js +2 -2
- package/es/components/pisellAdjustPrice/index.js +6 -6
- package/es/components/pisellCheckboxGroup/index.js +9 -7
- package/es/components/pisellCountdown/index.js +8 -8
- package/es/components/pisellCountdown/utils.js +1 -1
- package/es/components/pisellDatePicker/datePickerCpt.js +4 -4
- package/es/components/pisellFloatingPanel/index.js +6 -6
- package/es/components/pisellInformationEntry/Input/index.js +1 -1
- package/es/components/pisellInformationEntry/Scan/index.js +2 -2
- package/es/components/pisellInformationEntry/hooks/useTerminalPeripherals.js +5 -5
- package/es/components/pisellInformationEntry/utils.js +2 -2
- package/es/components/pisellInput/components/BankCard/index.js +5 -5
- package/es/components/pisellInput/components/Copy/index.js +5 -5
- package/es/components/pisellInput/components/SecurityCode/index.js +2 -2
- package/es/components/pisellModal/components/PcModal/index.js +7 -7
- package/es/components/pisellModal/components/functions/index.js +5 -5
- package/es/components/pisellRow/index.js +5 -5
- package/es/components/pisellScan/index.js +6 -6
- package/es/components/pisellWalletPassCard/index.js +1 -1
- package/es/components/qrcode/index.js +1 -1
- package/es/components/select-time/index.js +2 -2
- package/es/components/sort/components/InlineMenu/index.js +1 -1
- package/es/components/table/Actions/component/ButtonIcon/index.js +5 -5
- package/es/components/table/Actions/component/ColumnsSetting/PopoverContent.js +7 -7
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.js +8 -8
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +9 -9
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.js +1 -1
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/Detail.js +5 -5
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.js +7 -7
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.js +7 -7
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/es/components/table/Actions/component/Group/PopoverContent.js +2 -2
- package/es/components/table/Actions/component/Group/index.d.ts +0 -1
- package/es/components/table/Actions/component/ViewMode/index.d.ts +0 -1
- package/es/components/table/Actions/component/ViewMode/index.js +1 -1
- package/es/components/table/Actions/index.d.ts +0 -1
- package/es/components/table/BasicTable/index.d.ts +0 -1
- package/es/components/table/BasicTable/index.js +9 -9
- package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.js +4 -5
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- package/es/components/table/Gallery/components/VirtualGrid/index.js +5 -5
- package/es/components/table/Header/Buttons/index.js +5 -5
- package/es/components/table/Table/AddFieldModal/index.js +6 -6
- package/es/components/table/Table/SelectField/index.d.ts +0 -1
- package/es/components/table/Table/SelectField/index.js +4 -4
- package/es/components/table/Table/fields/date/Edit/index.js +1 -1
- package/es/components/table/Table/fields/link/Edit/index.js +5 -5
- package/es/components/table/Table/fields/oldRangePicker/Edit/index.js +7 -7
- package/es/components/table/Table/fields/oldRangePicker/filterUtil/index.js +1 -1
- package/es/components/table/Table/fields/rangePicker/Edit/index.js +7 -7
- package/es/components/table/Table/fields/rangePicker/filterUtil/index.js +1 -1
- package/es/components/table/Table/fields/search/Edit/index.js +2 -2
- package/es/components/table/Table/fields/search/filterUtil/index.js +0 -1
- package/es/components/table/Table/fields/text/Show/index.js +4 -4
- package/es/components/table/Table/fields/text/filterUtil/index.js +0 -1
- package/es/components/table/Table/tableConfig/SortRow/index.d.ts +0 -1
- package/es/components/table/Table/tableConfig/SortRow/index.js +2 -2
- package/es/components/table/Table/tableConfig/body/CellContent/index.js +3 -3
- package/es/components/table/Table/tableConfig/body/CellProvider/index.js +8 -8
- package/es/components/table/Table/tableConfig/body/index.js +6 -6
- package/es/components/table/Table/tableConfig/header/index.js +5 -5
- package/es/components/table/Table/tableConfig/summary/index.d.ts +0 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/View/index.d.ts +0 -1
- package/es/components/table/hooks/useMergeColumnSetting.js +1 -2
- package/es/components/table/hooks/useTransColumns.js +9 -9
- package/es/components/table/hooks/useTransDataSourceGroupSetting.js +5 -5
- package/es/components/table/hooks/useTransFilterSetting.js +5 -5
- package/es/components/table/hooks/useTransSortSetting.js +5 -5
- package/es/components/table/serve.js +9 -9
- package/es/components/translation/index.js +10 -10
- package/es/components/translation/utils.js +5 -5
- package/es/components/virtual-keyboard/Amount/index.js +1 -1
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +3 -3
- package/es/components/virtual-keyboard/Keyboard/index.js +8 -8
- package/es/components/virtual-keyboard/Number/index.js +1 -1
- package/es/components/virtual-keyboard/VirtualInput/index.js +1 -1
- package/es/components/virtual-keyboard/VirtualKeyInput/index.js +4 -4
- package/es/components/walletCard/Guest/index.js +2 -3
- package/es/components/walletCard/index.js +25 -4
- package/es/components/walletCard/index.less +1 -2
- package/es/hooks/useCssVariables.js +1 -1
- package/es/hooks/useResponsive.js +2 -2
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/en-US.js +2 -1
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +3 -2
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +3 -2
- package/es/utils/hoc.js +1 -1
- package/es/utils/miniRedux.js +8 -9
- package/lib/components/appVersionControl/index.d.ts +0 -1
- package/lib/components/appVersionControl/utils.js +4 -8
- package/lib/components/buttonGroupEdit/index.js +7 -14
- package/lib/components/colorPicker/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +3 -6
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +2 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +1 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +1 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +1 -2
- package/lib/components/dataSourceComponents/fields/Input.Mobile/ReadPretty.js +2 -4
- package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.js +1 -2
- package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.js +2 -4
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +1 -2
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +1 -2
- package/lib/components/dataSourceComponents/fields/InputNumber/WithMode.js +2 -4
- package/lib/components/dataSourceComponents/fields/InputNumber/utils.js +2 -4
- package/lib/components/dataSourceComponents/fields/TimePicker/WithMode.js +4 -8
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +4 -8
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.js +1 -2
- package/lib/components/dataSourceComponents/fields/Upload/shopUploadServe.js +1 -2
- package/lib/components/dataSourceComponents/fields/Upload/utils.js +11 -22
- package/lib/components/dataSourceComponents/fields/index.d.ts +6 -6
- package/lib/components/dataSourceComponents/hooks/useActions.js +3 -6
- package/lib/components/dataSourceComponents/hooks/useParseActionsVariable.js +1 -2
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +1 -2
- package/lib/components/dataSourceComponents/provider/variables/utils.js +2 -4
- package/lib/components/date-picker/datePickerCpt.js +1 -2
- package/lib/components/drag-sort-tree/TreeItem/index.js +1 -2
- package/lib/components/drag-sort-tree/index.js +1 -2
- package/lib/components/filter/components/items/index.d.ts +0 -1
- package/lib/components/filter/components/items/text/Editor/index.d.ts +0 -1
- package/lib/components/filter/components/items/text/Preview/index.d.ts +0 -1
- package/lib/components/filter/components/items/text/index.d.ts +0 -1
- package/lib/components/filter/index.js +1 -2
- package/lib/components/iconSelect/index.js +1 -2
- package/lib/components/iconSelect/utils.js +1 -2
- package/lib/components/lowCodePage/index.js +1 -2
- package/lib/components/pisell-config-provider/context.js +1 -1
- package/lib/components/pisellAnchor/index.js +5 -10
- package/lib/components/pisellCheckboxGroup/index.js +1 -2
- package/lib/components/pisellDatePicker/datePickerCpt.js +1 -2
- package/lib/components/pisellDraggable/index.js +3 -6
- package/lib/components/pisellQRScanner/index.js +9 -18
- package/lib/components/pisellWalletPassCard/index.js +1 -1
- package/lib/components/productCard/components/AmountFooter/index.js +1 -2
- package/lib/components/productCard/components/MultiDay/index.js +1 -2
- package/lib/components/productCard/utils.js +1 -2
- package/lib/components/profileMenu/index.js +1 -2
- package/lib/components/select/index.js +2 -4
- package/lib/components/table/Actions/component/ColumnsSetting/PopoverContent.js +1 -2
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/index.js +1 -2
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/lib/components/table/Actions/component/Group/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ViewMode/index.d.ts +0 -1
- package/lib/components/table/Actions/index.d.ts +0 -1
- package/lib/components/table/BasicTable/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- package/lib/components/table/Table/SelectField/index.d.ts +0 -1
- package/lib/components/table/Table/fields/date/filterUtil/index.js +3 -6
- package/lib/components/table/Table/fields/oldRangePicker/filterUtil/index.js +4 -8
- package/lib/components/table/Table/fields/rangePicker/filterUtil/index.js +4 -8
- package/lib/components/table/Table/fields/utils/index.js +1 -2
- package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +0 -1
- package/lib/components/table/Table/tableConfig/summary/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/Table/utils.js +10 -17
- package/lib/components/table/View/index.d.ts +0 -1
- package/lib/components/table/hooks/useTransColumns.js +1 -2
- package/lib/components/versionModal/index.js +2 -4
- package/lib/components/versionSelect/index.js +6 -12
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +2 -4
- package/lib/components/walletCard/Guest/index.js +6 -3
- package/lib/components/walletCard/index.js +25 -11
- package/lib/components/walletCard/index.less +1 -2
- package/lib/hooks/useCssVariables.js +1 -2
- package/lib/hooks/useResponsive.js +3 -6
- package/lib/locales/en-US.d.ts +1 -0
- package/lib/locales/en-US.js +2 -1
- package/lib/locales/zh-CN.d.ts +1 -0
- package/lib/locales/zh-CN.js +3 -2
- package/lib/locales/zh-TW.d.ts +1 -0
- package/lib/locales/zh-TW.js +3 -2
- package/package.json +3 -3
- package/es/components/TimeResourceSelector/index.d.ts +0 -21
- package/es/components/collapse/index.d.ts +0 -15
- package/es/components/pisellCard/index.d.ts +0 -20
- package/es/components/pisellCustomCheckboxGroup/index.d.ts +0 -16
- package/es/components/pisellDropdown/index.d.ts +0 -20
- package/es/components/pisellHeaderProgressBar/index.d.ts +0 -29
- package/es/components/pisellImageCarousels/index.d.ts +0 -18
- package/es/components/pisellSectionHeaders/index.d.ts +0 -21
- package/es/components/pisellText/components/Amount/index.d.ts +0 -20
- package/es/components/productCard/components/Action/index.d.ts +0 -4
- package/es/components/productCard/components/AmountFooter/index.d.ts +0 -4
- package/es/components/productCard/components/Divider/index.d.ts +0 -4
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/es/components/productCard/components/Header/index.d.ts +0 -4
- package/es/components/productCard/components/MultiDay/index.d.ts +0 -4
- package/es/components/productCard/components/MultiDay/utils.d.ts +0 -14
- package/es/components/productCard/components/Note/index.d.ts +0 -4
- package/es/components/productCard/components/Packages/components/collapsibleList/index.d.ts +0 -10
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -2
- package/es/components/productCard/components/Packages/components/options/index.d.ts +0 -4
- package/es/components/productCard/components/Packages/index.d.ts +0 -4
- package/es/components/productCard/components/Packages/utils.d.ts +0 -20
- package/es/components/productCard/components/Sales/index.d.ts +0 -4
- package/es/components/productCard/components/Time/components/Like/index.d.ts +0 -9
- package/es/components/productCard/components/Time/index.d.ts +0 -4
- package/es/components/productCard/status.d.ts +0 -32
- package/es/components/productCard/types.d.ts +0 -78
- package/es/components/section-footers/index.d.ts +0 -9
- package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +0 -9
- package/es/components/walletCard/Guest/index.d.ts +0 -4
- package/es/components/walletCard/index.d.ts +0 -65
- package/lib/components/TimeResourceSelector/index.d.ts +0 -21
- package/lib/components/collapse/index.d.ts +0 -15
- package/lib/components/pisellCard/index.d.ts +0 -20
- package/lib/components/pisellCustomCheckboxGroup/index.d.ts +0 -16
- package/lib/components/pisellDropdown/index.d.ts +0 -20
- package/lib/components/pisellHeaderProgressBar/index.d.ts +0 -29
- package/lib/components/pisellImageCarousels/index.d.ts +0 -18
- package/lib/components/pisellSectionHeaders/index.d.ts +0 -21
- package/lib/components/pisellText/components/Amount/index.d.ts +0 -20
- package/lib/components/productCard/components/Action/index.d.ts +0 -4
- package/lib/components/productCard/components/AmountFooter/index.d.ts +0 -4
- package/lib/components/productCard/components/Divider/index.d.ts +0 -4
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/lib/components/productCard/components/Header/index.d.ts +0 -4
- package/lib/components/productCard/components/MultiDay/index.d.ts +0 -4
- package/lib/components/productCard/components/MultiDay/utils.d.ts +0 -14
- package/lib/components/productCard/components/Note/index.d.ts +0 -4
- package/lib/components/productCard/components/Packages/components/collapsibleList/index.d.ts +0 -10
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -2
- package/lib/components/productCard/components/Packages/components/options/index.d.ts +0 -4
- package/lib/components/productCard/components/Packages/index.d.ts +0 -4
- package/lib/components/productCard/components/Packages/utils.d.ts +0 -20
- package/lib/components/productCard/components/Sales/index.d.ts +0 -4
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +0 -9
- package/lib/components/productCard/components/Time/index.d.ts +0 -4
- package/lib/components/productCard/status.d.ts +0 -32
- package/lib/components/productCard/types.d.ts +0 -78
- package/lib/components/section-footers/index.d.ts +0 -9
- package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +0 -9
- package/lib/components/walletCard/Guest/index.d.ts +0 -4
- package/lib/components/walletCard/index.d.ts +0 -65
package/es/utils/miniRedux.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function ownKeys(
|
|
4
|
-
function _objectSpread(
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
function _toPropertyKey(
|
|
7
|
-
function _toPrimitive(
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
8
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
9
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
10
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
11
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
|
-
function _iterableToArrayLimit(
|
|
12
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
import React, { createContext, useCallback, useReducer } from 'react';
|
|
15
15
|
export default (function (_ref2) {
|
|
@@ -23,7 +23,6 @@ export default (function (_ref2) {
|
|
|
23
23
|
var Context = /*#__PURE__*/createContext({});
|
|
24
24
|
var Provider = function Provider(ComponentUi) {
|
|
25
25
|
var Components = function Components(props, ref) {
|
|
26
|
-
var _objectSpread2, _ref5;
|
|
27
26
|
var _useReducer = useReducer(function (state, _ref3) {
|
|
28
27
|
var type = _ref3.type,
|
|
29
28
|
payload = _ref3.payload;
|
|
@@ -48,14 +47,14 @@ export default (function (_ref2) {
|
|
|
48
47
|
});
|
|
49
48
|
}
|
|
50
49
|
}, []);
|
|
51
|
-
var _props = _objectSpread(_objectSpread({}, props), {}, (
|
|
50
|
+
var _props = _objectSpread(_objectSpread({}, props), {}, _defineProperty(_defineProperty({}, namespace, providerState), "dispatch", _dispatch));
|
|
52
51
|
var _ref = ref;
|
|
53
52
|
// if (_props.forwardedRef) {
|
|
54
53
|
// _ref = _props.forwardedRef;
|
|
55
54
|
// delete _props.forwardedRef;
|
|
56
55
|
// }
|
|
57
56
|
return /*#__PURE__*/React.createElement(Context.Provider, {
|
|
58
|
-
value: (
|
|
57
|
+
value: _defineProperty(_defineProperty({}, namespace, providerState), "dispatch", _dispatch)
|
|
59
58
|
}, /*#__PURE__*/React.createElement(ComponentUi, _extends({}, _props, {
|
|
60
59
|
ref: _ref
|
|
61
60
|
})));
|
|
@@ -29,19 +29,15 @@ var compareVersions = (version1, version2) => {
|
|
|
29
29
|
for (let i = 0; i < Math.max(v1Parts.length, v2Parts.length); i++) {
|
|
30
30
|
const v1Part = v1Parts[i] || 0;
|
|
31
31
|
const v2Part = v2Parts[i] || 0;
|
|
32
|
-
if (v1Part > v2Part)
|
|
33
|
-
|
|
34
|
-
if (v1Part < v2Part)
|
|
35
|
-
return -1;
|
|
32
|
+
if (v1Part > v2Part) return 1;
|
|
33
|
+
if (v1Part < v2Part) return -1;
|
|
36
34
|
}
|
|
37
35
|
return 0;
|
|
38
36
|
};
|
|
39
37
|
var getMaxVersion = (versions) => {
|
|
40
|
-
if (!versions || versions.length === 0)
|
|
41
|
-
return void 0;
|
|
38
|
+
if (!versions || versions.length === 0) return void 0;
|
|
42
39
|
return versions.reduce((max, current) => {
|
|
43
|
-
if (!max)
|
|
44
|
-
return current;
|
|
40
|
+
if (!max) return current;
|
|
45
41
|
return compareVersions(current, max) > 0 ? current : max;
|
|
46
42
|
}, versions[0]);
|
|
47
43
|
};
|
|
@@ -137,8 +137,7 @@ var ButtonGroupEdit = (0, import_react.forwardRef)(
|
|
|
137
137
|
setCurrentButton(null);
|
|
138
138
|
};
|
|
139
139
|
const handleSave = (values) => {
|
|
140
|
-
if (!currentButton)
|
|
141
|
-
return;
|
|
140
|
+
if (!currentButton) return;
|
|
142
141
|
const updatedButton = {
|
|
143
142
|
...currentButton,
|
|
144
143
|
children: values.children,
|
|
@@ -161,8 +160,7 @@ var ButtonGroupEdit = (0, import_react.forwardRef)(
|
|
|
161
160
|
const onDragEnd = (event) => {
|
|
162
161
|
var _a, _b, _c, _d, _e;
|
|
163
162
|
const { active, over } = event;
|
|
164
|
-
if (!over)
|
|
165
|
-
return;
|
|
163
|
+
if (!over) return;
|
|
166
164
|
let activeId = active.id;
|
|
167
165
|
let overId = over.id;
|
|
168
166
|
let activeContainerId = "";
|
|
@@ -178,14 +176,12 @@ var ButtonGroupEdit = (0, import_react.forwardRef)(
|
|
|
178
176
|
const activeIndex = buttonList.findIndex(
|
|
179
177
|
(item) => item.id === activeId
|
|
180
178
|
);
|
|
181
|
-
if (activeIndex === -1)
|
|
182
|
-
return;
|
|
179
|
+
if (activeIndex === -1) return;
|
|
183
180
|
const movedItem = { ...buttonList[activeIndex] };
|
|
184
181
|
const overRowIndex = buttonGroupList.findIndex(
|
|
185
182
|
(row) => row.some((item) => item.id === overId)
|
|
186
183
|
);
|
|
187
|
-
if (overRowIndex === -1)
|
|
188
|
-
return;
|
|
184
|
+
if (overRowIndex === -1) return;
|
|
189
185
|
const updatedGroupList = [...buttonGroupList];
|
|
190
186
|
updatedGroupList[overRowIndex].push(movedItem);
|
|
191
187
|
const updatedButtonList = buttonList.filter(
|
|
@@ -198,13 +194,11 @@ var ButtonGroupEdit = (0, import_react.forwardRef)(
|
|
|
198
194
|
const overRowIndex = buttonGroupList.findIndex(
|
|
199
195
|
(row) => row.some((item) => item.id === overId)
|
|
200
196
|
);
|
|
201
|
-
if (overRowIndex === -1)
|
|
202
|
-
return;
|
|
197
|
+
if (overRowIndex === -1) return;
|
|
203
198
|
const overColIndex = (_c = buttonGroupList[overRowIndex]) == null ? void 0 : _c.findIndex(
|
|
204
199
|
(item) => item.id === overId
|
|
205
200
|
);
|
|
206
|
-
if (overColIndex === -1)
|
|
207
|
-
return;
|
|
201
|
+
if (overColIndex === -1) return;
|
|
208
202
|
const [movedItem] = buttonGroupList[overRowIndex].splice(
|
|
209
203
|
overColIndex,
|
|
210
204
|
1
|
|
@@ -217,8 +211,7 @@ var ButtonGroupEdit = (0, import_react.forwardRef)(
|
|
|
217
211
|
(item) => item.id === activeId
|
|
218
212
|
);
|
|
219
213
|
const overIndex = buttonList.findIndex((item) => item.id === overId);
|
|
220
|
-
if (activeIndex === -1 || overIndex === -1)
|
|
221
|
-
return;
|
|
214
|
+
if (activeIndex === -1 || overIndex === -1) return;
|
|
222
215
|
const updatedList = [...buttonList];
|
|
223
216
|
const [movedItem] = updatedList.splice(activeIndex, 1);
|
|
224
217
|
updatedList.splice(overIndex, 0, movedItem);
|
|
@@ -269,8 +269,7 @@ var withFormItem = (WrappedComponent, overlayProps) => {
|
|
|
269
269
|
case "subdomain":
|
|
270
270
|
rules.push({
|
|
271
271
|
validator: (_, value) => {
|
|
272
|
-
if (!value)
|
|
273
|
-
return Promise.resolve();
|
|
272
|
+
if (!value) return Promise.resolve();
|
|
274
273
|
const subdomain = value.split(".")[0];
|
|
275
274
|
if (!/^[a-z0-9-]+$/.test(subdomain)) {
|
|
276
275
|
return Promise.reject(
|
|
@@ -299,8 +298,7 @@ var withFormItem = (WrappedComponent, overlayProps) => {
|
|
|
299
298
|
case "appIdentifier":
|
|
300
299
|
rules.push({
|
|
301
300
|
validator: (_, value) => {
|
|
302
|
-
if (!value)
|
|
303
|
-
return Promise.resolve();
|
|
301
|
+
if (!value) return Promise.resolve();
|
|
304
302
|
if (!/^[a-z0-9\-\._]+$/.test(value)) {
|
|
305
303
|
return Promise.reject(
|
|
306
304
|
new Error(
|
|
@@ -526,8 +524,7 @@ var getNestedValue = (obj, path) => {
|
|
|
526
524
|
const keys = path.split(".");
|
|
527
525
|
let value = obj;
|
|
528
526
|
for (const k of keys) {
|
|
529
|
-
if (!value)
|
|
530
|
-
break;
|
|
527
|
+
if (!value) break;
|
|
531
528
|
value = value[k];
|
|
532
529
|
}
|
|
533
530
|
return value;
|
|
@@ -59,16 +59,14 @@ var useColumns = ({
|
|
|
59
59
|
actionsColumns
|
|
60
60
|
}) => {
|
|
61
61
|
const fieldMap = (0, import_react.useMemo)(() => {
|
|
62
|
-
if (!fields)
|
|
63
|
-
return {};
|
|
62
|
+
if (!fields) return {};
|
|
64
63
|
return fields.reduce((acc, field) => {
|
|
65
64
|
acc[field.name] = field;
|
|
66
65
|
return acc;
|
|
67
66
|
}, {});
|
|
68
67
|
}, [fields]);
|
|
69
68
|
return (0, import_react.useMemo)(() => {
|
|
70
|
-
if (Object.keys(fieldMap).length === 0)
|
|
71
|
-
return [];
|
|
69
|
+
if (Object.keys(fieldMap).length === 0) return [];
|
|
72
70
|
return columns.map((column) => {
|
|
73
71
|
var _a;
|
|
74
72
|
const field = fieldMap[column == null ? void 0 : column.dataIndex];
|
|
@@ -36,8 +36,7 @@ var useDesignMode = (props, { registerValueVariable, openDrawer, closeDrawer, da
|
|
|
36
36
|
if (__designMode === "design" && (items == null ? void 0 : items.length) && ((_a = prevItemsRef.current) == null ? void 0 : _a.length)) {
|
|
37
37
|
const changedItem = items.find((item) => {
|
|
38
38
|
const prevItem = prevItemsRef.current.find((prev) => prev.key === item.key);
|
|
39
|
-
if (!prevItem)
|
|
40
|
-
return false;
|
|
39
|
+
if (!prevItem) return false;
|
|
41
40
|
if (item.actionType !== prevItem.actionType) {
|
|
42
41
|
return true;
|
|
43
42
|
}
|
|
@@ -143,8 +143,7 @@ var formatFilter = (filterValue, fields) => {
|
|
|
143
143
|
return JSON.stringify(filterCondition);
|
|
144
144
|
};
|
|
145
145
|
var formatSort = (sortValue) => {
|
|
146
|
-
if (!sortValue)
|
|
147
|
-
return void 0;
|
|
146
|
+
if (!sortValue) return void 0;
|
|
148
147
|
const [field, order] = sortValue.split(":");
|
|
149
148
|
const prefix = order === "desc" ? "-" : "";
|
|
150
149
|
return [`${prefix}${field}`];
|
|
@@ -61,8 +61,7 @@ var DatePickerReadPretty = ({ value, renderMode, showTime }) => {
|
|
|
61
61
|
return DEFAULT_FORMAT;
|
|
62
62
|
}, [locale, showTime]);
|
|
63
63
|
const formattedDate = (0, import_react.useMemo)(() => {
|
|
64
|
-
if (!value)
|
|
65
|
-
return "";
|
|
64
|
+
if (!value) return "";
|
|
66
65
|
try {
|
|
67
66
|
return (0, import_dayjs.default)(value).format(dateFormat);
|
|
68
67
|
} catch (error) {
|
|
@@ -40,15 +40,13 @@ var ReadPretty = ({
|
|
|
40
40
|
value,
|
|
41
41
|
renderMode
|
|
42
42
|
}) => {
|
|
43
|
-
if (!value)
|
|
44
|
-
return null;
|
|
43
|
+
if (!value) return null;
|
|
45
44
|
const className = (0, import_classnames.default)("pisell-phone-read-pretty", {
|
|
46
45
|
"pisell-phone-read-pretty-table-view": renderMode === "tableView"
|
|
47
46
|
});
|
|
48
47
|
try {
|
|
49
48
|
const phoneNumber = (0, import_libphonenumber_js.parsePhoneNumberFromString)(value);
|
|
50
|
-
if (!phoneNumber)
|
|
51
|
-
return /* @__PURE__ */ import_react.default.createElement("span", { className }, value);
|
|
49
|
+
if (!phoneNumber) return /* @__PURE__ */ import_react.default.createElement("span", { className }, value);
|
|
52
50
|
const formattedValue = `(${phoneNumber.formatInternational().split(" ")[0]}) ${phoneNumber.formatNational()}`;
|
|
53
51
|
return /* @__PURE__ */ import_react.default.createElement("span", { className }, formattedValue);
|
|
54
52
|
} catch (error) {
|
|
@@ -51,8 +51,7 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, ...props }) =>
|
|
|
51
51
|
return propsValue;
|
|
52
52
|
}, [propsValue]);
|
|
53
53
|
const parseExternalValue = (val) => {
|
|
54
|
-
if (!val)
|
|
55
|
-
return { countryCode: "AU", phoneNumber: "" };
|
|
54
|
+
if (!val) return { countryCode: "AU", phoneNumber: "" };
|
|
56
55
|
const matchedPrefix = countries.find(
|
|
57
56
|
(country) => val.startsWith(country.prefix)
|
|
58
57
|
);
|
|
@@ -40,15 +40,13 @@ var ReadPretty = ({
|
|
|
40
40
|
value,
|
|
41
41
|
renderMode
|
|
42
42
|
}) => {
|
|
43
|
-
if (!value)
|
|
44
|
-
return null;
|
|
43
|
+
if (!value) return null;
|
|
45
44
|
const className = (0, import_classnames.default)("pisell-phone-read-pretty", {
|
|
46
45
|
"pisell-phone-read-pretty-table-view": renderMode === "tableView"
|
|
47
46
|
});
|
|
48
47
|
try {
|
|
49
48
|
const phoneNumber = (0, import_libphonenumber_js.parsePhoneNumberFromString)(value);
|
|
50
|
-
if (!phoneNumber)
|
|
51
|
-
return /* @__PURE__ */ import_react.default.createElement("span", { className }, value);
|
|
49
|
+
if (!phoneNumber) return /* @__PURE__ */ import_react.default.createElement("span", { className }, value);
|
|
52
50
|
const formattedValue = `(${phoneNumber.formatInternational().split(" ")[0]}) ${phoneNumber.formatNational()}`;
|
|
53
51
|
return /* @__PURE__ */ import_react.default.createElement("span", { className }, formattedValue);
|
|
54
52
|
} catch (error) {
|
|
@@ -51,8 +51,7 @@ var PhoneNumberInput = ({ value: propsValue, onChange, disabled, ...props }) =>
|
|
|
51
51
|
return propsValue;
|
|
52
52
|
}, [propsValue]);
|
|
53
53
|
const parseExternalValue = (val) => {
|
|
54
|
-
if (!val)
|
|
55
|
-
return { countryCode: "AU", phoneNumber: "" };
|
|
54
|
+
if (!val) return { countryCode: "AU", phoneNumber: "" };
|
|
56
55
|
const matchedPrefix = countries.find(
|
|
57
56
|
(country) => val.startsWith(country.prefix)
|
|
58
57
|
);
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
declare const Subdomain: React.FC<import("antd").InputProps & {
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
5
|
-
rootDomain: "custom" | "
|
|
5
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
6
6
|
customDomain?: string | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
tenantId: string;
|
|
@@ -39,8 +39,7 @@ var import_classnames = __toESM(require("classnames"));
|
|
|
39
39
|
var import_ReadPretty = require("./ReadPretty.less");
|
|
40
40
|
var { Link } = import_antd.Typography;
|
|
41
41
|
var formatUrl = (url) => {
|
|
42
|
-
if (!url)
|
|
43
|
-
return "";
|
|
42
|
+
if (!url) return "";
|
|
44
43
|
if (url.startsWith("http://") || url.startsWith("https://")) {
|
|
45
44
|
return url;
|
|
46
45
|
}
|
|
@@ -45,8 +45,7 @@ var InputNumber = (props) => {
|
|
|
45
45
|
} = props;
|
|
46
46
|
const formatter = (0, import_react.useCallback)(
|
|
47
47
|
(value, info) => {
|
|
48
|
-
if (!value)
|
|
49
|
-
return "";
|
|
48
|
+
if (!value) return "";
|
|
50
49
|
if (useThousandsSeparator) {
|
|
51
50
|
const parts = value.toString().split(".");
|
|
52
51
|
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
@@ -58,8 +57,7 @@ var InputNumber = (props) => {
|
|
|
58
57
|
);
|
|
59
58
|
const parser = (0, import_react.useCallback)(
|
|
60
59
|
(value) => {
|
|
61
|
-
if (!value)
|
|
62
|
-
return null;
|
|
60
|
+
if (!value) return null;
|
|
63
61
|
if (useThousandsSeparator) {
|
|
64
62
|
return value.replace(/,/g, "");
|
|
65
63
|
}
|
|
@@ -31,8 +31,7 @@ var getUnitText = (key) => {
|
|
|
31
31
|
return (0, import_locales.getText)(textKey);
|
|
32
32
|
};
|
|
33
33
|
var formatNumberWithUnit = (value, precision = 0, previewFormatter) => {
|
|
34
|
-
if (!value)
|
|
35
|
-
return "0";
|
|
34
|
+
if (!value) return "0";
|
|
36
35
|
const units = {
|
|
37
36
|
billion: {
|
|
38
37
|
value: BILLION,
|
|
@@ -51,8 +50,7 @@ var formatNumberWithUnit = (value, precision = 0, previewFormatter) => {
|
|
|
51
50
|
return value.toFixed(precision);
|
|
52
51
|
}
|
|
53
52
|
const unit = units[previewFormatter];
|
|
54
|
-
if (!unit)
|
|
55
|
-
return value.toFixed(precision);
|
|
53
|
+
if (!unit) return value.toFixed(precision);
|
|
56
54
|
const convertedValue = value / unit.value;
|
|
57
55
|
const suffix = unit.getText();
|
|
58
56
|
return `${convertedValue.toFixed(precision)}${suffix}`;
|
|
@@ -57,10 +57,8 @@ var TimePicker = (props) => {
|
|
|
57
57
|
defaultValue: propsDefaultValue
|
|
58
58
|
} = props;
|
|
59
59
|
const normalizedValue = (0, import_react.useMemo)(() => {
|
|
60
|
-
if (!value)
|
|
61
|
-
|
|
62
|
-
if (import_dayjs.default.isDayjs(value))
|
|
63
|
-
return value;
|
|
60
|
+
if (!value) return void 0;
|
|
61
|
+
if (import_dayjs.default.isDayjs(value)) return value;
|
|
64
62
|
try {
|
|
65
63
|
return (0, import_dayjs.default)(String(value), format);
|
|
66
64
|
} catch {
|
|
@@ -68,10 +66,8 @@ var TimePicker = (props) => {
|
|
|
68
66
|
}
|
|
69
67
|
}, [value, format]);
|
|
70
68
|
const defaultValue = (0, import_react.useMemo)(() => {
|
|
71
|
-
if (!propsDefaultValue)
|
|
72
|
-
|
|
73
|
-
if (import_dayjs.default.isDayjs(propsDefaultValue))
|
|
74
|
-
return propsDefaultValue;
|
|
69
|
+
if (!propsDefaultValue) return void 0;
|
|
70
|
+
if (import_dayjs.default.isDayjs(propsDefaultValue)) return propsDefaultValue;
|
|
75
71
|
try {
|
|
76
72
|
return (0, import_dayjs.default)(String(propsDefaultValue), format);
|
|
77
73
|
} catch {
|
|
@@ -92,8 +92,7 @@ var BaseUpload = (props) => {
|
|
|
92
92
|
}
|
|
93
93
|
}, [value, enableMultilingual, multiple]);
|
|
94
94
|
const getValueFromFileList = (fileList2) => {
|
|
95
|
-
if (!fileList2.length)
|
|
96
|
-
return multiple ? [] : "";
|
|
95
|
+
if (!fileList2.length) return multiple ? [] : "";
|
|
97
96
|
if (enableMultilingual) {
|
|
98
97
|
const multilingualValues = fileList2.filter((file) => file.status === "done").map(
|
|
99
98
|
(file) => {
|
|
@@ -260,8 +259,7 @@ var BaseUpload = (props) => {
|
|
|
260
259
|
(info, lang) => {
|
|
261
260
|
setEditMultilingualFile((prev) => {
|
|
262
261
|
var _a, _b;
|
|
263
|
-
if (!prev)
|
|
264
|
-
return null;
|
|
262
|
+
if (!prev) return null;
|
|
265
263
|
const newFile = { ...prev };
|
|
266
264
|
newFile.multilingualFileList[lang] = info.fileList.map((item) => {
|
|
267
265
|
var _a2;
|
|
@@ -281,8 +279,7 @@ var BaseUpload = (props) => {
|
|
|
281
279
|
const handleEditMultilingualRemove = (0, import_react.useCallback)(
|
|
282
280
|
(file, lang) => {
|
|
283
281
|
setEditMultilingualFile((prev) => {
|
|
284
|
-
if (!prev)
|
|
285
|
-
return null;
|
|
282
|
+
if (!prev) return null;
|
|
286
283
|
return {
|
|
287
284
|
...prev,
|
|
288
285
|
multilingual: {
|
|
@@ -295,8 +292,7 @@ var BaseUpload = (props) => {
|
|
|
295
292
|
[]
|
|
296
293
|
);
|
|
297
294
|
const handleEditMultilingualOk = (0, import_react.useCallback)(() => {
|
|
298
|
-
if (!editMultilingualFile)
|
|
299
|
-
return;
|
|
295
|
+
if (!editMultilingualFile) return;
|
|
300
296
|
const { uid } = editMultilingualFile;
|
|
301
297
|
setFileList((prev) => {
|
|
302
298
|
var _a;
|
|
@@ -42,8 +42,7 @@ var UploadReadPretty = (props) => {
|
|
|
42
42
|
const { value, enableMultilingual } = props;
|
|
43
43
|
const translationOriginal = (0, import_useTranslationOriginal.default)();
|
|
44
44
|
const normalizedValue = (0, import_react.useMemo)(() => {
|
|
45
|
-
if (!value)
|
|
46
|
-
return [];
|
|
45
|
+
if (!value) return [];
|
|
47
46
|
let processedValue = (0, import_utils.isArr)(value) ? value : [value];
|
|
48
47
|
processedValue = processedValue.map((item) => {
|
|
49
48
|
if (!item) {
|
|
@@ -165,8 +165,7 @@ var getVideoCover = (file) => {
|
|
|
165
165
|
let ctx = canvas.getContext("2d");
|
|
166
166
|
canvas.width = this.width;
|
|
167
167
|
canvas.height = this.height;
|
|
168
|
-
if (ctx === null)
|
|
169
|
-
return;
|
|
168
|
+
if (ctx === null) return;
|
|
170
169
|
ctx.drawImage(this, 0, 0, canvas.width, canvas.height);
|
|
171
170
|
let _cover = canvas.toDataURL("image/jpeg", 1);
|
|
172
171
|
let _cover_name = file.name.split(".")[0] + "_cover.jpeg";
|
|
@@ -54,8 +54,7 @@ var checkFileCount = ({
|
|
|
54
54
|
maxCount,
|
|
55
55
|
valueLength
|
|
56
56
|
}) => {
|
|
57
|
-
if (!multiple)
|
|
58
|
-
return { success: true };
|
|
57
|
+
if (!multiple) return { success: true };
|
|
59
58
|
if (minCount === maxCount && valueLength !== minCount) {
|
|
60
59
|
return {
|
|
61
60
|
success: false,
|
|
@@ -143,8 +142,7 @@ var getMediaMetadata = async (file) => {
|
|
|
143
142
|
return null;
|
|
144
143
|
};
|
|
145
144
|
var genFileListByString = (value) => {
|
|
146
|
-
if (!value)
|
|
147
|
-
return [];
|
|
145
|
+
if (!value) return [];
|
|
148
146
|
return [{
|
|
149
147
|
uid: generateUid(),
|
|
150
148
|
name: getFileName(value),
|
|
@@ -187,10 +185,8 @@ var handleMultilingualObject = (value, index = 1) => {
|
|
|
187
185
|
};
|
|
188
186
|
};
|
|
189
187
|
var getDefaultFileList = (value, options) => {
|
|
190
|
-
if (!value)
|
|
191
|
-
|
|
192
|
-
if (Object.values(value).filter((item) => !!item).length === 0)
|
|
193
|
-
return [];
|
|
188
|
+
if (!value) return [];
|
|
189
|
+
if (Object.values(value).filter((item) => !!item).length === 0) return [];
|
|
194
190
|
const { enableMultilingual, multiple } = options;
|
|
195
191
|
if (enableMultilingual) {
|
|
196
192
|
if ((0, import_utils.isString)(value)) {
|
|
@@ -230,8 +226,7 @@ var getDefaultFileList = (value, options) => {
|
|
|
230
226
|
return [];
|
|
231
227
|
};
|
|
232
228
|
var getFileMetadataParams = (file) => {
|
|
233
|
-
if (!file.metadata)
|
|
234
|
-
return {};
|
|
229
|
+
if (!file.metadata) return {};
|
|
235
230
|
const metadataParams = {};
|
|
236
231
|
const metadataKeys = ["width", "height", "duration", "bitrate"];
|
|
237
232
|
metadataKeys.forEach((key) => {
|
|
@@ -243,13 +238,10 @@ var getFileMetadataParams = (file) => {
|
|
|
243
238
|
return metadataParams;
|
|
244
239
|
};
|
|
245
240
|
var isValueEqual = (value, fileListValue) => {
|
|
246
|
-
if (!value && !fileListValue)
|
|
247
|
-
|
|
248
|
-
if (!value || !fileListValue)
|
|
249
|
-
return false;
|
|
241
|
+
if (!value && !fileListValue) return true;
|
|
242
|
+
if (!value || !fileListValue) return false;
|
|
250
243
|
if (Array.isArray(value) && Array.isArray(fileListValue)) {
|
|
251
|
-
if (value.length !== fileListValue.length)
|
|
252
|
-
return false;
|
|
244
|
+
if (value.length !== fileListValue.length) return false;
|
|
253
245
|
return value.every((v, i) => {
|
|
254
246
|
if (typeof v === "object") {
|
|
255
247
|
return JSON.stringify(v) === JSON.stringify(fileListValue[i]);
|
|
@@ -265,12 +257,9 @@ var isValueEqual = (value, fileListValue) => {
|
|
|
265
257
|
var getBaseTime = (size) => {
|
|
266
258
|
const KB = 1024;
|
|
267
259
|
const MB = KB * 1024;
|
|
268
|
-
if (size < MB)
|
|
269
|
-
|
|
270
|
-
if (size <
|
|
271
|
-
return 2e3;
|
|
272
|
-
if (size < 20 * MB)
|
|
273
|
-
return 4e3;
|
|
260
|
+
if (size < MB) return 1e3;
|
|
261
|
+
if (size < 5 * MB) return 2e3;
|
|
262
|
+
if (size < 20 * MB) return 4e3;
|
|
274
263
|
return 8e3;
|
|
275
264
|
};
|
|
276
265
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -60,11 +60,7 @@ declare const formFieldMap: {
|
|
|
60
60
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
62
62
|
};
|
|
63
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./
|
|
64
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
65
|
-
} & {
|
|
66
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
67
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
63
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
68
64
|
JSON: import("react").FC<any>;
|
|
69
65
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
70
66
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -85,6 +81,10 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
85
81
|
fieldKey?: string | undefined;
|
|
86
82
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
87
83
|
}) | (import("react").FC<{}> & {
|
|
84
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
85
|
+
} & {
|
|
86
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
87
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
88
88
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
89
89
|
} & {
|
|
90
90
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -98,5 +98,5 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
98
98
|
dataSource?: any;
|
|
99
99
|
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
100
100
|
onChange: (value: string) => void;
|
|
101
|
-
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
102
102
|
export { getFieldComponent, formFieldMap };
|
|
@@ -134,8 +134,7 @@ var useActions = ({
|
|
|
134
134
|
const createApi = genCustomApi(actions == null ? void 0 : actions.create);
|
|
135
135
|
return createApi(formatCreateUpdateParams(values));
|
|
136
136
|
} else {
|
|
137
|
-
if (!name)
|
|
138
|
-
return {};
|
|
137
|
+
if (!name) return {};
|
|
139
138
|
return (0, import_serve.createNocobaseData)({
|
|
140
139
|
key: name,
|
|
141
140
|
data: formatCreateUpdateParams(values),
|
|
@@ -208,8 +207,7 @@ var useActions = ({
|
|
|
208
207
|
const listApi = genCustomApi(actions == null ? void 0 : actions.list);
|
|
209
208
|
return formatListResult(await listApi(formatParams));
|
|
210
209
|
}
|
|
211
|
-
if (!name)
|
|
212
|
-
return {};
|
|
210
|
+
if (!name) return {};
|
|
213
211
|
return formatListResult(
|
|
214
212
|
await (0, import_serve.getNocobaseDataList)({
|
|
215
213
|
key: name,
|
|
@@ -235,8 +233,7 @@ var useActions = ({
|
|
|
235
233
|
const deleteApi = genCustomApi(actions == null ? void 0 : actions.destroy);
|
|
236
234
|
return deleteApi({});
|
|
237
235
|
}
|
|
238
|
-
if (!name)
|
|
239
|
-
return Promise.reject();
|
|
236
|
+
if (!name) return Promise.reject();
|
|
240
237
|
return (0, import_serve.deleteNocobaseData)(name, id, getHeaders());
|
|
241
238
|
});
|
|
242
239
|
return {
|
|
@@ -58,8 +58,7 @@ var useParseActionsVariable = () => {
|
|
|
58
58
|
};
|
|
59
59
|
const parseActions = (0, import_ahooks.useMemoizedFn)(
|
|
60
60
|
(actions, localVariables) => {
|
|
61
|
-
if (!actions)
|
|
62
|
-
return actions;
|
|
61
|
+
if (!actions) return actions;
|
|
63
62
|
return Object.entries(actions).reduce((acc, [key, value]) => {
|
|
64
63
|
acc[key] = parseActionsItem(value, localVariables);
|
|
65
64
|
return acc;
|
|
@@ -137,8 +137,7 @@ var VariablesProvider = (props) => {
|
|
|
137
137
|
}
|
|
138
138
|
if (((_a2 = str.match(VARIABLE_PATTERN)) == null ? void 0 : _a2[0]) === str) {
|
|
139
139
|
const key = (0, import_utils4.getVariableKey)(str);
|
|
140
|
-
if (!key)
|
|
141
|
-
return str;
|
|
140
|
+
if (!key) return str;
|
|
142
141
|
const localValue = (0, import_utils2.getNestedValue)(localVariables, key);
|
|
143
142
|
if (!(0, import_utils.isUndefined)(localValue)) {
|
|
144
143
|
return localValue;
|