ods-component-lib 1.22.2 → 1.22.3
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/dist/_virtual/index5.js +2 -3
- package/dist/_virtual/index5.js.map +1 -1
- package/dist/_virtual/index6.js +3 -2
- package/dist/_virtual/index6.js.map +1 -1
- package/dist/components/antd/currencyInput/CurrencySelect.js +15 -14
- package/dist/components/antd/currencyInput/CurrencySelect.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/StyleContext.js +6 -6
- package/dist/node_modules/@ant-design/cssinjs/es/StyleContext.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js +20 -20
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useGlobalCache.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js +101 -98
- package/dist/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js.map +1 -1
- package/dist/node_modules/@ant-design/cssinjs/es/util/index.js +29 -27
- package/dist/node_modules/@ant-design/cssinjs/es/util/index.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/index.js +20 -20
- package/dist/node_modules/@rc-component/async-validator/es/index.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/messages.js +1 -0
- package/dist/node_modules/@rc-component/async-validator/es/messages.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/rule/type.js +18 -8
- package/dist/node_modules/@rc-component/async-validator/es/rule/type.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/util.js +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/util.js.map +1 -1
- package/dist/node_modules/@rc-component/async-validator/es/validator/index.js +1 -0
- package/dist/node_modules/@rc-component/async-validator/es/validator/index.js.map +1 -1
- package/dist/node_modules/@rc-component/collapse/es/hooks/useItems.js +88 -68
- package/dist/node_modules/@rc-component/collapse/es/hooks/useItems.js.map +1 -1
- package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/Panel.js +75 -96
- package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/Panel.js.map +1 -1
- package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/index.js +22 -20
- package/dist/node_modules/@rc-component/dialog/es/Dialog/Content/index.js.map +1 -1
- package/dist/node_modules/@rc-component/dialog/es/Dialog/index.js +92 -100
- package/dist/node_modules/@rc-component/dialog/es/Dialog/index.js.map +1 -1
- package/dist/node_modules/@rc-component/dialog/es/DialogWrap.js +40 -29
- package/dist/node_modules/@rc-component/dialog/es/DialogWrap.js.map +1 -1
- package/dist/node_modules/@rc-component/form/es/hooks/useForm.js +115 -100
- package/dist/node_modules/@rc-component/form/es/hooks/useForm.js.map +1 -1
- package/dist/node_modules/@rc-component/form/es/utils/NameMap.js +28 -22
- package/dist/node_modules/@rc-component/form/es/utils/NameMap.js.map +1 -1
- package/dist/node_modules/@rc-component/form/es/utils/messages.js +1 -0
- package/dist/node_modules/@rc-component/form/es/utils/messages.js.map +1 -1
- package/dist/node_modules/@rc-component/image/es/Preview/index.js +111 -105
- package/dist/node_modules/@rc-component/image/es/Preview/index.js.map +1 -1
- package/dist/node_modules/@rc-component/portal/es/useEscKeyDown.js +42 -22
- package/dist/node_modules/@rc-component/portal/es/useEscKeyDown.js.map +1 -1
- package/dist/node_modules/@rc-component/resize-observer/es/SingleObserver/index.js +18 -54
- package/dist/node_modules/@rc-component/resize-observer/es/SingleObserver/index.js.map +1 -1
- package/dist/node_modules/@rc-component/resize-observer/es/index.js.map +1 -1
- package/dist/node_modules/@rc-component/resize-observer/es/useResizeObserver.js +50 -0
- package/dist/node_modules/@rc-component/resize-observer/es/useResizeObserver.js.map +1 -0
- package/dist/node_modules/@rc-component/select/es/SelectInput/Content/MultipleContent.js +50 -50
- package/dist/node_modules/@rc-component/select/es/SelectInput/Content/MultipleContent.js.map +1 -1
- package/dist/node_modules/@rc-component/select/es/SelectInput/index.js +85 -80
- package/dist/node_modules/@rc-component/select/es/SelectInput/index.js.map +1 -1
- package/dist/node_modules/@rc-component/table/es/VirtualTable/BodyGrid.js +85 -80
- package/dist/node_modules/@rc-component/table/es/VirtualTable/BodyGrid.js.map +1 -1
- package/dist/node_modules/@rc-component/trigger/es/Popup/index.js +74 -72
- package/dist/node_modules/@rc-component/trigger/es/Popup/index.js.map +1 -1
- package/dist/node_modules/@rc-component/trigger/es/UniqueProvider/index.js +10 -9
- package/dist/node_modules/@rc-component/trigger/es/UniqueProvider/index.js.map +1 -1
- package/dist/node_modules/@rc-component/trigger/es/hooks/useAlign.js +27 -27
- package/dist/node_modules/@rc-component/trigger/es/hooks/useAlign.js.map +1 -1
- package/dist/node_modules/@rc-component/trigger/es/index.js +150 -140
- package/dist/node_modules/@rc-component/trigger/es/index.js.map +1 -1
- package/dist/node_modules/@rc-component/util/es/Dom/focus.js +65 -20
- package/dist/node_modules/@rc-component/util/es/Dom/focus.js.map +1 -1
- package/dist/node_modules/@rc-component/util/es/ref.js +1 -1
- package/dist/node_modules/antd/es/_util/wave/WaveEffect.js +53 -48
- package/dist/node_modules/antd/es/_util/wave/WaveEffect.js.map +1 -1
- package/dist/node_modules/antd/es/_util/wave/style.js +8 -7
- package/dist/node_modules/antd/es/_util/wave/style.js.map +1 -1
- package/dist/node_modules/antd/es/alert/Alert.js +133 -128
- package/dist/node_modules/antd/es/alert/Alert.js.map +1 -1
- package/dist/node_modules/antd/es/badge/Badge.js +29 -28
- package/dist/node_modules/antd/es/badge/Badge.js.map +1 -1
- package/dist/node_modules/antd/es/badge/style/index.js +1 -1
- package/dist/node_modules/antd/es/badge/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/button/buttonHelpers.js +47 -41
- package/dist/node_modules/antd/es/button/buttonHelpers.js.map +1 -1
- package/dist/node_modules/antd/es/button/style/variant.js +132 -132
- package/dist/node_modules/antd/es/button/style/variant.js.map +1 -1
- package/dist/node_modules/antd/es/calendar/generateCalendar.js +55 -57
- package/dist/node_modules/antd/es/calendar/generateCalendar.js.map +1 -1
- package/dist/node_modules/antd/es/calendar/style/index.js +18 -18
- package/dist/node_modules/antd/es/calendar/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/card/CardGrid.js.map +1 -1
- package/dist/node_modules/antd/es/card/style/index.js +15 -7
- package/dist/node_modules/antd/es/card/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/checkbox/Group.js +32 -30
- package/dist/node_modules/antd/es/checkbox/Group.js.map +1 -1
- package/dist/node_modules/antd/es/collapse/Collapse.js +61 -61
- package/dist/node_modules/antd/es/collapse/Collapse.js.map +1 -1
- package/dist/node_modules/antd/es/config-provider/index.js +76 -71
- package/dist/node_modules/antd/es/config-provider/index.js.map +1 -1
- package/dist/node_modules/antd/es/date-picker/generatePicker/generateRangePicker.js +29 -31
- package/dist/node_modules/antd/es/date-picker/generatePicker/generateRangePicker.js.map +1 -1
- package/dist/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js +7 -9
- package/dist/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js.map +1 -1
- package/dist/node_modules/antd/es/date-picker/generatePicker/{SuffixIcon.js → useSuffixIcon.js} +4 -4
- package/dist/node_modules/antd/es/date-picker/generatePicker/useSuffixIcon.js.map +1 -0
- package/dist/node_modules/antd/es/date-picker/style/panel.js +4 -4
- package/dist/node_modules/antd/es/date-picker/style/panel.js.map +1 -1
- package/dist/node_modules/antd/es/drawer/useFocusable.js +14 -0
- package/dist/node_modules/antd/es/drawer/useFocusable.js.map +1 -0
- package/dist/node_modules/antd/es/form/style/index.js +24 -24
- package/dist/node_modules/antd/es/form/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/grid/col.js +56 -54
- package/dist/node_modules/antd/es/grid/col.js.map +1 -1
- package/dist/node_modules/antd/es/grid/style/index.js +50 -50
- package/dist/node_modules/antd/es/grid/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/input/style/index.js +1 -0
- package/dist/node_modules/antd/es/input/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/input-number/index.js +91 -91
- package/dist/node_modules/antd/es/input-number/index.js.map +1 -1
- package/dist/node_modules/antd/es/input-number/style/index.js +80 -79
- package/dist/node_modules/antd/es/input-number/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/layout/style/sider.js +9 -9
- package/dist/node_modules/antd/es/layout/style/sider.js.map +1 -1
- package/dist/node_modules/antd/es/menu/MenuItem.js +6 -6
- package/dist/node_modules/antd/es/menu/MenuItem.js.map +1 -1
- package/dist/node_modules/antd/es/menu/SubMenu.js +8 -8
- package/dist/node_modules/antd/es/menu/SubMenu.js.map +1 -1
- package/dist/node_modules/antd/es/menu/style/horizontal.js +1 -1
- package/dist/node_modules/antd/es/menu/style/horizontal.js.map +1 -1
- package/dist/node_modules/antd/es/menu/style/index.js +58 -58
- package/dist/node_modules/antd/es/menu/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/menu/style/vertical.js +1 -1
- package/dist/node_modules/antd/es/menu/style/vertical.js.map +1 -1
- package/dist/node_modules/antd/es/modal/ConfirmDialog.js +117 -112
- package/dist/node_modules/antd/es/modal/ConfirmDialog.js.map +1 -1
- package/dist/node_modules/antd/es/modal/Modal.js +115 -109
- package/dist/node_modules/antd/es/modal/Modal.js.map +1 -1
- package/dist/node_modules/antd/es/modal/style/index.js +83 -80
- package/dist/node_modules/antd/es/modal/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/pagination/Pagination.js +85 -81
- package/dist/node_modules/antd/es/pagination/Pagination.js.map +1 -1
- package/dist/node_modules/antd/es/pagination/style/bordered.js +2 -2
- package/dist/node_modules/antd/es/pagination/style/bordered.js.map +1 -1
- package/dist/node_modules/antd/es/pagination/style/index.js +98 -132
- package/dist/node_modules/antd/es/pagination/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/popover/index.js +77 -82
- package/dist/node_modules/antd/es/popover/index.js.map +1 -1
- package/dist/node_modules/antd/es/popover/style/index.js +65 -63
- package/dist/node_modules/antd/es/popover/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/radio/context.js +3 -3
- package/dist/node_modules/antd/es/radio/context.js.map +1 -1
- package/dist/node_modules/antd/es/radio/group.js +31 -29
- package/dist/node_modules/antd/es/radio/group.js.map +1 -1
- package/dist/node_modules/antd/es/radio/style/index.js +1 -1
- package/dist/node_modules/antd/es/radio/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/select/style/dropdown.js +1 -1
- package/dist/node_modules/antd/es/select/style/dropdown.js.map +1 -1
- package/dist/node_modules/antd/es/select/style/select-input-multiple.js +71 -69
- package/dist/node_modules/antd/es/select/style/select-input-multiple.js.map +1 -1
- package/dist/node_modules/antd/es/select/style/select-input.js +104 -98
- package/dist/node_modules/antd/es/select/style/select-input.js.map +1 -1
- package/dist/node_modules/antd/es/space/Item.js +2 -2
- package/dist/node_modules/antd/es/space/Item.js.map +1 -1
- package/dist/node_modules/antd/es/space/index.js +4 -4
- package/dist/node_modules/antd/es/space/index.js.map +1 -1
- package/dist/node_modules/antd/es/space/style/addon.js +47 -46
- package/dist/node_modules/antd/es/space/style/addon.js.map +1 -1
- package/dist/node_modules/antd/es/steps/PanelArrow.js +2 -2
- package/dist/node_modules/antd/es/steps/PanelArrow.js.map +1 -1
- package/dist/node_modules/antd/es/steps/ProgressIcon.js +12 -10
- package/dist/node_modules/antd/es/steps/ProgressIcon.js.map +1 -1
- package/dist/node_modules/antd/es/steps/index.js +108 -106
- package/dist/node_modules/antd/es/steps/index.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/horizontal.js +13 -11
- package/dist/node_modules/antd/es/steps/style/horizontal.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/icon.js +23 -18
- package/dist/node_modules/antd/es/steps/style/icon.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/index.js +41 -41
- package/dist/node_modules/antd/es/steps/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/inline.js +28 -23
- package/dist/node_modules/antd/es/steps/style/inline.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/label-placement.js +44 -39
- package/dist/node_modules/antd/es/steps/style/label-placement.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/nav.js +29 -27
- package/dist/node_modules/antd/es/steps/style/nav.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/panel.js +61 -56
- package/dist/node_modules/antd/es/steps/style/panel.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/progress-dot.js +28 -26
- package/dist/node_modules/antd/es/steps/style/progress-dot.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/progress.js +24 -57
- package/dist/node_modules/antd/es/steps/style/progress.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/rtl.js +10 -8
- package/dist/node_modules/antd/es/steps/style/rtl.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/small.js +21 -16
- package/dist/node_modules/antd/es/steps/style/small.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/status.js +187 -176
- package/dist/node_modules/antd/es/steps/style/status.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/util.js +18 -16
- package/dist/node_modules/antd/es/steps/style/util.js.map +1 -1
- package/dist/node_modules/antd/es/steps/style/vertical.js +21 -16
- package/dist/node_modules/antd/es/steps/style/vertical.js.map +1 -1
- package/dist/node_modules/antd/es/style/placementArrow.js +31 -29
- package/dist/node_modules/antd/es/style/placementArrow.js.map +1 -1
- package/dist/node_modules/antd/es/table/InternalTable.js +65 -62
- package/dist/node_modules/antd/es/table/InternalTable.js.map +1 -1
- package/dist/node_modules/antd/es/table/TableMeasureRowContext.js +6 -0
- package/dist/node_modules/antd/es/table/TableMeasureRowContext.js.map +1 -0
- package/dist/node_modules/antd/es/table/hooks/useFilter/FilterDropdown.js +145 -137
- package/dist/node_modules/antd/es/table/hooks/useFilter/FilterDropdown.js.map +1 -1
- package/dist/node_modules/antd/es/table/style/index.js +3 -3
- package/dist/node_modules/antd/es/table/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/table/style/radius.js +10 -0
- package/dist/node_modules/antd/es/table/style/radius.js.map +1 -1
- package/dist/node_modules/antd/es/table/style/virtual.js +5 -5
- package/dist/node_modules/antd/es/table/style/virtual.js.map +1 -1
- package/dist/node_modules/antd/es/theme/util/genStyleUtils.js +29 -32
- package/dist/node_modules/antd/es/theme/util/genStyleUtils.js.map +1 -1
- package/dist/node_modules/antd/es/timeline/Timeline.js +76 -74
- package/dist/node_modules/antd/es/timeline/Timeline.js.map +1 -1
- package/dist/node_modules/antd/es/timeline/style/horizontal.js +21 -18
- package/dist/node_modules/antd/es/timeline/style/horizontal.js.map +1 -1
- package/dist/node_modules/antd/es/timeline/style/index.js +85 -70
- package/dist/node_modules/antd/es/timeline/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/timeline/useItems.js +38 -37
- package/dist/node_modules/antd/es/timeline/useItems.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/PurePanel.js +27 -27
- package/dist/node_modules/antd/es/tooltip/PurePanel.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/UniqueProvider/MotionContent.js +17 -22
- package/dist/node_modules/antd/es/tooltip/UniqueProvider/MotionContent.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/UniqueProvider/index.js +27 -26
- package/dist/node_modules/antd/es/tooltip/UniqueProvider/index.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/index.js +50 -50
- package/dist/node_modules/antd/es/tooltip/index.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/style/index.js +55 -52
- package/dist/node_modules/antd/es/tooltip/style/index.js.map +1 -1
- package/dist/node_modules/antd/es/tooltip/util.js +13 -12
- package/dist/node_modules/antd/es/tooltip/util.js.map +1 -1
- package/dist/node_modules/antd/es/tree/DirectoryTree.js +42 -41
- package/dist/node_modules/antd/es/tree/DirectoryTree.js.map +1 -1
- package/dist/node_modules/antd/es/version/version.js +1 -1
- package/dist/node_modules/antd/es/version/version.js.map +1 -1
- package/dist/node_modules/canvg/lib/index.es.js +84 -84
- package/dist/node_modules/canvg/lib/index.es.js.map +1 -1
- package/dist/node_modules/compute-scroll-into-view/dist/index.js +17 -17
- package/dist/node_modules/compute-scroll-into-view/dist/index.js.map +1 -1
- package/dist/node_modules/dompurify/dist/purify.es.js +217 -223
- package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -1
- package/dist/node_modules/fflate/esm/browser.js +295 -335
- package/dist/node_modules/fflate/esm/browser.js.map +1 -1
- package/dist/node_modules/jspdf/dist/jspdf.es.min.js +1771 -1781
- package/dist/node_modules/jspdf/dist/jspdf.es.min.js.map +1 -1
- package/dist/node_modules/raf/index.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +6 -9
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/package.json +1 -1
- package/dist/node_modules/antd/es/date-picker/generatePicker/SuffixIcon.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
package/dist/_virtual/index5.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/_virtual/index6.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index6.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import m from "../../../node_modules/antd/es/select/index.js";
|
|
3
|
+
import f from "../../../node_modules/antd/es/tooltip/index.js";
|
|
4
|
+
import { isTextEmpty as o } from "../../../utils/commonFunctions.js";
|
|
5
|
+
function p({
|
|
6
|
+
currencyOptions: r,
|
|
7
|
+
onSelect: t,
|
|
7
8
|
defaultValue: i,
|
|
8
9
|
disabled: d,
|
|
9
|
-
...
|
|
10
|
+
...c
|
|
10
11
|
}) {
|
|
11
|
-
if (!(!
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
|
|
12
|
+
if (!(!r || r.length === 0))
|
|
13
|
+
return /* @__PURE__ */ l(
|
|
14
|
+
m,
|
|
14
15
|
{
|
|
15
16
|
disabled: d,
|
|
16
|
-
onSelect: (e) =>
|
|
17
|
+
onSelect: (e) => t(e),
|
|
17
18
|
defaultValue: i,
|
|
18
|
-
...
|
|
19
|
-
children:
|
|
19
|
+
...c,
|
|
20
|
+
children: r.map((e) => /* @__PURE__ */ l(m.Option, { value: e.id, children: /* @__PURE__ */ l(f, { placement: "right", title: e.name, children: o(e.symbol) ? e.code : e.symbol }) }, `${e.code}`))
|
|
20
21
|
}
|
|
21
22
|
);
|
|
22
23
|
}
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
+
p as default
|
|
25
26
|
};
|
|
26
27
|
//# sourceMappingURL=CurrencySelect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencySelect.js","sources":["../../../../src/components/antd/currencyInput/CurrencySelect.tsx"],"sourcesContent":["import Select from \"antd/es/select\";\r\nimport Tooltip from \"antd/es/tooltip\";\r\nimport { CurrencySelectProps } from \"./types\";\r\n\r\nfunction CurrencySelect({\r\n currencyOptions,\r\n onSelect,\r\n defaultValue,\r\n disabled,\r\n ...props\r\n}: CurrencySelectProps) {\r\n if (!currencyOptions || currencyOptions.length === 0) return undefined;\r\n\r\n return (\r\n <Select\r\n disabled={disabled}\r\n onSelect={(value) => onSelect(value)}\r\n defaultValue={defaultValue}\r\n {...props}\r\n >\r\n {currencyOptions.map((option) => (\r\n <Select.Option key={`${option.code}`} value={option.id}>\r\n <Tooltip placement=\"right\" title={option.name}>\r\n {option.symbol}\r\n </Tooltip>\r\n </Select.Option>\r\n ))}\r\n </Select>\r\n );\r\n}\r\n\r\nexport default CurrencySelect;\r\n"],"names":["CurrencySelect","currencyOptions","onSelect","defaultValue","disabled","props","jsx","Select","value","option","Tooltip"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CurrencySelect.js","sources":["../../../../src/components/antd/currencyInput/CurrencySelect.tsx"],"sourcesContent":["import Select from \"antd/es/select\";\r\nimport Tooltip from \"antd/es/tooltip\";\r\nimport { CurrencySelectProps } from \"./types\";\r\nimport { isTextEmpty } from \"../../../utils/commonFunctions\";\r\n\r\nfunction CurrencySelect({\r\n currencyOptions,\r\n onSelect,\r\n defaultValue,\r\n disabled,\r\n ...props\r\n}: CurrencySelectProps) {\r\n if (!currencyOptions || currencyOptions.length === 0) return undefined;\r\n\r\n return (\r\n <Select\r\n disabled={disabled}\r\n onSelect={(value) => onSelect(value)}\r\n defaultValue={defaultValue}\r\n {...props}\r\n >\r\n {currencyOptions.map((option) => (\r\n <Select.Option key={`${option.code}`} value={option.id}>\r\n <Tooltip placement=\"right\" title={option.name}>\r\n {isTextEmpty(option.symbol) ? option.code : option.symbol}\r\n </Tooltip>\r\n </Select.Option>\r\n ))}\r\n </Select>\r\n );\r\n}\r\n\r\nexport default CurrencySelect;\r\n"],"names":["CurrencySelect","currencyOptions","onSelect","defaultValue","disabled","props","jsx","Select","value","option","Tooltip","isTextEmpty"],"mappings":";;;;AAKA,SAASA,EAAe;AAAA,EACtB,iBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GAAwB;AACtB,MAAI,GAACJ,KAAmBA,EAAgB,WAAW;AAEnD,WACE,gBAAAK;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,UAAAH;AAAA,QACA,UAAU,CAACI,MAAUN,EAASM,CAAK;AAAA,QACnC,cAAAL;AAAA,QACC,GAAGE;AAAA,QAEH,UAAAJ,EAAgB,IAAI,CAACQ,MACpB,gBAAAH,EAACC,EAAO,QAAP,EAAqC,OAAOE,EAAO,IAClD,UAAA,gBAAAH,EAACI,KAAQ,WAAU,SAAQ,OAAOD,EAAO,MACtC,UAAAE,EAAYF,EAAO,MAAM,IAAIA,EAAO,OAAOA,EAAO,OAAA,CACrD,EAAA,GAHkB,GAAGA,EAAO,IAAI,EAIlC,CACD;AAAA,MAAA;AAAA,IAAA;AAGP;"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import * as d from "react";
|
|
2
2
|
import h from "./Cache.js";
|
|
3
|
-
const u = "data-token-hash", a = "data-css-hash", m = "data-cache-path",
|
|
3
|
+
const u = "data-token-hash", a = "data-css-hash", m = "data-cache-path", e = "__cssinjs_instance__";
|
|
4
4
|
function i() {
|
|
5
|
-
const
|
|
5
|
+
const o = Math.random().toString(12).slice(2);
|
|
6
6
|
if (typeof document < "u" && document.head && document.body) {
|
|
7
7
|
const r = document.body.querySelectorAll(`style[${a}]`) || [], {
|
|
8
8
|
firstChild: s
|
|
9
9
|
} = document.head;
|
|
10
10
|
Array.from(r).forEach((t) => {
|
|
11
|
-
t[
|
|
11
|
+
t[e] || (t[e] = o), t[e] === o && document.head.insertBefore(t, s);
|
|
12
12
|
});
|
|
13
13
|
const c = {};
|
|
14
14
|
Array.from(document.querySelectorAll(`style[${a}]`)).forEach((t) => {
|
|
15
15
|
const n = t.getAttribute(a);
|
|
16
|
-
c[n] ? t[
|
|
16
|
+
c[n] ? t[e] === o && t.parentNode?.removeChild(t) : c[n] = !0;
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
return new h(
|
|
19
|
+
return new h(o);
|
|
20
20
|
}
|
|
21
21
|
const l = /* @__PURE__ */ d.createContext({
|
|
22
22
|
hashPriority: "low",
|
|
@@ -28,7 +28,7 @@ export {
|
|
|
28
28
|
m as ATTR_CACHE_PATH,
|
|
29
29
|
a as ATTR_MARK,
|
|
30
30
|
u as ATTR_TOKEN,
|
|
31
|
-
|
|
31
|
+
e as CSS_IN_JS_INSTANCE,
|
|
32
32
|
i as createCache,
|
|
33
33
|
l as default
|
|
34
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyleContext.js","sources":["../../../../../node_modules/@ant-design/cssinjs/es/StyleContext.js"],"sourcesContent":["import useMemo from \"@rc-component/util/es/hooks/useMemo\";\nimport isEqual from \"@rc-component/util/es/isEqual\";\nimport * as React from 'react';\nimport CacheEntity from \"./Cache\";\nimport { AUTO_PREFIX } from \"./transformers/autoPrefix\";\nexport const ATTR_TOKEN = 'data-token-hash';\nexport const ATTR_MARK = 'data-css-hash';\nexport const ATTR_CACHE_PATH = 'data-cache-path';\n\n// Mark css-in-js instance in style element\nexport const CSS_IN_JS_INSTANCE = '__cssinjs_instance__';\nexport function createCache() {\n const cssinjsInstanceId = Math.random().toString(12).slice(2);\n\n // Tricky SSR: Move all inline style to the head.\n // PS: We do not recommend tricky mode.\n if (typeof document !== 'undefined' && document.head && document.body) {\n const styles = document.body.querySelectorAll(`style[${ATTR_MARK}]`) || [];\n const {\n firstChild\n } = document.head;\n Array.from(styles).forEach(style => {\n style[CSS_IN_JS_INSTANCE]
|
|
1
|
+
{"version":3,"file":"StyleContext.js","sources":["../../../../../node_modules/@ant-design/cssinjs/es/StyleContext.js"],"sourcesContent":["import useMemo from \"@rc-component/util/es/hooks/useMemo\";\nimport isEqual from \"@rc-component/util/es/isEqual\";\nimport * as React from 'react';\nimport CacheEntity from \"./Cache\";\nimport { AUTO_PREFIX } from \"./transformers/autoPrefix\";\nexport const ATTR_TOKEN = 'data-token-hash';\nexport const ATTR_MARK = 'data-css-hash';\nexport const ATTR_CACHE_PATH = 'data-cache-path';\n\n// Mark css-in-js instance in style element\nexport const CSS_IN_JS_INSTANCE = '__cssinjs_instance__';\nexport function createCache() {\n const cssinjsInstanceId = Math.random().toString(12).slice(2);\n\n // Tricky SSR: Move all inline style to the head.\n // PS: We do not recommend tricky mode.\n if (typeof document !== 'undefined' && document.head && document.body) {\n const styles = document.body.querySelectorAll(`style[${ATTR_MARK}]`) || [];\n const {\n firstChild\n } = document.head;\n Array.from(styles).forEach(style => {\n style[CSS_IN_JS_INSTANCE] ||= cssinjsInstanceId;\n\n // Not force move if no head\n if (style[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {\n document.head.insertBefore(style, firstChild);\n }\n });\n\n // Deduplicate of moved styles\n const styleHash = {};\n Array.from(document.querySelectorAll(`style[${ATTR_MARK}]`)).forEach(style => {\n const hash = style.getAttribute(ATTR_MARK);\n if (styleHash[hash]) {\n if (style[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {\n style.parentNode?.removeChild(style);\n }\n } else {\n styleHash[hash] = true;\n }\n });\n }\n return new CacheEntity(cssinjsInstanceId);\n}\nconst StyleContext = /*#__PURE__*/React.createContext({\n hashPriority: 'low',\n cache: createCache(),\n defaultCache: true,\n autoPrefix: false\n});\nexport const StyleProvider = props => {\n const {\n children,\n ...restProps\n } = props;\n const parentContext = React.useContext(StyleContext);\n const context = useMemo(() => {\n const mergedContext = {\n ...parentContext\n };\n Object.keys(restProps).forEach(key => {\n const value = restProps[key];\n if (restProps[key] !== undefined) {\n mergedContext[key] = value;\n }\n });\n const {\n cache,\n transformers = []\n } = restProps;\n mergedContext.cache = mergedContext.cache || createCache();\n mergedContext.defaultCache = !cache && parentContext.defaultCache;\n\n // autoPrefix\n if (transformers.includes(AUTO_PREFIX)) {\n mergedContext.autoPrefix = true;\n }\n return mergedContext;\n }, [parentContext, restProps], (prev, next) => !isEqual(prev[0], next[0], true) || !isEqual(prev[1], next[1], true));\n return /*#__PURE__*/React.createElement(StyleContext.Provider, {\n value: context\n }, children);\n};\nexport default StyleContext;"],"names":["ATTR_TOKEN","ATTR_MARK","ATTR_CACHE_PATH","CSS_IN_JS_INSTANCE","createCache","cssinjsInstanceId","styles","firstChild","style","styleHash","hash","CacheEntity","StyleContext","React"],"mappings":";;AAKY,MAACA,IAAa,mBACbC,IAAY,iBACZC,IAAkB,mBAGlBC,IAAqB;AAC3B,SAASC,IAAc;AAC5B,QAAMC,IAAoB,KAAK,OAAM,EAAG,SAAS,EAAE,EAAE,MAAM,CAAC;AAI5D,MAAI,OAAO,WAAa,OAAe,SAAS,QAAQ,SAAS,MAAM;AACrE,UAAMC,IAAS,SAAS,KAAK,iBAAiB,SAASL,CAAS,GAAG,KAAK,CAAA,GAClE;AAAA,MACJ,YAAAM;AAAA,IACN,IAAQ,SAAS;AACb,UAAM,KAAKD,CAAM,EAAE,QAAQ,CAAAE,MAAS;AAClC,MAAAA,EAAAL,OAAAK,EAAAL,KAA8BE,IAG1BG,EAAML,CAAkB,MAAME,KAChC,SAAS,KAAK,aAAaG,GAAOD,CAAU;AAAA,IAEhD,CAAC;AAGD,UAAME,IAAY,CAAA;AAClB,UAAM,KAAK,SAAS,iBAAiB,SAASR,CAAS,GAAG,CAAC,EAAE,QAAQ,CAAAO,MAAS;AAC5E,YAAME,IAAOF,EAAM,aAAaP,CAAS;AACzC,MAAIQ,EAAUC,CAAI,IACZF,EAAML,CAAkB,MAAME,KAChCG,EAAM,YAAY,YAAYA,CAAK,IAGrCC,EAAUC,CAAI,IAAI;AAAA,IAEtB,CAAC;AAAA,EACH;AACA,SAAO,IAAIC,EAAYN,CAAiB;AAC1C;AACK,MAACO,IAA4B,gBAAAC,EAAM,cAAc;AAAA,EACpD,cAAc;AAAA,EACd,OAAOT,EAAW;AAAA,EAClB,cAAc;AAAA,EACd,YAAY;AACd,CAAC;","x_google_ignoreList":[0]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import $ from "../../../../vite-plugin-node-polyfills/shims/process/dist/index.js";
|
|
2
|
-
import
|
|
2
|
+
import S from "../../../../@emotion/hash/dist/hash.browser.esm.js";
|
|
3
3
|
import { updateCSS as x } from "../../../../@rc-component/util/es/Dom/dynamicCSS.js";
|
|
4
4
|
import { useContext as I } from "react";
|
|
5
|
-
import O, { CSS_IN_JS_INSTANCE as
|
|
6
|
-
import { memoResult as D, flattenToken as
|
|
5
|
+
import O, { CSS_IN_JS_INSTANCE as C, ATTR_TOKEN as E, ATTR_MARK as A } from "../StyleContext.js";
|
|
6
|
+
import { memoResult as D, flattenToken as T, token2key as V } from "../util/index.js";
|
|
7
7
|
import { transformToken as b } from "../util/css-variables.js";
|
|
8
8
|
import K from "./useGlobalCache.js";
|
|
9
9
|
const P = {}, M = $.env.NODE_ENV !== "production" ? "css-dev-only-do-not-override" : "css", c = /* @__PURE__ */ new Map();
|
|
@@ -11,8 +11,8 @@ function q(t) {
|
|
|
11
11
|
c.set(t, (c.get(t) || 0) + 1);
|
|
12
12
|
}
|
|
13
13
|
function w(t, n) {
|
|
14
|
-
typeof document < "u" && document.querySelectorAll(`style[${
|
|
15
|
-
e[
|
|
14
|
+
typeof document < "u" && document.querySelectorAll(`style[${E}="${t}"]`).forEach((e) => {
|
|
15
|
+
e[C] === n && e.parentNode?.removeChild(e);
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
const z = -1;
|
|
@@ -26,11 +26,11 @@ function H(t, n) {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
const L = (t, n, r, e) => {
|
|
29
|
-
let
|
|
29
|
+
let a = {
|
|
30
30
|
...r.getDerivativeToken(t),
|
|
31
31
|
...n
|
|
32
32
|
};
|
|
33
|
-
return e && (
|
|
33
|
+
return e && (a = e(a)), a;
|
|
34
34
|
}, j = "token";
|
|
35
35
|
function Z(t, n, r) {
|
|
36
36
|
const {
|
|
@@ -38,40 +38,40 @@ function Z(t, n, r) {
|
|
|
38
38
|
instanceId: e
|
|
39
39
|
},
|
|
40
40
|
container: f,
|
|
41
|
-
hashPriority:
|
|
41
|
+
hashPriority: a
|
|
42
42
|
} = I(O), {
|
|
43
|
-
salt:
|
|
43
|
+
salt: l = "",
|
|
44
44
|
override: u = P,
|
|
45
|
-
formatToken:
|
|
46
|
-
getComputedToken:
|
|
45
|
+
formatToken: g,
|
|
46
|
+
getComputedToken: p,
|
|
47
47
|
cssVar: o
|
|
48
|
-
} = r, m = D(() => Object.assign({}, ...n), n),
|
|
49
|
-
return K(j, [
|
|
50
|
-
const s =
|
|
48
|
+
} = r, m = D(() => Object.assign({}, ...n), n), y = T(m), _ = T(u), N = T(o);
|
|
49
|
+
return K(j, [l, t.id, y, _, N], () => {
|
|
50
|
+
const s = p ? p(m, u, t) : L(m, u, t, g), i = {
|
|
51
51
|
...s
|
|
52
|
-
},
|
|
53
|
-
i._tokenKey = V(i,
|
|
52
|
+
}, d = `${l}_${o.prefix}`, k = S(d), h = `${M}-${k}`;
|
|
53
|
+
i._tokenKey = V(i, d);
|
|
54
54
|
const [v, R] = b(s, o.key, {
|
|
55
55
|
prefix: o.prefix,
|
|
56
56
|
ignore: o.ignore,
|
|
57
57
|
unitless: o.unitless,
|
|
58
58
|
preserve: o.preserve,
|
|
59
|
-
hashPriority:
|
|
59
|
+
hashPriority: a,
|
|
60
60
|
hashCls: o.hashed ? h : void 0
|
|
61
61
|
});
|
|
62
|
-
return v._hashId =
|
|
62
|
+
return v._hashId = k, q(o.key), [v, h, i, R, o.key];
|
|
63
63
|
}, ([, , , , s]) => {
|
|
64
64
|
H(s, e);
|
|
65
65
|
}, ([, , , s, i]) => {
|
|
66
66
|
if (!s)
|
|
67
67
|
return;
|
|
68
|
-
const
|
|
68
|
+
const d = x(s, S(`css-var-${i}`), {
|
|
69
69
|
mark: A,
|
|
70
70
|
prepend: "queue",
|
|
71
71
|
attachTo: f,
|
|
72
72
|
priority: -999
|
|
73
73
|
});
|
|
74
|
-
|
|
74
|
+
d[C] = e, d.setAttribute(E, i);
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCacheToken.js","sources":["../../../../../../node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js"],"sourcesContent":["import hash from '@emotion/hash';\nimport { updateCSS } from \"@rc-component/util/es/Dom/dynamicCSS\";\nimport { useContext } from 'react';\nimport StyleContext, { ATTR_MARK, ATTR_TOKEN, CSS_IN_JS_INSTANCE } from \"../StyleContext\";\nimport { flattenToken, memoResult, token2key, toStyleStr } from \"../util\";\nimport { transformToken } from \"../util/css-variables\";\nimport useGlobalCache from \"./useGlobalCache\";\nconst EMPTY_OVERRIDE = {};\n\n// Generate different prefix to make user selector break in production env.\n// This helps developer not to do style override directly on the hash id.\nconst hashPrefix = process.env.NODE_ENV !== 'production' ? 'css-dev-only-do-not-override' : 'css';\nconst tokenKeys = new Map();\nfunction recordCleanToken(tokenKey) {\n tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) + 1);\n}\nfunction removeStyleTags(key, instanceId) {\n if (typeof document !== 'undefined') {\n const styles = document.querySelectorAll(`style[${ATTR_TOKEN}=\"${key}\"]`);\n styles.forEach(style => {\n if (style[CSS_IN_JS_INSTANCE] === instanceId) {\n style.parentNode?.removeChild(style);\n }\n });\n }\n}\nconst TOKEN_THRESHOLD = -1;\n\n// Remove will check current keys first\nfunction cleanTokenStyle(tokenKey, instanceId) {\n tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) - 1);\n const cleanableKeyList = new Set();\n tokenKeys.forEach((value, key) => {\n if (value <= 0) cleanableKeyList.add(key);\n });\n\n // Should keep tokens under threshold for not to insert style too often\n if (tokenKeys.size - cleanableKeyList.size > TOKEN_THRESHOLD) {\n cleanableKeyList.forEach(key => {\n removeStyleTags(key, instanceId);\n tokenKeys.delete(key);\n });\n }\n}\nexport const getComputedToken = (originToken, overrideToken, theme, format) => {\n const derivativeToken = theme.getDerivativeToken(originToken);\n\n // Merge with override\n let mergedDerivativeToken = {\n ...derivativeToken,\n ...overrideToken\n };\n\n // Format if needed\n if (format) {\n mergedDerivativeToken = format(mergedDerivativeToken);\n }\n return mergedDerivativeToken;\n};\nexport const TOKEN_PREFIX = 'token';\n/**\n * Cache theme derivative token as global shared one\n * @param theme Theme entity\n * @param tokens List of tokens, used for cache. Please do not dynamic generate object directly\n * @param option Additional config\n * @returns Call Theme.getDerivativeToken(tokenObject) to get token\n */\nexport default function useCacheToken(theme, tokens, option) {\n const {\n cache: {\n instanceId\n },\n container,\n hashPriority\n } = useContext(StyleContext);\n const {\n salt = '',\n override = EMPTY_OVERRIDE,\n formatToken,\n getComputedToken: compute,\n cssVar\n } = option;\n\n // Basic - We do basic cache here\n const mergedToken = memoResult(() => Object.assign({}, ...tokens), tokens);\n const tokenStr = flattenToken(mergedToken);\n const overrideTokenStr = flattenToken(override);\n const cssVarStr = flattenToken(cssVar);\n const cachedToken = useGlobalCache(TOKEN_PREFIX, [salt, theme.id, tokenStr, overrideTokenStr, cssVarStr], () => {\n const mergedDerivativeToken = compute ? compute(mergedToken, override, theme) : getComputedToken(mergedToken, override, theme, formatToken);\n const actualToken = {\n ...mergedDerivativeToken\n };\n\n // Optimize for `useStyleRegister` performance\n const mergedSalt = `${salt}_${cssVar.prefix}`;\n const hashId = hash(mergedSalt);\n const hashCls = `${hashPrefix}-${
|
|
1
|
+
{"version":3,"file":"useCacheToken.js","sources":["../../../../../../node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js"],"sourcesContent":["import hash from '@emotion/hash';\nimport { updateCSS } from \"@rc-component/util/es/Dom/dynamicCSS\";\nimport { useContext } from 'react';\nimport StyleContext, { ATTR_MARK, ATTR_TOKEN, CSS_IN_JS_INSTANCE } from \"../StyleContext\";\nimport { flattenToken, memoResult, token2key, toStyleStr } from \"../util\";\nimport { transformToken } from \"../util/css-variables\";\nimport useGlobalCache from \"./useGlobalCache\";\nconst EMPTY_OVERRIDE = {};\n\n// Generate different prefix to make user selector break in production env.\n// This helps developer not to do style override directly on the hash id.\nconst hashPrefix = process.env.NODE_ENV !== 'production' ? 'css-dev-only-do-not-override' : 'css';\nconst tokenKeys = new Map();\nfunction recordCleanToken(tokenKey) {\n tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) + 1);\n}\nfunction removeStyleTags(key, instanceId) {\n if (typeof document !== 'undefined') {\n const styles = document.querySelectorAll(`style[${ATTR_TOKEN}=\"${key}\"]`);\n styles.forEach(style => {\n if (style[CSS_IN_JS_INSTANCE] === instanceId) {\n style.parentNode?.removeChild(style);\n }\n });\n }\n}\nconst TOKEN_THRESHOLD = -1;\n\n// Remove will check current keys first\nfunction cleanTokenStyle(tokenKey, instanceId) {\n tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) - 1);\n const cleanableKeyList = new Set();\n tokenKeys.forEach((value, key) => {\n if (value <= 0) cleanableKeyList.add(key);\n });\n\n // Should keep tokens under threshold for not to insert style too often\n if (tokenKeys.size - cleanableKeyList.size > TOKEN_THRESHOLD) {\n cleanableKeyList.forEach(key => {\n removeStyleTags(key, instanceId);\n tokenKeys.delete(key);\n });\n }\n}\nexport const getComputedToken = (originToken, overrideToken, theme, format) => {\n const derivativeToken = theme.getDerivativeToken(originToken);\n\n // Merge with override\n let mergedDerivativeToken = {\n ...derivativeToken,\n ...overrideToken\n };\n\n // Format if needed\n if (format) {\n mergedDerivativeToken = format(mergedDerivativeToken);\n }\n return mergedDerivativeToken;\n};\nexport const TOKEN_PREFIX = 'token';\n/**\n * Cache theme derivative token as global shared one\n * @param theme Theme entity\n * @param tokens List of tokens, used for cache. Please do not dynamic generate object directly\n * @param option Additional config\n * @returns Call Theme.getDerivativeToken(tokenObject) to get token\n */\nexport default function useCacheToken(theme, tokens, option) {\n const {\n cache: {\n instanceId\n },\n container,\n hashPriority\n } = useContext(StyleContext);\n const {\n salt = '',\n override = EMPTY_OVERRIDE,\n formatToken,\n getComputedToken: compute,\n cssVar\n } = option;\n\n // Basic - We do basic cache here\n const mergedToken = memoResult(() => Object.assign({}, ...tokens), tokens);\n const tokenStr = flattenToken(mergedToken);\n const overrideTokenStr = flattenToken(override);\n const cssVarStr = flattenToken(cssVar);\n const cachedToken = useGlobalCache(TOKEN_PREFIX, [salt, theme.id, tokenStr, overrideTokenStr, cssVarStr], () => {\n const mergedDerivativeToken = compute ? compute(mergedToken, override, theme) : getComputedToken(mergedToken, override, theme, formatToken);\n const actualToken = {\n ...mergedDerivativeToken\n };\n\n // Optimize for `useStyleRegister` performance\n const mergedSalt = `${salt}_${cssVar.prefix}`;\n const hashId = hash(mergedSalt);\n const hashCls = `${hashPrefix}-${hashId}`;\n actualToken._tokenKey = token2key(actualToken, mergedSalt);\n\n // Replace token value with css variables\n const [tokenWithCssVar, cssVarsStr] = transformToken(mergedDerivativeToken, cssVar.key, {\n prefix: cssVar.prefix,\n ignore: cssVar.ignore,\n unitless: cssVar.unitless,\n preserve: cssVar.preserve,\n hashPriority,\n hashCls: cssVar.hashed ? hashCls : undefined\n });\n tokenWithCssVar._hashId = hashId;\n recordCleanToken(cssVar.key);\n return [tokenWithCssVar, hashCls, actualToken, cssVarsStr, cssVar.key];\n }, ([,,,, themeKey]) => {\n // Remove token will remove all related style\n cleanTokenStyle(themeKey, instanceId);\n }, ([,,, cssVarsStr, themeKey]) => {\n if (!cssVarsStr) {\n return;\n }\n const style = updateCSS(cssVarsStr, hash(`css-var-${themeKey}`), {\n mark: ATTR_MARK,\n prepend: 'queue',\n attachTo: container,\n priority: -999\n });\n style[CSS_IN_JS_INSTANCE] = instanceId;\n\n // Used for `useCacheToken` to remove on batch when token removed\n style.setAttribute(ATTR_TOKEN, themeKey);\n });\n return cachedToken;\n}\nexport const extract = (cache, effectStyles, options) => {\n const [,, realToken, styleStr, cssVarKey] = cache;\n const {\n plain\n } = options || {};\n if (!styleStr) {\n return null;\n }\n const styleId = realToken._tokenKey;\n const order = -999;\n\n // ====================== Style ======================\n // Used for @rc-component/util\n const sharedAttrs = {\n 'data-rc-order': 'prependQueue',\n 'data-rc-priority': `${order}`\n };\n const styleText = toStyleStr(styleStr, cssVarKey, styleId, sharedAttrs, plain);\n return [order, styleId, styleText];\n};"],"names":["EMPTY_OVERRIDE","hashPrefix","process","tokenKeys","recordCleanToken","tokenKey","removeStyleTags","key","instanceId","ATTR_TOKEN","style","CSS_IN_JS_INSTANCE","TOKEN_THRESHOLD","cleanTokenStyle","cleanableKeyList","value","getComputedToken","originToken","overrideToken","theme","format","mergedDerivativeToken","TOKEN_PREFIX","useCacheToken","tokens","option","container","hashPriority","useContext","StyleContext","salt","override","formatToken","compute","cssVar","mergedToken","memoResult","tokenStr","flattenToken","overrideTokenStr","cssVarStr","useGlobalCache","actualToken","mergedSalt","hashId","hash","hashCls","token2key","tokenWithCssVar","cssVarsStr","transformToken","themeKey","updateCSS","ATTR_MARK"],"mappings":";;;;;;;;AAOA,MAAMA,IAAiB,CAAA,GAIjBC,IAAaC,EAAQ,IAAI,aAAa,eAAe,iCAAiC,OACtFC,IAAY,oBAAI,IAAG;AACzB,SAASC,EAAiBC,GAAU;AAClC,EAAAF,EAAU,IAAIE,IAAWF,EAAU,IAAIE,CAAQ,KAAK,KAAK,CAAC;AAC5D;AACA,SAASC,EAAgBC,GAAKC,GAAY;AACxC,EAAI,OAAO,WAAa,OACP,SAAS,iBAAiB,SAASC,CAAU,KAAKF,CAAG,IAAI,EACjE,QAAQ,CAAAG,MAAS;AACtB,IAAIA,EAAMC,CAAkB,MAAMH,KAChCE,EAAM,YAAY,YAAYA,CAAK;AAAA,EAEvC,CAAC;AAEL;AACA,MAAME,IAAkB;AAGxB,SAASC,EAAgBR,GAAUG,GAAY;AAC7C,EAAAL,EAAU,IAAIE,IAAWF,EAAU,IAAIE,CAAQ,KAAK,KAAK,CAAC;AAC1D,QAAMS,IAAmB,oBAAI,IAAG;AAChC,EAAAX,EAAU,QAAQ,CAACY,GAAOR,MAAQ;AAChC,IAAIQ,KAAS,KAAGD,EAAiB,IAAIP,CAAG;AAAA,EAC1C,CAAC,GAGGJ,EAAU,OAAOW,EAAiB,OAAOF,KAC3CE,EAAiB,QAAQ,CAAAP,MAAO;AAC9B,IAAAD,EAAgBC,GAAKC,CAAU,GAC/BL,EAAU,OAAOI,CAAG;AAAA,EACtB,CAAC;AAEL;AACY,MAACS,IAAmB,CAACC,GAAaC,GAAeC,GAAOC,MAAW;AAI7E,MAAIC,IAAwB;AAAA,IAC1B,GAJsBF,EAAM,mBAAmBF,CAAW;AAAA,IAK1D,GAAGC;AAAA,EACP;AAGE,SAAIE,MACFC,IAAwBD,EAAOC,CAAqB,IAE/CA;AACT,GACaC,IAAe;AAQb,SAASC,EAAcJ,GAAOK,GAAQC,GAAQ;AAC3D,QAAM;AAAA,IACJ,OAAO;AAAA,MACL,YAAAjB;AAAA,IACN;AAAA,IACI,WAAAkB;AAAA,IACA,cAAAC;AAAA,EACJ,IAAMC,EAAWC,CAAY,GACrB;AAAA,IACJ,MAAAC,IAAO;AAAA,IACP,UAAAC,IAAW/B;AAAA,IACX,aAAAgC;AAAA,IACA,kBAAkBC;AAAA,IAClB,QAAAC;AAAA,EACJ,IAAMT,GAGEU,IAAcC,EAAW,MAAM,OAAO,OAAO,IAAI,GAAGZ,CAAM,GAAGA,CAAM,GACnEa,IAAWC,EAAaH,CAAW,GACnCI,IAAmBD,EAAaP,CAAQ,GACxCS,IAAYF,EAAaJ,CAAM;AA2CrC,SA1CoBO,EAAenB,GAAc,CAACQ,GAAMX,EAAM,IAAIkB,GAAUE,GAAkBC,CAAS,GAAG,MAAM;AAC9G,UAAMnB,IAAwBY,IAAUA,EAAQE,GAAaJ,GAAUZ,CAAK,IAAIH,EAAiBmB,GAAaJ,GAAUZ,GAAOa,CAAW,GACpIU,IAAc;AAAA,MAClB,GAAGrB;AAAA,IACT,GAGUsB,IAAa,GAAGb,CAAI,IAAII,EAAO,MAAM,IACrCU,IAASC,EAAKF,CAAU,GACxBG,IAAU,GAAG7C,CAAU,IAAI2C,CAAM;AACvC,IAAAF,EAAY,YAAYK,EAAUL,GAAaC,CAAU;AAGzD,UAAM,CAACK,GAAiBC,CAAU,IAAIC,EAAe7B,GAAuBa,EAAO,KAAK;AAAA,MACtF,QAAQA,EAAO;AAAA,MACf,QAAQA,EAAO;AAAA,MACf,UAAUA,EAAO;AAAA,MACjB,UAAUA,EAAO;AAAA,MACjB,cAAAP;AAAA,MACA,SAASO,EAAO,SAASY,IAAU;AAAA,IACzC,CAAK;AACD,WAAAE,EAAgB,UAAUJ,GAC1BxC,EAAiB8B,EAAO,GAAG,GACpB,CAACc,GAAiBF,GAASJ,GAAaO,GAAYf,EAAO,GAAG;AAAA,EACvE,GAAG,CAAC,CAAA,EAAA,EAAA,EAAA,EAAMiB,CAAQ,MAAM;AAEtB,IAAAtC,EAAgBsC,GAAU3C,CAAU;AAAA,EACtC,GAAG,CAAC,CAAA,EAAA,EAAA,EAAKyC,GAAYE,CAAQ,MAAM;AACjC,QAAI,CAACF;AACH;AAEF,UAAMvC,IAAQ0C,EAAUH,GAAYJ,EAAK,WAAWM,CAAQ,EAAE,GAAG;AAAA,MAC/D,MAAME;AAAA,MACN,SAAS;AAAA,MACT,UAAU3B;AAAA,MACV,UAAU;AAAA,IAChB,CAAK;AACD,IAAAhB,EAAMC,CAAkB,IAAIH,GAG5BE,EAAM,aAAaD,GAAY0C,CAAQ;AAAA,EACzC,CAAC;AAEH;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGlobalCache.js","sources":["../../../../../../node_modules/@ant-design/cssinjs/es/hooks/useGlobalCache.js"],"sourcesContent":["import * as React from 'react';\nimport { useInsertionEffect } from 'react';\nimport { pathKey } from \"../Cache\";\nimport StyleContext from \"../StyleContext\";\nimport useHMR from \"./useHMR\";\nconst effectMap = new Map();\nexport default function useGlobalCache(prefix, keyPath, cacheFn, onCacheRemove,\n// Add additional effect trigger by `useInsertionEffect`\nonCacheEffect) {\n const {\n cache: globalCache\n } = React.useContext(StyleContext);\n const fullPath = [prefix, ...keyPath];\n const fullPathStr = pathKey(fullPath);\n const HMRUpdate = useHMR();\n const buildCache = updater => {\n globalCache.opUpdate(fullPathStr, prevCache => {\n const [times = 0, cache] = prevCache || [undefined, undefined];\n\n // HMR should always ignore cache since developer may change it\n let tmpCache = cache;\n if (process.env.NODE_ENV !== 'production' && cache && HMRUpdate) {\n onCacheRemove?.(tmpCache, HMRUpdate);\n tmpCache = null;\n }\n const mergedCache = tmpCache || cacheFn();\n const data = [times, mergedCache];\n\n // Call updater if need additional logic\n return updater ? updater(data) : data;\n });\n };\n\n // Create cache\n React.useMemo(() => {\n buildCache();\n }, /* eslint-disable react-hooks/exhaustive-deps */\n [fullPathStr]\n /* eslint-enable */);\n let cacheEntity = globalCache.opGet(fullPathStr);\n\n // HMR clean the cache but not trigger `useMemo` again\n // Let's fallback of this\n // ref https://github.com/ant-design/cssinjs/issues/127\n if (process.env.NODE_ENV !== 'production' && !cacheEntity) {\n buildCache();\n cacheEntity = globalCache.opGet(fullPathStr);\n }\n const cacheContent = cacheEntity[1];\n\n // Remove if no need anymore\n useInsertionEffect(() => {\n buildCache(([times, cache]) => [times + 1, cache]);\n if (!effectMap.has(fullPathStr)) {\n onCacheEffect?.(cacheContent);\n effectMap.set(fullPathStr, true);\n\n //
|
|
1
|
+
{"version":3,"file":"useGlobalCache.js","sources":["../../../../../../node_modules/@ant-design/cssinjs/es/hooks/useGlobalCache.js"],"sourcesContent":["import * as React from 'react';\nimport { useInsertionEffect } from 'react';\nimport { pathKey } from \"../Cache\";\nimport StyleContext from \"../StyleContext\";\nimport useHMR from \"./useHMR\";\nconst effectMap = new Map();\nexport default function useGlobalCache(prefix, keyPath, cacheFn, onCacheRemove,\n// Add additional effect trigger by `useInsertionEffect`\nonCacheEffect) {\n const {\n cache: globalCache\n } = React.useContext(StyleContext);\n const fullPath = [prefix, ...keyPath];\n const fullPathStr = pathKey(fullPath);\n const HMRUpdate = useHMR();\n const buildCache = updater => {\n globalCache.opUpdate(fullPathStr, prevCache => {\n const [times = 0, cache] = prevCache || [undefined, undefined];\n\n // HMR should always ignore cache since developer may change it\n let tmpCache = cache;\n if (process.env.NODE_ENV !== 'production' && cache && HMRUpdate) {\n onCacheRemove?.(tmpCache, HMRUpdate);\n tmpCache = null;\n }\n const mergedCache = tmpCache || cacheFn();\n const data = [times, mergedCache];\n\n // Call updater if need additional logic\n return updater ? updater(data) : data;\n });\n };\n\n // Create cache\n React.useMemo(() => {\n buildCache();\n }, /* eslint-disable react-hooks/exhaustive-deps */\n [fullPathStr]\n /* eslint-enable */);\n let cacheEntity = globalCache.opGet(fullPathStr);\n\n // HMR clean the cache but not trigger `useMemo` again\n // Let's fallback of this\n // ref https://github.com/ant-design/cssinjs/issues/127\n if (process.env.NODE_ENV !== 'production' && !cacheEntity) {\n buildCache();\n cacheEntity = globalCache.opGet(fullPathStr);\n }\n const cacheContent = cacheEntity[1];\n\n // Remove if no need anymore\n useInsertionEffect(() => {\n buildCache(([times, cache]) => [times + 1, cache]);\n if (!effectMap.has(fullPathStr)) {\n onCacheEffect?.(cacheContent);\n effectMap.set(fullPathStr, true);\n\n // 微任务清理缓存,可以认为是单次 batch render 中只触发一次 effect\n Promise.resolve().then(() => {\n effectMap.delete(fullPathStr);\n });\n }\n return () => {\n globalCache.opUpdate(fullPathStr, prevCache => {\n const [times = 0, cache] = prevCache || [];\n const nextCount = times - 1;\n if (nextCount === 0) {\n onCacheRemove?.(cache, false);\n effectMap.delete(fullPathStr);\n return null;\n }\n return [times - 1, cache];\n });\n };\n }, [fullPathStr]);\n return cacheContent;\n}"],"names":["effectMap","useGlobalCache","prefix","keyPath","cacheFn","onCacheRemove","onCacheEffect","globalCache","React","StyleContext","fullPath","fullPathStr","pathKey","HMRUpdate","useHMR","buildCache","updater","prevCache","times","cache","tmpCache","process","mergedCache","data","cacheEntity","cacheContent","useInsertionEffect"],"mappings":";;;;;;AAKA,MAAMA,IAAY,oBAAI,IAAG;AACV,SAASC,EAAeC,GAAQC,GAASC,GAASC,GAEjEC,GAAe;AACb,QAAM;AAAA,IACJ,OAAOC;AAAA,EACX,IAAMC,EAAM,WAAWC,CAAY,GAC3BC,IAAW,CAACR,GAAQ,GAAGC,CAAO,GAC9BQ,IAAcC,EAAQF,CAAQ,GAC9BG,IAAYC,EAAM,GAClBC,IAAa,CAAAC,MAAW;AAC5B,IAAAT,EAAY,SAASI,GAAa,CAAAM,MAAa;AAC7C,YAAM,CAACC,IAAQ,GAAGC,CAAK,IAAIF,KAAa,CAAC,QAAW,MAAS;AAG7D,UAAIG,IAAWD;AACf,MAAIE,EAAQ,IAAI,aAAa,gBAAgBF,KAASN,MACpDR,IAAgBe,GAAUP,CAAS,GACnCO,IAAW;AAEb,YAAME,IAAcF,KAAYhB,EAAO,GACjCmB,IAAO,CAACL,GAAOI,CAAW;AAGhC,aAAON,IAAUA,EAAQO,CAAI,IAAIA;AAAA,IACnC,CAAC;AAAA,EACH;AAGA,EAAAf,EAAM;AAAA,IAAQ,MAAM;AAClB,MAAAO,EAAU;AAAA,IACZ;AAAA;AAAA,IACA,CAACJ,CAAW;AAAA;AAAA,EACd;AACE,MAAIa,IAAcjB,EAAY,MAAMI,CAAW;AAK/C,EAAIU,EAAQ,IAAI,aAAa,gBAAgB,CAACG,MAC5CT,EAAU,GACVS,IAAcjB,EAAY,MAAMI,CAAW;AAE7C,QAAMc,IAAeD,EAAY,CAAC;AAGlC,SAAAE,EAAmB,OACjBX,EAAW,CAAC,CAACG,GAAOC,CAAK,MAAM,CAACD,IAAQ,GAAGC,CAAK,CAAC,GAC5CnB,EAAU,IAAIW,CAAW,MAC5BL,IAAgBmB,CAAY,GAC5BzB,EAAU,IAAIW,GAAa,EAAI,GAG/B,QAAQ,UAAU,KAAK,MAAM;AAC3B,IAAAX,EAAU,OAAOW,CAAW;AAAA,EAC9B,CAAC,IAEI,MAAM;AACX,IAAAJ,EAAY,SAASI,GAAa,CAAAM,MAAa;AAC7C,YAAM,CAACC,IAAQ,GAAGC,CAAK,IAAIF,KAAa,CAAA;AAExC,aADkBC,IAAQ,MACR,KAChBb,IAAgBc,GAAO,EAAK,GAC5BnB,EAAU,OAAOW,CAAW,GACrB,QAEF,CAACO,IAAQ,GAAGC,CAAK;AAAA,IAC1B,CAAC;AAAA,EACH,IACC,CAACR,CAAW,CAAC,GACTc;AACT;","x_google_ignoreList":[0]}
|
|
@@ -4,36 +4,39 @@ import { updateCSS as T, removeCSS as q } from "../../../../@rc-component/util/e
|
|
|
4
4
|
import * as F from "react";
|
|
5
5
|
import U from "../../../../@emotion/unitless/dist/unitless.browser.esm.js";
|
|
6
6
|
import V, { ATTR_MARK as R, CSS_IN_JS_INSTANCE as W, ATTR_CACHE_PATH as Y } from "../StyleContext.js";
|
|
7
|
-
import { isClientSide as O } from "../util/index.js";
|
|
8
|
-
import { CSS_FILE_STYLE as
|
|
9
|
-
import
|
|
10
|
-
import { serialize as
|
|
7
|
+
import { isClientSide as O, isNonNullable as G, where as J } from "../util/index.js";
|
|
8
|
+
import { CSS_FILE_STYLE as X, existPath as Z, getStyleAndHash as B } from "../util/cacheMapUtil.js";
|
|
9
|
+
import Q from "./useGlobalCache.js";
|
|
10
|
+
import { serialize as v, stringify as w } from "../../../../stylis/src/Serializer.js";
|
|
11
11
|
import { compile as z } from "../../../../stylis/src/Parser.js";
|
|
12
|
-
import { middleware as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
12
|
+
import { middleware as ee, prefixer as te } from "../../../../stylis/src/Middleware.js";
|
|
13
|
+
import re from "../linters/contentQuotesLinter.js";
|
|
14
|
+
import ne from "../linters/hashedAnimationLinter.js";
|
|
15
15
|
const D = "_skip_check_", K = "_multi_value_";
|
|
16
|
-
function H(
|
|
17
|
-
return (c ?
|
|
16
|
+
function H(r, c) {
|
|
17
|
+
return (c ? v(z(r), ee([te, w])) : v(z(r), w)).replace(/\{%%%\:[^;];}/g, ";");
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
return typeof
|
|
19
|
+
function oe(r) {
|
|
20
|
+
return typeof r == "object" && r && (D in r || K in r);
|
|
21
21
|
}
|
|
22
|
-
function k(
|
|
22
|
+
function k(r, c, h = "high") {
|
|
23
23
|
if (!c)
|
|
24
|
-
return
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
return r;
|
|
25
|
+
const C = J({
|
|
26
|
+
hashCls: c,
|
|
27
|
+
hashPriority: h
|
|
28
|
+
});
|
|
29
|
+
return r.split(",").map((f) => {
|
|
30
|
+
const m = f.trim().split(/\s+/);
|
|
31
|
+
let u = m[0] || "";
|
|
32
|
+
const _ = u.match(/^\w+/)?.[0] || "";
|
|
33
|
+
return u = `${_}${C}${u.slice(_.length)}`, [u, ...m.slice(1)].join(" ");
|
|
31
34
|
}).join(",");
|
|
32
35
|
}
|
|
33
|
-
const x = (
|
|
36
|
+
const x = (r, c = {}, {
|
|
34
37
|
root: h,
|
|
35
|
-
injectHash:
|
|
36
|
-
parentSelectors:
|
|
38
|
+
injectHash: C,
|
|
39
|
+
parentSelectors: N
|
|
37
40
|
} = {
|
|
38
41
|
root: !0,
|
|
39
42
|
parentSelectors: []
|
|
@@ -41,159 +44,159 @@ const x = (t, c = {}, {
|
|
|
41
44
|
const {
|
|
42
45
|
hashId: f,
|
|
43
46
|
layer: m,
|
|
44
|
-
path:
|
|
45
|
-
hashPriority:
|
|
46
|
-
transformers:
|
|
47
|
-
linters:
|
|
47
|
+
path: u,
|
|
48
|
+
hashPriority: _,
|
|
49
|
+
transformers: P = [],
|
|
50
|
+
linters: g = []
|
|
48
51
|
} = c;
|
|
49
|
-
let p = "",
|
|
50
|
-
function
|
|
52
|
+
let p = "", E = {};
|
|
53
|
+
function b(n) {
|
|
51
54
|
const a = n.getName(f);
|
|
52
|
-
if (
|
|
55
|
+
if (!E[a]) {
|
|
53
56
|
const [o] = x(n.style, c, {
|
|
54
57
|
root: !1,
|
|
55
|
-
parentSelectors:
|
|
58
|
+
parentSelectors: N
|
|
56
59
|
});
|
|
57
|
-
|
|
60
|
+
E[a] = `@keyframes ${n.getName(f)}${o}`;
|
|
58
61
|
}
|
|
59
62
|
}
|
|
60
|
-
function
|
|
63
|
+
function j(n, a = []) {
|
|
61
64
|
return n.forEach((o) => {
|
|
62
|
-
Array.isArray(o) ?
|
|
65
|
+
Array.isArray(o) ? j(o, a) : o && a.push(o);
|
|
63
66
|
}), a;
|
|
64
67
|
}
|
|
65
|
-
return
|
|
68
|
+
return j(Array.isArray(r) ? r : [r]).forEach((n) => {
|
|
66
69
|
const a = typeof n == "string" && !h ? {} : n;
|
|
67
70
|
if (typeof a == "string")
|
|
68
71
|
p += `${a}
|
|
69
72
|
`;
|
|
70
73
|
else if (a._keyframe)
|
|
71
|
-
|
|
74
|
+
b(a);
|
|
72
75
|
else {
|
|
73
|
-
const o =
|
|
76
|
+
const o = P.reduce((s, e) => e?.visit?.(s) || s, a);
|
|
74
77
|
Object.keys(o).forEach((s) => {
|
|
75
78
|
const e = o[s];
|
|
76
|
-
if (typeof e == "object" && e && (s !== "animationName" || !e._keyframe) && !
|
|
77
|
-
let y = !1,
|
|
78
|
-
(h ||
|
|
79
|
-
const [l,
|
|
79
|
+
if (typeof e == "object" && e && (s !== "animationName" || !e._keyframe) && !oe(e)) {
|
|
80
|
+
let y = !1, t = s.trim(), i = !1;
|
|
81
|
+
(h || C) && f ? t.startsWith("@") ? y = !0 : t === "&" ? t = k("", f, _) : t = k(s, f, _) : h && !f && (t === "&" || t === "") && (t = "", i = !0);
|
|
82
|
+
const [l, $] = x(e, c, {
|
|
80
83
|
root: i,
|
|
81
84
|
injectHash: y,
|
|
82
|
-
parentSelectors: [...
|
|
85
|
+
parentSelectors: [...N, t]
|
|
83
86
|
});
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}, p += `${
|
|
87
|
+
E = {
|
|
88
|
+
...E,
|
|
89
|
+
...$
|
|
90
|
+
}, p += `${t}${l}`;
|
|
88
91
|
} else {
|
|
89
92
|
let y = function(i, l) {
|
|
90
|
-
L.env.NODE_ENV !== "production" && (typeof e != "object" || !e?.[D]) && [
|
|
91
|
-
path:
|
|
93
|
+
L.env.NODE_ENV !== "production" && (typeof e != "object" || !e?.[D]) && [re, ne, ...g].forEach((A) => A(i, l, {
|
|
94
|
+
path: u,
|
|
92
95
|
hashId: f,
|
|
93
|
-
parentSelectors:
|
|
96
|
+
parentSelectors: N
|
|
94
97
|
}));
|
|
95
|
-
const
|
|
98
|
+
const $ = i.replace(/[A-Z]/g, (A) => `-${A.toLowerCase()}`);
|
|
96
99
|
let S = l;
|
|
97
|
-
!U[i] && typeof S == "number" && S !== 0 && (S = `${S}px`), i === "animationName" && l?._keyframe && (
|
|
100
|
+
!U[i] && typeof S == "number" && S !== 0 && (S = `${S}px`), i === "animationName" && l?._keyframe && (b(l), S = l.getName(f)), p += `${$}:${S};`;
|
|
98
101
|
};
|
|
99
|
-
const
|
|
100
|
-
typeof e == "object" && e?.[K] && Array.isArray(
|
|
102
|
+
const t = e?.value ?? e;
|
|
103
|
+
typeof e == "object" && e?.[K] && Array.isArray(t) ? t.forEach((i) => {
|
|
101
104
|
y(s, i);
|
|
102
|
-
}) : y(s,
|
|
105
|
+
}) : G(t) && y(s, t);
|
|
103
106
|
}
|
|
104
107
|
});
|
|
105
108
|
}
|
|
106
|
-
}), h ? m && (p && (p = `@layer ${m.name} {${p}}`), m.dependencies && (
|
|
107
|
-
`))) : p = `{${p}}`, [p,
|
|
109
|
+
}), h ? m && (p && (p = `@layer ${m.name} {${p}}`), m.dependencies && (E[`@layer ${m.name}`] = m.dependencies.map((n) => `@layer ${n}, ${m.name};`).join(`
|
|
110
|
+
`))) : p = `{${p}}`, [p, E];
|
|
108
111
|
};
|
|
109
|
-
function
|
|
110
|
-
return M(`${
|
|
112
|
+
function se(r, c) {
|
|
113
|
+
return M(`${r.join("%")}${c}`);
|
|
111
114
|
}
|
|
112
|
-
const
|
|
113
|
-
function $e(
|
|
115
|
+
const ie = "style";
|
|
116
|
+
function $e(r, c) {
|
|
114
117
|
const {
|
|
115
118
|
path: h,
|
|
116
|
-
hashId:
|
|
117
|
-
layer:
|
|
119
|
+
hashId: C,
|
|
120
|
+
layer: N,
|
|
118
121
|
nonce: f,
|
|
119
122
|
clientOnly: m,
|
|
120
|
-
order:
|
|
121
|
-
} =
|
|
122
|
-
mock:
|
|
123
|
-
hashPriority:
|
|
124
|
-
container:
|
|
123
|
+
order: u = 0
|
|
124
|
+
} = r, {
|
|
125
|
+
mock: _,
|
|
126
|
+
hashPriority: P,
|
|
127
|
+
container: g,
|
|
125
128
|
transformers: p,
|
|
126
|
-
linters:
|
|
127
|
-
cache:
|
|
128
|
-
layer:
|
|
129
|
-
autoPrefix:
|
|
130
|
-
} = F.useContext(V), n = [
|
|
131
|
-
|
|
129
|
+
linters: E,
|
|
130
|
+
cache: b,
|
|
131
|
+
layer: j,
|
|
132
|
+
autoPrefix: I
|
|
133
|
+
} = F.useContext(V), n = [C || ""];
|
|
134
|
+
j && n.push("layer"), n.push(...h);
|
|
132
135
|
let a = O;
|
|
133
|
-
L.env.NODE_ENV !== "production" &&
|
|
134
|
-
|
|
136
|
+
L.env.NODE_ENV !== "production" && _ !== void 0 && (a = _ === "client"), Q(
|
|
137
|
+
ie,
|
|
135
138
|
n,
|
|
136
139
|
// Create cache if needed
|
|
137
140
|
() => {
|
|
138
141
|
const o = n.join("|");
|
|
139
|
-
if (
|
|
140
|
-
const [l,
|
|
142
|
+
if (Z(o)) {
|
|
143
|
+
const [l, $] = B(o);
|
|
141
144
|
if (l)
|
|
142
|
-
return [l,
|
|
145
|
+
return [l, $, {}, m, u];
|
|
143
146
|
}
|
|
144
147
|
const s = c(), [e, y] = x(s, {
|
|
145
|
-
hashId:
|
|
146
|
-
hashPriority:
|
|
147
|
-
layer:
|
|
148
|
+
hashId: C,
|
|
149
|
+
hashPriority: P,
|
|
150
|
+
layer: j ? N : void 0,
|
|
148
151
|
path: h.join("-"),
|
|
149
152
|
transformers: p,
|
|
150
|
-
linters:
|
|
151
|
-
}),
|
|
152
|
-
return [
|
|
153
|
+
linters: E
|
|
154
|
+
}), t = H(e, I || !1), i = se(n, t);
|
|
155
|
+
return [t, i, y, m, u];
|
|
153
156
|
},
|
|
154
157
|
// Remove cache if no need
|
|
155
158
|
(o, s) => {
|
|
156
159
|
const [, e] = o;
|
|
157
160
|
s && O && q(e, {
|
|
158
161
|
mark: R,
|
|
159
|
-
attachTo:
|
|
162
|
+
attachTo: g
|
|
160
163
|
});
|
|
161
164
|
},
|
|
162
165
|
// Effect: Inject style here
|
|
163
166
|
(o) => {
|
|
164
|
-
const [s, e, y, ,
|
|
165
|
-
if (a && s !==
|
|
167
|
+
const [s, e, y, , t] = o;
|
|
168
|
+
if (a && s !== X) {
|
|
166
169
|
const i = {
|
|
167
170
|
mark: R,
|
|
168
|
-
prepend:
|
|
169
|
-
attachTo:
|
|
170
|
-
priority:
|
|
171
|
+
prepend: j ? !1 : "queue",
|
|
172
|
+
attachTo: g,
|
|
173
|
+
priority: t
|
|
171
174
|
}, l = typeof f == "function" ? f() : f;
|
|
172
175
|
l && (i.csp = {
|
|
173
176
|
nonce: l
|
|
174
177
|
});
|
|
175
|
-
const
|
|
178
|
+
const $ = [], S = [];
|
|
176
179
|
Object.keys(y).forEach((d) => {
|
|
177
|
-
d.startsWith("@layer") ?
|
|
178
|
-
}),
|
|
179
|
-
T(H(y[d],
|
|
180
|
+
d.startsWith("@layer") ? $.push(d) : S.push(d);
|
|
181
|
+
}), $.forEach((d) => {
|
|
182
|
+
T(H(y[d], I || !1), `_layer-${d}`, {
|
|
180
183
|
...i,
|
|
181
184
|
prepend: !0
|
|
182
185
|
});
|
|
183
186
|
});
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
T(H(y[d],
|
|
187
|
+
const A = T(s, e, i);
|
|
188
|
+
A[W] = b.instanceId, L.env.NODE_ENV !== "production" && A.setAttribute(Y, n.join("|")), S.forEach((d) => {
|
|
189
|
+
T(H(y[d], I || !1), `_effect-${d}`, i);
|
|
187
190
|
});
|
|
188
191
|
}
|
|
189
192
|
}
|
|
190
193
|
);
|
|
191
194
|
}
|
|
192
195
|
export {
|
|
193
|
-
|
|
196
|
+
ie as STYLE_PREFIX,
|
|
194
197
|
$e as default,
|
|
195
198
|
H as normalizeStyle,
|
|
196
199
|
x as parseStyle,
|
|
197
|
-
|
|
200
|
+
se as uniqueHash
|
|
198
201
|
};
|
|
199
202
|
//# sourceMappingURL=useStyleRegister.js.map
|