@pisell/materials 2.2.108 → 2.2.110
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 +7 -7
- package/build/lowcode/preview.js +164 -148
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +53 -23
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +58 -28
- package/es/components/appVersionControl/index.d.ts +4 -0
- package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +20 -0
- package/es/components/auto-resize-text/auto-text-size-standalone.js +258 -0
- package/es/components/auto-resize-text/index.d.ts +6 -0
- package/es/components/auto-resize-text/index.js +40 -0
- package/es/components/cardPro/index.d.ts +3 -0
- package/es/components/cardPro/index.js +10 -3
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +11 -4
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +7 -2
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +100 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +35 -15
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +2 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +92 -6
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +84 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +10 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +10 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +2 -1
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +199 -19
- package/es/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +6 -0
- package/es/components/dataSourceComponents/fields/Upload/CameraPopover.js +66 -0
- package/es/components/dataSourceComponents/fields/Upload/index.js +4 -3
- package/es/components/dataSourceComponents/fields/Upload/index.less +35 -3
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +38 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +11 -11
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/drag-sort-tree/index.d.ts +4 -0
- package/es/components/filter/index.d.ts +0 -1
- package/es/components/filter/types.d.ts +3 -0
- package/es/components/iconfont/index.d.ts +8 -0
- package/es/components/iconfont/index.js +1 -1
- package/es/components/keyboard/index.d.ts +22 -0
- package/es/components/keyboard/index.js +159 -0
- package/es/components/keyboard/index.less +44 -0
- package/es/components/list/index.d.ts +0 -1
- package/es/components/login-and-register/index.d.ts +82 -0
- package/es/components/page/index.d.ts +1 -0
- package/es/components/pisell-config-provider/index.d.ts +13 -0
- package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
- package/es/components/pisellCamera/index.d.ts +4 -0
- package/es/components/pisellCamera/index.js +228 -0
- package/es/components/pisellCamera/index.less +131 -0
- package/es/components/pisellEmpty/index.d.ts +19 -0
- package/es/components/pisellInput/index.d.ts +1 -0
- package/es/components/pisellModal/components/IpadModal/index.d.ts +1 -0
- package/es/components/pisellModal/components/MobileModal/index.d.ts +1 -0
- package/es/components/pisellModal/components/index.d.ts +1 -0
- package/es/components/pisellQRScanner/index.d.ts +0 -13
- package/es/components/pisellQRScanner/index.js +0 -8
- package/es/components/pisellToast/squareToast/renderImperatively.d.ts +29 -0
- package/es/components/pisellWalletPassCard/index.d.ts +136 -0
- package/es/components/pisellWalletPassCard/index.js +6 -3
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.js +73 -5
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.less +39 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/index.js +2 -11
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
- package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +18 -0
- package/es/components/productCard/components/Time/index.d.ts +3 -0
- package/es/components/select-time/index.d.ts +1 -0
- package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/Group/index.d.ts +1 -0
- package/es/components/table/Actions/index.d.ts +1 -0
- package/es/components/table/Actions/index.js +4 -1
- package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
- package/es/components/table/Gallery/index.d.ts +5 -0
- package/es/components/table/Table/fields/date/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/index.d.ts +1 -0
- package/es/components/table/Table/fields/link/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/index.d.ts +1 -0
- package/es/components/table/Table/index.d.ts +4 -0
- package/es/components/table/Table/utils.d.ts +161 -0
- package/es/components/table/Table/utils.js +22 -1
- package/es/components/table/hooks/useTableSetting.d.ts +21 -0
- package/es/components/table/hooks/useTableSetting.js +113 -5
- package/es/components/table/hooks/useTransDataSource.d.ts +11 -0
- package/es/components/table/index.js +14 -3
- package/es/components/table/types.d.ts +268 -0
- package/es/components/translation/index.d.ts +14 -0
- package/es/components/versionModal/index.d.ts +23 -0
- package/es/components/versionSelect/index.d.ts +1 -0
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +5 -1
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.js +21 -7
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.less +9 -5
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +4 -0
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +44 -25
- package/es/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
- package/es/components/virtualInput/BaseVirtualInput/index.js +163 -0
- package/es/components/virtualInput/BaseVirtualInput/index.less +77 -0
- package/es/components/virtualInput/index.d.ts +24 -0
- package/es/components/virtualInput/index.js +60 -0
- package/es/components/virtualInput/index.less +42 -0
- package/es/components/walletCard/index.d.ts +71 -0
- package/es/index.d.ts +144 -0
- package/es/index.js +4 -1
- package/es/locales/en-US.d.ts +307 -0
- package/es/locales/en-US.js +29 -1
- package/es/locales/zh-CN.d.ts +302 -0
- package/es/locales/zh-CN.js +29 -1
- package/es/locales/zh-TW.d.ts +302 -0
- package/es/locales/zh-TW.js +29 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/appVersionControl/index.d.ts +4 -0
- package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +20 -0
- package/lib/components/auto-resize-text/auto-text-size-standalone.js +273 -0
- package/lib/components/auto-resize-text/index.d.ts +6 -0
- package/lib/components/auto-resize-text/index.js +71 -0
- package/lib/components/cardPro/index.d.ts +3 -0
- package/lib/components/cardPro/index.js +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +8 -2
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +7 -2
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +100 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +22 -7
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +2 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +78 -7
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +84 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +10 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +10 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +2 -1
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +168 -5
- package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +6 -0
- package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.js +95 -0
- package/lib/components/dataSourceComponents/fields/Upload/index.js +2 -1
- package/lib/components/dataSourceComponents/fields/Upload/index.less +35 -3
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +38 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +11 -11
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/drag-sort-tree/index.d.ts +4 -0
- package/lib/components/filter/index.d.ts +0 -1
- package/lib/components/filter/types.d.ts +3 -0
- package/lib/components/iconfont/index.d.ts +8 -0
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/keyboard/index.d.ts +22 -0
- package/lib/components/keyboard/index.js +223 -0
- package/lib/components/keyboard/index.less +44 -0
- package/lib/components/list/index.d.ts +0 -1
- package/lib/components/login-and-register/index.d.ts +82 -0
- package/lib/components/page/index.d.ts +1 -0
- package/lib/components/pisell-config-provider/index.d.ts +13 -0
- package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
- package/lib/components/pisellCamera/index.d.ts +4 -0
- package/lib/components/pisellCamera/index.js +222 -0
- package/lib/components/pisellCamera/index.less +131 -0
- package/lib/components/pisellEmpty/index.d.ts +19 -0
- package/lib/components/pisellInput/index.d.ts +1 -0
- package/lib/components/pisellModal/components/IpadModal/index.d.ts +1 -0
- package/lib/components/pisellModal/components/MobileModal/index.d.ts +1 -0
- package/lib/components/pisellModal/components/index.d.ts +1 -0
- package/lib/components/pisellQRScanner/index.d.ts +0 -13
- package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +29 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +136 -0
- package/lib/components/pisellWalletPassCard/index.js +7 -2
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.js +45 -11
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.less +39 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/index.js +2 -13
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
- package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +18 -0
- package/lib/components/productCard/components/Time/index.d.ts +3 -0
- package/lib/components/select-time/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/Group/index.d.ts +1 -0
- package/lib/components/table/Actions/index.d.ts +1 -0
- package/lib/components/table/Actions/index.js +4 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
- package/lib/components/table/Gallery/index.d.ts +5 -0
- package/lib/components/table/Table/fields/date/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/index.d.ts +1 -0
- package/lib/components/table/Table/fields/link/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/index.d.ts +1 -0
- package/lib/components/table/Table/index.d.ts +4 -0
- package/lib/components/table/Table/utils.d.ts +161 -0
- package/lib/components/table/Table/utils.js +18 -1
- package/lib/components/table/hooks/useTableSetting.d.ts +21 -0
- package/lib/components/table/hooks/useTableSetting.js +114 -4
- package/lib/components/table/hooks/useTransDataSource.d.ts +11 -0
- package/lib/components/table/index.js +12 -1
- package/lib/components/table/types.d.ts +268 -0
- package/lib/components/translation/index.d.ts +14 -0
- package/lib/components/versionModal/index.d.ts +23 -0
- package/lib/components/versionSelect/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +5 -1
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.js +19 -2
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.less +9 -5
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +4 -0
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +45 -27
- package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
- package/lib/components/virtualInput/BaseVirtualInput/index.js +179 -0
- package/lib/components/virtualInput/BaseVirtualInput/index.less +77 -0
- package/lib/components/virtualInput/index.d.ts +24 -0
- package/lib/components/virtualInput/index.js +102 -0
- package/lib/components/virtualInput/index.less +42 -0
- package/lib/components/walletCard/index.d.ts +71 -0
- package/lib/index.d.ts +144 -0
- package/lib/index.js +9 -0
- package/lib/locales/en-US.d.ts +307 -0
- package/lib/locales/en-US.js +25 -1
- package/lib/locales/zh-CN.d.ts +302 -0
- package/lib/locales/zh-CN.js +25 -1
- package/lib/locales/zh-TW.d.ts +302 -0
- package/lib/locales/zh-TW.js +25 -1
- package/lib/utils/platform.d.ts +1 -1
- package/lowcode/auto-resize-text/meta.ts +47 -0
- package/lowcode/data-source-table/meta.ts +358 -66
- package/lowcode/form-item-upload/meta.ts +20 -5
- package/lowcode/table/meta.ts +104 -0
- package/package.json +3 -2
package/es/locales/zh-CN.js
CHANGED
|
@@ -337,6 +337,34 @@ export default {
|
|
|
337
337
|
'pisell-wallet-pass-card-status-expired': '已过期',
|
|
338
338
|
'pisell-wallet-pass-card-status-disabled': '已禁用',
|
|
339
339
|
'pisell-wallet-pass-card-status-conflict': '冲突',
|
|
340
|
+
'pisell-wallet-pass-card-status-lastPayment': '上次结算',
|
|
340
341
|
'pisell-wallet-pass-card-reset': '清空',
|
|
341
|
-
'pisell-wallet-pass-card-done': '保存'
|
|
342
|
+
'pisell-wallet-pass-card-done': '保存',
|
|
343
|
+
// 相机组件
|
|
344
|
+
'pisell-camera-no-camera-accessible': '没有找到摄像头',
|
|
345
|
+
'pisell-camera-permission-denied': '没有权限使用摄像头',
|
|
346
|
+
'pisell-camera-switch-camera': '切换摄像头',
|
|
347
|
+
'pisell-camera-canvas': 'canvas不支持',
|
|
348
|
+
'pisell-camera-checking': '正在检测摄像头...',
|
|
349
|
+
'pisell-camera-no-camera-desc': '请检查设备是否连接摄像头或授权浏览器访问摄像头',
|
|
350
|
+
// 拍照组件
|
|
351
|
+
'pisell-upload-camera-local-files': '本地文件',
|
|
352
|
+
'pisell-upload-camera-capture': '拍摄/拍照',
|
|
353
|
+
'pisell-upload-camera-retake': '重拍',
|
|
354
|
+
'pisell-upload-camera-use': '使用照片',
|
|
355
|
+
// 列表组件
|
|
356
|
+
'pisell-list-tab-group-default': '字段',
|
|
357
|
+
'pisell-list-empty-text-default': '暂无数据',
|
|
358
|
+
'pisell-list-load-more': '查看更多',
|
|
359
|
+
'pisell-list-view-less': '查看更少',
|
|
360
|
+
'pisell-list-pagination-total': function pisellListPaginationTotal(start, end, total) {
|
|
361
|
+
return "\u663E\u793A\u7B2C ".concat(start, "-").concat(end, " \u6761\uFF0C\u5171 ").concat(total, " \u6761");
|
|
362
|
+
},
|
|
363
|
+
'pisell-list-scroll-down': '向下滚动',
|
|
364
|
+
'pisell-list-scroll-right': '向右滚动',
|
|
365
|
+
'pisell-list-pagination-page-of': function pisellListPaginationPageOf(current, total) {
|
|
366
|
+
return "\u7B2C ".concat(current, " \u9875 \u5171 ").concat(total, " \u9875");
|
|
367
|
+
},
|
|
368
|
+
'pisell-list-pagination-previous': '上一页',
|
|
369
|
+
'pisell-list-pagination-next': '下一页'
|
|
342
370
|
};
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'table-filter-search': string;
|
|
3
|
+
'table-filter-clear': string;
|
|
4
|
+
'table-filter-filter': string;
|
|
5
|
+
'table-filter-min': string;
|
|
6
|
+
'table-filter-max': string;
|
|
7
|
+
'table-pagination-previous': string;
|
|
8
|
+
'table-pagination-next': string;
|
|
9
|
+
'table-pagination-total': (current: string, total: string) => string;
|
|
10
|
+
'select-dropdown-render-select-all': string;
|
|
11
|
+
'select-dropdown-render-search': string;
|
|
12
|
+
'sort-button-text': string;
|
|
13
|
+
'sort-oldest-to-newest': string;
|
|
14
|
+
'sort-newest-to-oldest': string;
|
|
15
|
+
'sort-a-z': string;
|
|
16
|
+
'sort-z-a': string;
|
|
17
|
+
'sort-from-morning-to-night': string;
|
|
18
|
+
'sort-from-evening-to-morning': string;
|
|
19
|
+
'sort-0-9': string;
|
|
20
|
+
'sort-9-0': string;
|
|
21
|
+
'table-action-filter-button': string;
|
|
22
|
+
'table-action-filter-quick-filter': string;
|
|
23
|
+
'table-action-filter-quick-filter-tip': (count: number) => string;
|
|
24
|
+
'table-action-filter-other-filter': string;
|
|
25
|
+
'table-action-filter-other-filter-tip': () => string;
|
|
26
|
+
'table-action-group-by-title': string;
|
|
27
|
+
'table-action-group-by-title-tip': string;
|
|
28
|
+
'table-action-column-title': string;
|
|
29
|
+
'table-column-group-records': string;
|
|
30
|
+
'table-column-group-lock-tip': string;
|
|
31
|
+
'table-column-drag-sort-disabled-tip': string;
|
|
32
|
+
'table-action-filter-no-filter': string;
|
|
33
|
+
'table-action-range-picker-presets-today': string;
|
|
34
|
+
'table-action-range-picker-presets-yesterday': string;
|
|
35
|
+
'table-action-range-picker-presets-last-3-day': string;
|
|
36
|
+
'table-action-range-picker-presets-last-7-day': string;
|
|
37
|
+
'table-action-range-picker-presets-last-14-day': string;
|
|
38
|
+
'table-action-range-picker-presets-last-30-day': string;
|
|
39
|
+
'table-action-range-picker-presets-last-90-day': string;
|
|
40
|
+
'virtual-keyboard-time-now': string;
|
|
41
|
+
'virtual-keyboard-time-ok': string;
|
|
42
|
+
'batch-editor-batch-edit': string;
|
|
43
|
+
'batch-editor-actions': string;
|
|
44
|
+
'batch-editor-remove': string;
|
|
45
|
+
'batch-editor-price': string;
|
|
46
|
+
'batch-editor-cancel': string;
|
|
47
|
+
'batch-editor-search': string;
|
|
48
|
+
'batch-editor-confirm': string;
|
|
49
|
+
'batch-editor-batch-remove': string;
|
|
50
|
+
'batch-editor-what-price': string;
|
|
51
|
+
'batch-editor-quick-edit': string;
|
|
52
|
+
'batch-editor-quick-edit-title': (product: string, num: string) => string;
|
|
53
|
+
'batch-editor-quick-edit-title-2': (product: string) => string;
|
|
54
|
+
'table-action-export-import-export-success': string;
|
|
55
|
+
'table-action-export-import-button': string;
|
|
56
|
+
'table-action-export-import-export-range': string;
|
|
57
|
+
'table-action-export-import-current-page': string;
|
|
58
|
+
'table-action-export-import-all-records': string;
|
|
59
|
+
'table-action-export-import-selected-records': string;
|
|
60
|
+
'table-action-export-import-selected': string;
|
|
61
|
+
'table-action-export-import-item': (length: number) => string;
|
|
62
|
+
'table-action-export-import-product': string;
|
|
63
|
+
'table-action-export-import-table-text-input-title': string;
|
|
64
|
+
'table-action-export-import-table-text-input-describe': string;
|
|
65
|
+
'table-action-export-import-table-error-file': string;
|
|
66
|
+
'table-action-export-import-import-success': string;
|
|
67
|
+
'table-action-export-import-import-phone': string;
|
|
68
|
+
'table-action-export-import-table-success-download': string;
|
|
69
|
+
'table-action-export-import-table-textimport-product': string;
|
|
70
|
+
'table-action-export-import-table-text-product-template': string;
|
|
71
|
+
'table-action-export-import-table-text-click-download': string;
|
|
72
|
+
'table-action-export-import-table-text-edit-file': string;
|
|
73
|
+
'table-action-export-import-button-import': string;
|
|
74
|
+
'table-action-export-import-cancel': string;
|
|
75
|
+
'table-action-export-import-file-completed': string;
|
|
76
|
+
'table-action-export-import-file-processing': string;
|
|
77
|
+
'table-action-export-import-file-pending': string;
|
|
78
|
+
'table-action-export-import-file-refresh': string;
|
|
79
|
+
'table-action-export-import-export-title': string;
|
|
80
|
+
'table-action-export-import-file-hint': string;
|
|
81
|
+
'table-action-export-import-file-name': string;
|
|
82
|
+
'table-action-export-import-file-content': string;
|
|
83
|
+
'table-action-export-import-file-content-all': string;
|
|
84
|
+
'table-action-export-import-file-content-part': string;
|
|
85
|
+
'table-action-export-import-file-status': string;
|
|
86
|
+
'table-action-export-import-file-account': string;
|
|
87
|
+
'table-action-export-import-file-created': string;
|
|
88
|
+
'table-action-export-import-file-record': (length: number) => string;
|
|
89
|
+
'table-action-export-import-import-title': string;
|
|
90
|
+
'table-action-export-import-log-hint': string;
|
|
91
|
+
'table-action-export-import-log-name': string;
|
|
92
|
+
'table-action-export-import-log-result': string;
|
|
93
|
+
'table-action-export-import-log-ok': (num: number) => string;
|
|
94
|
+
'table-action-export-import-log-err': (num: number) => string;
|
|
95
|
+
'table-action-export-import-log-check': string;
|
|
96
|
+
'table-action-export-import-log-detail-title': string;
|
|
97
|
+
'table-action-export-import-log-err-log': string;
|
|
98
|
+
'table-action-export-import-log-copy': string;
|
|
99
|
+
'table-action-export-import-table-success-copy': string;
|
|
100
|
+
'drag-sort-tree-unavailable-today-tip': string;
|
|
101
|
+
'date-picker-today': string;
|
|
102
|
+
'date-picker-yesterday': string;
|
|
103
|
+
'date-picker-tomorrow': string;
|
|
104
|
+
'date-picker-next_monday': string;
|
|
105
|
+
'date-picker-last_friday': string;
|
|
106
|
+
'date-picker-first_day_of_this_month': string;
|
|
107
|
+
'date-picker-last_day_of_this_month': string;
|
|
108
|
+
'date-picker-first_day_of_next_month': string;
|
|
109
|
+
'date-picker-last_day_of_last_month': string;
|
|
110
|
+
'date-picker-invalid-date': string;
|
|
111
|
+
'date-picker-apply': string;
|
|
112
|
+
'date-picker-shortcut-custom': string;
|
|
113
|
+
'pisell-input-copy-success': string;
|
|
114
|
+
'pisell-input-copy': string;
|
|
115
|
+
'pisell-empty-description-no-data': string;
|
|
116
|
+
'pisell-information-entry-input-search': string;
|
|
117
|
+
'pisell-information-entry-input-confirm': string;
|
|
118
|
+
'pisell-information-entry-scan-exit': string;
|
|
119
|
+
'pisell-wallet-pass-card-detail': string;
|
|
120
|
+
'pisell-wallet-pass-card-edit': string;
|
|
121
|
+
'pisell-wallet-pass-card-name': string;
|
|
122
|
+
'pisell-wallet-pass-card-store-name': string;
|
|
123
|
+
'pisell-wallet-pass-card-balance': string;
|
|
124
|
+
'pisell-wallet-pass-card-redeem': string;
|
|
125
|
+
'pisell-wallet-pass-card-code': string;
|
|
126
|
+
'pisell-wallet-pass-card-valid-to': string;
|
|
127
|
+
'pisell-wallet-pass-card-confirm': string;
|
|
128
|
+
'pisell-wallet-pass-card-cancel': string;
|
|
129
|
+
'pisell-wallet-pass-card-required': string;
|
|
130
|
+
'pisell-wallet-pass-card-expireDate': string;
|
|
131
|
+
'pisell-adjust-price-price-override': string;
|
|
132
|
+
'pisell-adjust-price-discount': string;
|
|
133
|
+
'pisell-adjust-price-discount-amount': string;
|
|
134
|
+
'pisell-adjust-price-discount-percentage': string;
|
|
135
|
+
'pisell-adjust-price-total-after-discount': string;
|
|
136
|
+
'pisell-adjust-price-discount-can-be-maximum': string;
|
|
137
|
+
'pisell-discount-card-title': string;
|
|
138
|
+
'pisell-discount-card-unit': string;
|
|
139
|
+
'pisell-discount-card-fixed-amount-prefix': string;
|
|
140
|
+
'pisell-data-source-table-add': string;
|
|
141
|
+
'pisell-data-source-table-edit': string;
|
|
142
|
+
'pisell-data-source-table-detail': string;
|
|
143
|
+
'pisell-data-source-table-delete': string;
|
|
144
|
+
'pisell-record-view-available': string;
|
|
145
|
+
'pisell-record-view-unavailable': string;
|
|
146
|
+
'pisell-data-source-form-required-message': string;
|
|
147
|
+
'pisell-data-source-form-email-message': string;
|
|
148
|
+
'pisell-data-source-form-domain-message': string;
|
|
149
|
+
'pisell-data-source-form-url-message': string;
|
|
150
|
+
'pisell-data-source-form-phone-message': string;
|
|
151
|
+
'pisell-data-source-form-min-length-message': (minLength: number) => string;
|
|
152
|
+
'pisell-data-source-form-max-length-message': (maxLength: number) => string;
|
|
153
|
+
'pisell-data-source-form-min-value-message': (minValue: number) => string;
|
|
154
|
+
'pisell-data-source-form-max-value-message': (maxValue: number) => string;
|
|
155
|
+
'pisell-data-source-form-mobile-message': string;
|
|
156
|
+
'pisell-number-format-thousand': string;
|
|
157
|
+
'pisell-number-format-million': string;
|
|
158
|
+
'pisell-number-format-billion': string;
|
|
159
|
+
'walletCard-done': string;
|
|
160
|
+
'walletCard-qrcode': string;
|
|
161
|
+
'walletCard-barcode': string;
|
|
162
|
+
'walletCard-viewPin': string;
|
|
163
|
+
'pisell-upload-button': string;
|
|
164
|
+
'pisell-upload-setting-size-error': (maxSize: number) => string;
|
|
165
|
+
'pisell-upload-setting-type-error': (type: string) => string;
|
|
166
|
+
'pisell-upload-count-error': (count: number) => string;
|
|
167
|
+
'pisell-upload-error': (name: string) => string;
|
|
168
|
+
'pisell-upload-multilingual-title': string;
|
|
169
|
+
'pisell-upload-multilingual-item-title-original': string;
|
|
170
|
+
'pisell-upload-multilingual-item-title-en': string;
|
|
171
|
+
'pisell-upload-multilingual-item-title-zh-CN': string;
|
|
172
|
+
'pisell-upload-multilingual-item-title-zh-HK': string;
|
|
173
|
+
'pisell-color-picker-default': string;
|
|
174
|
+
'pisell-action-get-data': string;
|
|
175
|
+
'pisell-action-delete-success': string;
|
|
176
|
+
'pisell-action-delete-failed': string;
|
|
177
|
+
'walletCard-piont': string;
|
|
178
|
+
'walletCard-rechargeable': string;
|
|
179
|
+
'walletCard-voucher': string;
|
|
180
|
+
'walletCard-discount': string;
|
|
181
|
+
'pisellQrcode-done': string;
|
|
182
|
+
'pisellQrcode-qrcode': string;
|
|
183
|
+
'pisell-delete-confirm-title': string;
|
|
184
|
+
'pisell-delete-confirm-content': string;
|
|
185
|
+
'pisell-delete-confirm-ok': string;
|
|
186
|
+
'pisell-delete-confirm-cancel': string;
|
|
187
|
+
'pisell-design-mode-action-disabled': string;
|
|
188
|
+
'pisell-translation-original': string;
|
|
189
|
+
'pisell-version-modal-title': string;
|
|
190
|
+
'pisell-version-modal-current-version': string;
|
|
191
|
+
'pisell-version-modal-version': string;
|
|
192
|
+
'pisell-version-modal-update-notes': string;
|
|
193
|
+
'pisell-version-modal-patch': string;
|
|
194
|
+
'pisell-version-modal-minor': string;
|
|
195
|
+
'pisell-version-modal-major': string;
|
|
196
|
+
'pisell-version-modal-custom': string;
|
|
197
|
+
'pisell-version-modal-cancel': string;
|
|
198
|
+
'pisell-version-modal-confirm': string;
|
|
199
|
+
'pisell-version-modal-describe-update-notes': string;
|
|
200
|
+
'pisell-version-modal-version-error': string;
|
|
201
|
+
'pisell-version-modal-version-required': string;
|
|
202
|
+
'pisell-version-modal-based-on-version': string;
|
|
203
|
+
'subdomain-error-too-short': string;
|
|
204
|
+
'subdomain-error-too-long': string;
|
|
205
|
+
'subdomain-error-pattern': string;
|
|
206
|
+
'subdomain-error-numbers-only': string;
|
|
207
|
+
'subdomain-error-hyphen-ends': string;
|
|
208
|
+
'subdomain-error-consecutive-hyphens': string;
|
|
209
|
+
'pisell-icon-select-placeholder': string;
|
|
210
|
+
'pisell-icon-select-outlined': string;
|
|
211
|
+
'pisell-icon-select-filled': string;
|
|
212
|
+
'pisell-icon-select-two-tone': string;
|
|
213
|
+
'pisell-icon-select-iconfont': string;
|
|
214
|
+
'pisell-icon-select-search': string;
|
|
215
|
+
'pisell-icon-select-select': string;
|
|
216
|
+
'pisell-lowcode-app-version-control-live': string;
|
|
217
|
+
'pisell-lowcode-app-version-control-draft': string;
|
|
218
|
+
'pisell-lowcode-app-version-control-deprecated': string;
|
|
219
|
+
'pisell-lowcode-app-version-control-new-version': string;
|
|
220
|
+
'pisell-lowcode-app-version-control-promote-to-live': string;
|
|
221
|
+
'pisell-lowcode-app-version-control-promote-version': (version: string) => string;
|
|
222
|
+
'pisell-lowcode-app-version-control-promote-version-describe': string;
|
|
223
|
+
'pisell-lowcode-app-version-control-promote-version-ok': string;
|
|
224
|
+
'pisell-lowcode-app-version-control-promote-version-cancel': string;
|
|
225
|
+
'pisell-lowcode-app-version-control-version-exists': string;
|
|
226
|
+
'pisell-lowcode-drop-sort-add': string;
|
|
227
|
+
'pisell-lowcode-navigation-menu-add-sub-menu': string;
|
|
228
|
+
'pisell-lowcode-navigation-menu-add-page': string;
|
|
229
|
+
'pisell-lowcode-navigation-menu-add-page-tip': string;
|
|
230
|
+
'pisell-lowcode-navigation-menu-tag-base': string;
|
|
231
|
+
'pisell-lowcode-navigation-menu-tag-proCode': string;
|
|
232
|
+
'pisell-lowcode-navigation-menu-tag-pisell1': string;
|
|
233
|
+
'pisell-lowcode-navigation-menu-tag-group': string;
|
|
234
|
+
'pisell-lowcode-navigation-menu-tag-sub-menu': string;
|
|
235
|
+
'pisell-lowcode-navigation-menu-tag-custom': string;
|
|
236
|
+
'pisell-data-source-form-app-identifier-pattern': string;
|
|
237
|
+
'pisell-data-source-form-app-identifier-start-with-letter': string;
|
|
238
|
+
'pisell-data-source-form-app-identifier-special-ends': string;
|
|
239
|
+
'pisell-data-source-form-app-identifier-consecutive-special': string;
|
|
240
|
+
'qrscanner-loading': string;
|
|
241
|
+
'qrscanner-success': string;
|
|
242
|
+
'qrscanner-success-qrcode': string;
|
|
243
|
+
'qrscanner-success-barcode': string;
|
|
244
|
+
'qrscanner-error-upload-image': string;
|
|
245
|
+
'qrscanner-error-load-failed': string;
|
|
246
|
+
'qrscanner-error-no-code': string;
|
|
247
|
+
'qrscanner-error-camera-init': string;
|
|
248
|
+
'qrscanner-error-process-image': string;
|
|
249
|
+
'pisell-login-and-register-title': string;
|
|
250
|
+
'pisell-login-and-register-subtitle': string;
|
|
251
|
+
'pisell-login-and-register-email-label': string;
|
|
252
|
+
'pisell-login-and-register-email-placeholder': string;
|
|
253
|
+
'pisell-login-and-register-password-label': string;
|
|
254
|
+
'pisell-login-and-register-password-placeholder': string;
|
|
255
|
+
'pisell-login-and-register-email-error': string;
|
|
256
|
+
'pisell-login-and-register-email-error-valid': string;
|
|
257
|
+
'pisell-login-and-register-password-error': string;
|
|
258
|
+
'pisell-login-and-register-login': string;
|
|
259
|
+
'pisell-login-and-register-google': string;
|
|
260
|
+
'pisell-login-and-register-facebook': string;
|
|
261
|
+
'pisell-login-and-register-apple': string;
|
|
262
|
+
'pisell-login-and-register-sign-up': string;
|
|
263
|
+
'pisell-login-and-register-login-tab': string;
|
|
264
|
+
'pisell-login-and-register-register-tab': string;
|
|
265
|
+
'pisell-login-and-register-register-email-placeholder': string;
|
|
266
|
+
'pisell-login-and-register-register-password-placeholder': string;
|
|
267
|
+
'pisell-login-and-register-register-button-text': string;
|
|
268
|
+
'pisell-login-and-register-remember-me': string;
|
|
269
|
+
'pisell-login-and-register-forgot-password': string;
|
|
270
|
+
'pisell2.text.goodpass.product-vouchers': string;
|
|
271
|
+
'pisell2.text.goodpass.last-settlement': string;
|
|
272
|
+
'pisell2.text.goodpass.view-more': string;
|
|
273
|
+
'pisell2.text.goodpass.save': string;
|
|
274
|
+
'pisell-wallet-pass-card-status-used': string;
|
|
275
|
+
'pisell-wallet-pass-card-status-expired': string;
|
|
276
|
+
'pisell-wallet-pass-card-status-disabled': string;
|
|
277
|
+
'pisell-wallet-pass-card-status-conflict': string;
|
|
278
|
+
'pisell-wallet-pass-card-status-lastPayment': string;
|
|
279
|
+
'pisell-wallet-pass-card-reset': string;
|
|
280
|
+
'pisell-wallet-pass-card-done': string;
|
|
281
|
+
'pisell-camera-no-camera-accessible': string;
|
|
282
|
+
'pisell-camera-permission-denied': string;
|
|
283
|
+
'pisell-camera-switch-camera': string;
|
|
284
|
+
'pisell-camera-canvas': string;
|
|
285
|
+
'pisell-camera-checking': string;
|
|
286
|
+
'pisell-camera-no-camera-desc': string;
|
|
287
|
+
'pisell-upload-camera-local-files': string;
|
|
288
|
+
'pisell-upload-camera-capture': string;
|
|
289
|
+
'pisell-upload-camera-retake': string;
|
|
290
|
+
'pisell-upload-camera-use': string;
|
|
291
|
+
'pisell-list-tab-group-default': string;
|
|
292
|
+
'pisell-list-empty-text-default': string;
|
|
293
|
+
'pisell-list-load-more': string;
|
|
294
|
+
'pisell-list-view-less': string;
|
|
295
|
+
'pisell-list-pagination-total': (start: number, end: number, total: number) => string;
|
|
296
|
+
'pisell-list-scroll-down': string;
|
|
297
|
+
'pisell-list-scroll-right': string;
|
|
298
|
+
'pisell-list-pagination-page-of': (current: number, total: number) => string;
|
|
299
|
+
'pisell-list-pagination-previous': string;
|
|
300
|
+
'pisell-list-pagination-next': string;
|
|
301
|
+
};
|
|
302
|
+
export default _default;
|
package/es/locales/zh-TW.js
CHANGED
|
@@ -338,6 +338,34 @@ export default {
|
|
|
338
338
|
'pisell-wallet-pass-card-status-expired': '已過期',
|
|
339
339
|
'pisell-wallet-pass-card-status-disabled': '已禁用',
|
|
340
340
|
'pisell-wallet-pass-card-status-conflict': '衝突',
|
|
341
|
+
'pisell-wallet-pass-card-status-lastPayment': '上次結算',
|
|
341
342
|
'pisell-wallet-pass-card-reset': '清空',
|
|
342
|
-
'pisell-wallet-pass-card-done': '保存'
|
|
343
|
+
'pisell-wallet-pass-card-done': '保存',
|
|
344
|
+
// 相机组件
|
|
345
|
+
'pisell-camera-no-camera-accessible': '沒有找到攝像頭',
|
|
346
|
+
'pisell-camera-permission-denied': '沒有權限使用攝像頭',
|
|
347
|
+
'pisell-camera-switch-camera': '切換攝像頭',
|
|
348
|
+
'pisell-camera-canvas': 'canvas不支持',
|
|
349
|
+
'pisell-camera-checking': '正在檢測攝像頭...',
|
|
350
|
+
'pisell-camera-no-camera-desc': '請檢查設備是否連接攝像頭或授權瀏覽器訪問攝像頭',
|
|
351
|
+
// 拍照组件
|
|
352
|
+
'pisell-upload-camera-local-files': '本地文件',
|
|
353
|
+
'pisell-upload-camera-capture': '拍攝/拍照',
|
|
354
|
+
'pisell-upload-camera-retake': '重拍',
|
|
355
|
+
'pisell-upload-camera-use': '使用照片',
|
|
356
|
+
// 列表組件
|
|
357
|
+
'pisell-list-tab-group-default': '字段',
|
|
358
|
+
'pisell-list-empty-text-default': '暫無數據',
|
|
359
|
+
'pisell-list-load-more': '查看更多',
|
|
360
|
+
'pisell-list-view-less': '查看更少',
|
|
361
|
+
'pisell-list-pagination-total': function pisellListPaginationTotal(start, end, total) {
|
|
362
|
+
return "\u986F\u793A\u7B2C ".concat(start, "-").concat(end, " \u689D\uFF0C\u5171 ").concat(total, " \u689D");
|
|
363
|
+
},
|
|
364
|
+
'pisell-list-scroll-down': '向下滾動',
|
|
365
|
+
'pisell-list-scroll-right': '向右滾動',
|
|
366
|
+
'pisell-list-pagination-page-of': function pisellListPaginationPageOf(current, total) {
|
|
367
|
+
return "\u7B2C ".concat(current, " \u9801 \u5171 ").concat(total, " \u9801");
|
|
368
|
+
},
|
|
369
|
+
'pisell-list-pagination-previous': '上一頁',
|
|
370
|
+
'pisell-list-pagination-next': '下一頁'
|
|
343
371
|
};
|
package/es/utils/platform.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isMobile: () =>
|
|
1
|
+
export declare const isMobile: () => boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare type Options = {
|
|
2
|
+
mode?: 'oneline' | 'multiline' | 'box' | 'boxoneline' | undefined;
|
|
3
|
+
minFontSizePx?: number | undefined;
|
|
4
|
+
maxFontSizePx?: number | undefined;
|
|
5
|
+
fontSizePrecisionPx?: number | undefined;
|
|
6
|
+
scrollToEnd?: boolean | undefined;
|
|
7
|
+
};
|
|
8
|
+
export declare function updateTextSize({ innerEl, containerEl, mode, minFontSizePx, maxFontSizePx, fontSizePrecisionPx, scrollToEnd, }: Options & {
|
|
9
|
+
innerEl: HTMLElement;
|
|
10
|
+
containerEl: HTMLElement;
|
|
11
|
+
}): void;
|
|
12
|
+
declare type DisconnectableFunction = {
|
|
13
|
+
(): void;
|
|
14
|
+
disconnect: () => void;
|
|
15
|
+
};
|
|
16
|
+
export declare function autoTextSize({ innerEl, containerEl, mode, minFontSizePx, maxFontSizePx, fontSizePrecisionPx, scrollToEnd, }: Options & {
|
|
17
|
+
innerEl: HTMLElement;
|
|
18
|
+
containerEl: HTMLElement;
|
|
19
|
+
}): DisconnectableFunction;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/auto-resize-text/auto-text-size-standalone.ts
|
|
20
|
+
var auto_text_size_standalone_exports = {};
|
|
21
|
+
__export(auto_text_size_standalone_exports, {
|
|
22
|
+
autoTextSize: () => autoTextSize,
|
|
23
|
+
updateTextSize: () => updateTextSize
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(auto_text_size_standalone_exports);
|
|
26
|
+
function throttleAnimationFrame(func) {
|
|
27
|
+
let wait = false;
|
|
28
|
+
return () => {
|
|
29
|
+
if (!wait) {
|
|
30
|
+
wait = true;
|
|
31
|
+
requestAnimationFrame(() => {
|
|
32
|
+
func();
|
|
33
|
+
wait = false;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
var antiOverflowAlgo = ({
|
|
39
|
+
fontSizePx,
|
|
40
|
+
minFontSizePx,
|
|
41
|
+
fontSizePrecisionPx,
|
|
42
|
+
updateFontSizePx,
|
|
43
|
+
breakPredicate: breakPred
|
|
44
|
+
}) => {
|
|
45
|
+
const maxIterCount = Math.ceil(1 / fontSizePrecisionPx);
|
|
46
|
+
let iterCount = 0;
|
|
47
|
+
while (fontSizePx > minFontSizePx && iterCount < maxIterCount) {
|
|
48
|
+
if (breakPred()) break;
|
|
49
|
+
fontSizePx = updateFontSizePx(fontSizePx - fontSizePrecisionPx);
|
|
50
|
+
iterCount++;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
var getContentWidth = (element) => {
|
|
54
|
+
const computedStyle = getComputedStyle(element);
|
|
55
|
+
return element.clientWidth - parseFloat(computedStyle.paddingLeft) - parseFloat(computedStyle.paddingRight);
|
|
56
|
+
};
|
|
57
|
+
var getContentHeight = (element) => {
|
|
58
|
+
const computedStyle = getComputedStyle(element);
|
|
59
|
+
return element.clientHeight - parseFloat(computedStyle.paddingTop) - parseFloat(computedStyle.paddingBottom);
|
|
60
|
+
};
|
|
61
|
+
var multilineAlgo = (opts) => {
|
|
62
|
+
opts.innerEl.style.whiteSpace = "nowrap";
|
|
63
|
+
onelineAlgo(opts);
|
|
64
|
+
if (opts.innerEl.scrollWidth > getContentWidth(opts.containerEl)) {
|
|
65
|
+
opts.innerEl.style.whiteSpace = "normal";
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
var onelineAlgo = ({
|
|
69
|
+
innerEl,
|
|
70
|
+
containerEl,
|
|
71
|
+
fontSizePx,
|
|
72
|
+
minFontSizePx,
|
|
73
|
+
maxFontSizePx,
|
|
74
|
+
fontSizePrecisionPx,
|
|
75
|
+
updateFontSizePx
|
|
76
|
+
}) => {
|
|
77
|
+
const maxIterCount = 10;
|
|
78
|
+
let iterCount = 0;
|
|
79
|
+
let prevOverflowFactor = 1;
|
|
80
|
+
while (iterCount < maxIterCount) {
|
|
81
|
+
const w0 = innerEl.scrollWidth;
|
|
82
|
+
const w1 = getContentWidth(containerEl);
|
|
83
|
+
const canGrow = fontSizePx < maxFontSizePx && w0 < w1;
|
|
84
|
+
const canShrink = fontSizePx > minFontSizePx && w0 > w1;
|
|
85
|
+
const overflowFactor = w0 / w1;
|
|
86
|
+
if (prevOverflowFactor === overflowFactor) {
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
if (!(canGrow || canShrink)) {
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
const updatePx = fontSizePx / overflowFactor - fontSizePx;
|
|
93
|
+
const prevFontSizePx = fontSizePx;
|
|
94
|
+
fontSizePx = updateFontSizePx(fontSizePx + updatePx);
|
|
95
|
+
if (Math.abs(fontSizePx - prevFontSizePx) <= fontSizePrecisionPx) {
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
prevOverflowFactor = overflowFactor;
|
|
99
|
+
iterCount++;
|
|
100
|
+
}
|
|
101
|
+
antiOverflowAlgo({
|
|
102
|
+
fontSizePx,
|
|
103
|
+
minFontSizePx,
|
|
104
|
+
updateFontSizePx,
|
|
105
|
+
fontSizePrecisionPx,
|
|
106
|
+
breakPredicate: () => innerEl.scrollWidth <= getContentWidth(containerEl)
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
var boxAlgo = ({
|
|
110
|
+
innerEl,
|
|
111
|
+
containerEl,
|
|
112
|
+
fontSizePx,
|
|
113
|
+
minFontSizePx,
|
|
114
|
+
maxFontSizePx,
|
|
115
|
+
fontSizePrecisionPx,
|
|
116
|
+
updateFontSizePx
|
|
117
|
+
}) => {
|
|
118
|
+
const maxIterCount = 100;
|
|
119
|
+
fontSizePx = updateFontSizePx((maxFontSizePx - minFontSizePx) * 0.5);
|
|
120
|
+
let updatePx = (maxFontSizePx - minFontSizePx) * 0.25;
|
|
121
|
+
let iterCount = 0;
|
|
122
|
+
while (updatePx > fontSizePrecisionPx && iterCount < maxIterCount) {
|
|
123
|
+
const w0 = innerEl.scrollWidth;
|
|
124
|
+
const w1 = getContentWidth(containerEl);
|
|
125
|
+
const h0 = innerEl.scrollHeight;
|
|
126
|
+
const h1 = getContentHeight(containerEl);
|
|
127
|
+
if (w0 === w1 && h0 === h1) break;
|
|
128
|
+
if (fontSizePx < maxFontSizePx && w0 <= w1 && h0 <= h1) {
|
|
129
|
+
fontSizePx = updateFontSizePx(fontSizePx + updatePx);
|
|
130
|
+
} else if (fontSizePx > minFontSizePx && (w0 > w1 || h0 > h1)) {
|
|
131
|
+
fontSizePx = updateFontSizePx(fontSizePx - updatePx);
|
|
132
|
+
}
|
|
133
|
+
updatePx *= 0.5;
|
|
134
|
+
iterCount++;
|
|
135
|
+
}
|
|
136
|
+
antiOverflowAlgo({
|
|
137
|
+
fontSizePx,
|
|
138
|
+
minFontSizePx,
|
|
139
|
+
updateFontSizePx,
|
|
140
|
+
fontSizePrecisionPx,
|
|
141
|
+
breakPredicate: () => innerEl.scrollWidth <= getContentWidth(containerEl) && innerEl.scrollHeight <= getContentHeight(containerEl)
|
|
142
|
+
});
|
|
143
|
+
};
|
|
144
|
+
function updateTextSize({
|
|
145
|
+
innerEl,
|
|
146
|
+
containerEl,
|
|
147
|
+
mode = "multiline",
|
|
148
|
+
minFontSizePx = 8,
|
|
149
|
+
maxFontSizePx = 160,
|
|
150
|
+
fontSizePrecisionPx = 0.1,
|
|
151
|
+
scrollToEnd = false
|
|
152
|
+
}) {
|
|
153
|
+
const t0 = performance.now();
|
|
154
|
+
if (!isFinite(minFontSizePx)) {
|
|
155
|
+
throw new Error(`Invalid minFontSizePx (${minFontSizePx})`);
|
|
156
|
+
}
|
|
157
|
+
if (!isFinite(minFontSizePx)) {
|
|
158
|
+
throw new Error(`Invalid maxFontSizePx (${maxFontSizePx})`);
|
|
159
|
+
}
|
|
160
|
+
if (!isFinite(fontSizePrecisionPx) || fontSizePrecisionPx === 0) {
|
|
161
|
+
throw new Error(`Invalid fontSizePrecisionPx (${fontSizePrecisionPx})`);
|
|
162
|
+
}
|
|
163
|
+
if (containerEl.children.length > 1) {
|
|
164
|
+
console.warn(
|
|
165
|
+
`AutoTextSize has ${containerEl.children.length - 1} siblings. This may interfere with the algorithm.`
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
const containerStyles = {
|
|
169
|
+
display: "flex",
|
|
170
|
+
alignItems: "start"
|
|
171
|
+
};
|
|
172
|
+
const innerStyles = {
|
|
173
|
+
display: "block"
|
|
174
|
+
};
|
|
175
|
+
if (mode === "oneline") {
|
|
176
|
+
innerStyles.whiteSpace = "nowrap";
|
|
177
|
+
} else if (mode === "multiline") {
|
|
178
|
+
innerStyles.wordBreak = "break-word";
|
|
179
|
+
} else if (mode === "box") {
|
|
180
|
+
innerStyles.whiteSpace = "pre-wrap";
|
|
181
|
+
innerStyles.wordBreak = "break-word";
|
|
182
|
+
} else if (mode === "boxoneline") {
|
|
183
|
+
innerStyles.whiteSpace = "nowrap";
|
|
184
|
+
}
|
|
185
|
+
Object.assign(containerEl.style, containerStyles);
|
|
186
|
+
Object.assign(innerEl.style, innerStyles);
|
|
187
|
+
const fontSizeStr = window.getComputedStyle(innerEl, null).getPropertyValue("font-size");
|
|
188
|
+
let fontSizePx = parseFloat(fontSizeStr);
|
|
189
|
+
let iterations = 0;
|
|
190
|
+
const updateFontSizePx = (px) => {
|
|
191
|
+
px = Math.min(Math.max(px, minFontSizePx), maxFontSizePx);
|
|
192
|
+
fontSizePx = px;
|
|
193
|
+
innerEl.style.fontSize = `${fontSizePx}px`;
|
|
194
|
+
iterations++;
|
|
195
|
+
return fontSizePx;
|
|
196
|
+
};
|
|
197
|
+
if (fontSizePx > maxFontSizePx || fontSizePx < minFontSizePx) {
|
|
198
|
+
updateFontSizePx(fontSizePx);
|
|
199
|
+
}
|
|
200
|
+
const algoOpts = {
|
|
201
|
+
innerEl,
|
|
202
|
+
containerEl,
|
|
203
|
+
fontSizePx,
|
|
204
|
+
minFontSizePx,
|
|
205
|
+
maxFontSizePx,
|
|
206
|
+
fontSizePrecisionPx,
|
|
207
|
+
updateFontSizePx
|
|
208
|
+
};
|
|
209
|
+
if (mode === "oneline") {
|
|
210
|
+
onelineAlgo(algoOpts);
|
|
211
|
+
} else if (mode === "multiline") {
|
|
212
|
+
multilineAlgo(algoOpts);
|
|
213
|
+
} else if (mode === "box") {
|
|
214
|
+
boxAlgo(algoOpts);
|
|
215
|
+
} else if (mode === "boxoneline") {
|
|
216
|
+
boxAlgo(algoOpts);
|
|
217
|
+
}
|
|
218
|
+
if (scrollToEnd) {
|
|
219
|
+
requestAnimationFrame(() => {
|
|
220
|
+
if (mode === "oneline" || mode === "boxoneline") {
|
|
221
|
+
const maxScrollLeft = Math.max(0, innerEl.scrollWidth - innerEl.clientWidth);
|
|
222
|
+
innerEl.scrollLeft = maxScrollLeft;
|
|
223
|
+
} else {
|
|
224
|
+
const maxScrollTop = Math.max(0, innerEl.scrollHeight - innerEl.clientHeight);
|
|
225
|
+
innerEl.scrollTop = maxScrollTop;
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
function autoTextSize({
|
|
231
|
+
innerEl,
|
|
232
|
+
containerEl,
|
|
233
|
+
mode,
|
|
234
|
+
minFontSizePx,
|
|
235
|
+
maxFontSizePx,
|
|
236
|
+
fontSizePrecisionPx,
|
|
237
|
+
scrollToEnd
|
|
238
|
+
}) {
|
|
239
|
+
let containerDimensions = void 0;
|
|
240
|
+
const throttledUpdateTextSize = throttleAnimationFrame(() => {
|
|
241
|
+
updateTextSize({
|
|
242
|
+
innerEl,
|
|
243
|
+
containerEl,
|
|
244
|
+
mode,
|
|
245
|
+
maxFontSizePx,
|
|
246
|
+
minFontSizePx,
|
|
247
|
+
fontSizePrecisionPx,
|
|
248
|
+
scrollToEnd
|
|
249
|
+
});
|
|
250
|
+
containerDimensions = [
|
|
251
|
+
getContentWidth(containerEl),
|
|
252
|
+
getContentHeight(containerEl)
|
|
253
|
+
];
|
|
254
|
+
});
|
|
255
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
256
|
+
const prevContainerDimensions = containerDimensions;
|
|
257
|
+
containerDimensions = [
|
|
258
|
+
getContentWidth(containerEl),
|
|
259
|
+
getContentHeight(containerEl)
|
|
260
|
+
];
|
|
261
|
+
if ((prevContainerDimensions == null ? void 0 : prevContainerDimensions[0]) !== containerDimensions[0] || (prevContainerDimensions == null ? void 0 : prevContainerDimensions[1]) !== containerDimensions[1]) {
|
|
262
|
+
throttledUpdateTextSize();
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
resizeObserver.observe(containerEl);
|
|
266
|
+
throttledUpdateTextSize.disconnect = () => resizeObserver.disconnect();
|
|
267
|
+
return throttledUpdateTextSize;
|
|
268
|
+
}
|
|
269
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
270
|
+
0 && (module.exports = {
|
|
271
|
+
autoTextSize,
|
|
272
|
+
updateTextSize
|
|
273
|
+
});
|