ngx-tethys 19.0.4 → 19.0.6
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/CHANGELOG.md +21 -0
- package/anchor/anchor-link.component.d.ts +2 -1
- package/anchor/anchor.component.d.ts +2 -1
- package/anchor/anchor.token.d.ts +9 -0
- package/calendar/calendar-header.component.d.ts +3 -2
- package/carousel/carousel.component.d.ts +2 -1
- package/carousel/carousel.token.d.ts +7 -0
- package/carousel/engine/carousel-base.d.ts +3 -3
- package/carousel/engine/carousel-fade.d.ts +2 -2
- package/carousel/engine/carousel-noop.d.ts +2 -2
- package/carousel/engine/carousel-slide.d.ts +2 -2
- package/collapse/collapse-item.component.d.ts +2 -1
- package/collapse/collapse.component.d.ts +5 -5
- package/collapse/collapse.token.d.ts +15 -0
- package/color-picker/color-picker.component.d.ts +15 -3
- package/core/theme/enum.d.ts +5 -0
- package/core/theme/index.d.ts +1 -0
- package/core/theme/store.d.ts +1 -1
- package/core/theme/theme.d.ts +0 -5
- package/date-picker/abstract-picker.component.d.ts +6 -1
- package/date-picker/base-picker.component.d.ts +1 -1
- package/date-picker/lib/calendar/calendar-footer.component.d.ts +2 -1
- package/date-picker/lib/calendar/calendar-table.component.d.ts +4 -3
- package/date-picker/lib/popups/date-popup.component.d.ts +2 -1
- package/date-picker/lib/popups/inner-popup.component.d.ts +2 -1
- package/date-picker/picker.component.d.ts +2 -1
- package/date-picker/picker.util.d.ts +5 -5
- package/date-picker/standard-types.d.ts +7 -2
- package/drag-drop/drag-drop.service.d.ts +2 -2
- package/drag-drop/{drop-container.class.d.ts → drag-drop.token.d.ts} +12 -7
- package/drag-drop/drag-handle.directive.d.ts +2 -1
- package/drag-drop/drag-ref.d.ts +3 -5
- package/drag-drop/drag.directive.d.ts +3 -3
- package/drag-drop/drop-container.directive.d.ts +1 -1
- package/drag-drop/index.d.ts +1 -1
- package/fesm2022/ngx-tethys-action.mjs +11 -12
- package/fesm2022/ngx-tethys-action.mjs.map +1 -1
- package/fesm2022/ngx-tethys-affix.mjs +8 -9
- package/fesm2022/ngx-tethys-affix.mjs.map +1 -1
- package/fesm2022/ngx-tethys-alert.mjs +11 -12
- package/fesm2022/ngx-tethys-alert.mjs.map +1 -1
- package/fesm2022/ngx-tethys-anchor.mjs +26 -13
- package/fesm2022/ngx-tethys-anchor.mjs.map +1 -1
- package/fesm2022/ngx-tethys-arrow-switcher.mjs +7 -7
- package/fesm2022/ngx-tethys-autocomplete.mjs +17 -18
- package/fesm2022/ngx-tethys-autocomplete.mjs.map +1 -1
- package/fesm2022/ngx-tethys-avatar.mjs +25 -28
- package/fesm2022/ngx-tethys-avatar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-back-top.mjs +7 -7
- package/fesm2022/ngx-tethys-badge.mjs +7 -7
- package/fesm2022/ngx-tethys-breadcrumb.mjs +10 -10
- package/fesm2022/ngx-tethys-button.mjs +14 -15
- package/fesm2022/ngx-tethys-button.mjs.map +1 -1
- package/fesm2022/ngx-tethys-calendar.mjs +18 -20
- package/fesm2022/ngx-tethys-calendar.mjs.map +1 -1
- package/fesm2022/ngx-tethys-card.mjs +15 -17
- package/fesm2022/ngx-tethys-card.mjs.map +1 -1
- package/fesm2022/ngx-tethys-carousel.mjs +28 -17
- package/fesm2022/ngx-tethys-carousel.mjs.map +1 -1
- package/fesm2022/ngx-tethys-cascader.mjs +16 -16
- package/fesm2022/ngx-tethys-checkbox.mjs +7 -7
- package/fesm2022/ngx-tethys-collapse.mjs +97 -85
- package/fesm2022/ngx-tethys-collapse.mjs.map +1 -1
- package/fesm2022/ngx-tethys-color-picker.mjs +34 -36
- package/fesm2022/ngx-tethys-color-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-comment.mjs +15 -17
- package/fesm2022/ngx-tethys-comment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-copy.mjs +8 -9
- package/fesm2022/ngx-tethys-copy.mjs.map +1 -1
- package/fesm2022/ngx-tethys-core.mjs +21 -22
- package/fesm2022/ngx-tethys-core.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-picker.mjs +232 -248
- package/fesm2022/ngx-tethys-date-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-date-range.mjs +10 -10
- package/fesm2022/ngx-tethys-dialog.mjs +22 -23
- package/fesm2022/ngx-tethys-dialog.mjs.map +1 -1
- package/fesm2022/ngx-tethys-divider.mjs +7 -7
- package/fesm2022/ngx-tethys-dot.mjs +8 -9
- package/fesm2022/ngx-tethys-dot.mjs.map +1 -1
- package/fesm2022/ngx-tethys-drag-drop.mjs +23 -30
- package/fesm2022/ngx-tethys-drag-drop.mjs.map +1 -1
- package/fesm2022/ngx-tethys-dropdown.mjs +58 -70
- package/fesm2022/ngx-tethys-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-tethys-empty.mjs +10 -10
- package/fesm2022/ngx-tethys-flexible-text.mjs +8 -8
- package/fesm2022/ngx-tethys-flexible-text.mjs.map +1 -1
- package/fesm2022/ngx-tethys-form.mjs +47 -54
- package/fesm2022/ngx-tethys-form.mjs.map +1 -1
- package/fesm2022/ngx-tethys-fullscreen.mjs +15 -16
- package/fesm2022/ngx-tethys-fullscreen.mjs.map +1 -1
- package/fesm2022/ngx-tethys-grid.mjs +46 -51
- package/fesm2022/ngx-tethys-grid.mjs.map +1 -1
- package/fesm2022/ngx-tethys-guider.mjs +55 -61
- package/fesm2022/ngx-tethys-guider.mjs.map +1 -1
- package/fesm2022/ngx-tethys-i18n.mjs +51 -54
- package/fesm2022/ngx-tethys-i18n.mjs.map +1 -1
- package/fesm2022/ngx-tethys-icon.mjs +11 -12
- package/fesm2022/ngx-tethys-icon.mjs.map +1 -1
- package/fesm2022/ngx-tethys-image.mjs +32 -21
- package/fesm2022/ngx-tethys-image.mjs.map +1 -1
- package/fesm2022/ngx-tethys-input-number.mjs +7 -7
- package/fesm2022/ngx-tethys-input.mjs +21 -23
- package/fesm2022/ngx-tethys-input.mjs.map +1 -1
- package/fesm2022/ngx-tethys-layout.mjs +73 -88
- package/fesm2022/ngx-tethys-layout.mjs.map +1 -1
- package/fesm2022/ngx-tethys-list.mjs +19 -22
- package/fesm2022/ngx-tethys-list.mjs.map +1 -1
- package/fesm2022/ngx-tethys-loading.mjs +7 -7
- package/fesm2022/ngx-tethys-mention.mjs +11 -12
- package/fesm2022/ngx-tethys-mention.mjs.map +1 -1
- package/fesm2022/ngx-tethys-menu.mjs +30 -30
- package/fesm2022/ngx-tethys-menu.mjs.map +1 -1
- package/fesm2022/ngx-tethys-message.mjs +24 -24
- package/fesm2022/ngx-tethys-message.mjs.map +1 -1
- package/fesm2022/ngx-tethys-nav.mjs +26 -29
- package/fesm2022/ngx-tethys-nav.mjs.map +1 -1
- package/fesm2022/ngx-tethys-notify.mjs +17 -17
- package/fesm2022/ngx-tethys-notify.mjs.map +1 -1
- package/fesm2022/ngx-tethys-pagination.mjs +15 -17
- package/fesm2022/ngx-tethys-pagination.mjs.map +1 -1
- package/fesm2022/ngx-tethys-popover.mjs +21 -23
- package/fesm2022/ngx-tethys-popover.mjs.map +1 -1
- package/fesm2022/ngx-tethys-progress.mjs +13 -13
- package/fesm2022/ngx-tethys-property-operation.mjs +11 -11
- package/fesm2022/ngx-tethys-property-operation.mjs.map +1 -1
- package/fesm2022/ngx-tethys-property.mjs +11 -11
- package/fesm2022/ngx-tethys-property.mjs.map +1 -1
- package/fesm2022/ngx-tethys-radio.mjs +125 -115
- package/fesm2022/ngx-tethys-radio.mjs.map +1 -1
- package/fesm2022/ngx-tethys-rate.mjs +10 -10
- package/fesm2022/ngx-tethys-resizable.mjs +18 -18
- package/fesm2022/ngx-tethys-resizable.mjs.map +1 -1
- package/fesm2022/ngx-tethys-result.mjs +7 -7
- package/fesm2022/ngx-tethys-segment.mjs +10 -10
- package/fesm2022/ngx-tethys-segment.mjs.map +1 -1
- package/fesm2022/ngx-tethys-select.mjs +10 -10
- package/fesm2022/ngx-tethys-shared.mjs +81 -109
- package/fesm2022/ngx-tethys-shared.mjs.map +1 -1
- package/fesm2022/ngx-tethys-skeleton.mjs +23 -24
- package/fesm2022/ngx-tethys-skeleton.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slide.mjs +36 -41
- package/fesm2022/ngx-tethys-slide.mjs.map +1 -1
- package/fesm2022/ngx-tethys-slider.mjs +7 -7
- package/fesm2022/ngx-tethys-space.mjs +11 -12
- package/fesm2022/ngx-tethys-space.mjs.map +1 -1
- package/fesm2022/ngx-tethys-statistic.mjs +7 -7
- package/fesm2022/ngx-tethys-stepper.mjs +22 -24
- package/fesm2022/ngx-tethys-stepper.mjs.map +1 -1
- package/fesm2022/ngx-tethys-strength.mjs +8 -8
- package/fesm2022/ngx-tethys-strength.mjs.map +1 -1
- package/fesm2022/ngx-tethys-switch.mjs +7 -7
- package/fesm2022/ngx-tethys-table.mjs +22 -25
- package/fesm2022/ngx-tethys-table.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tabs.mjs +14 -15
- package/fesm2022/ngx-tethys-tabs.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tag.mjs +12 -13
- package/fesm2022/ngx-tethys-tag.mjs.map +1 -1
- package/fesm2022/ngx-tethys-time-picker.mjs +58 -56
- package/fesm2022/ngx-tethys-time-picker.mjs.map +1 -1
- package/fesm2022/ngx-tethys-timeline.mjs +13 -13
- package/fesm2022/ngx-tethys-timeline.mjs.map +1 -1
- package/fesm2022/ngx-tethys-tooltip.mjs +14 -15
- package/fesm2022/ngx-tethys-tooltip.mjs.map +1 -1
- package/fesm2022/ngx-tethys-transfer.mjs +10 -10
- package/fesm2022/ngx-tethys-tree-select.mjs +10 -10
- package/fesm2022/ngx-tethys-tree.mjs +17 -21
- package/fesm2022/ngx-tethys-tree.mjs.map +1 -1
- package/fesm2022/ngx-tethys-typography.mjs +15 -17
- package/fesm2022/ngx-tethys-typography.mjs.map +1 -1
- package/fesm2022/ngx-tethys-upload.mjs +18 -19
- package/fesm2022/ngx-tethys-upload.mjs.map +1 -1
- package/fesm2022/ngx-tethys-util.mjs +418 -396
- package/fesm2022/ngx-tethys-util.mjs.map +1 -1
- package/fesm2022/ngx-tethys-vote.mjs +7 -7
- package/fesm2022/ngx-tethys-watermark.mjs +8 -9
- package/fesm2022/ngx-tethys-watermark.mjs.map +1 -1
- package/fesm2022/ngx-tethys.mjs +1 -1
- package/fesm2022/ngx-tethys.mjs.map +1 -1
- package/grid/grid.type.d.ts +5 -0
- package/grid/index.d.ts +1 -0
- package/grid/thy-grid-item.component.d.ts +1 -1
- package/grid/thy-grid.component.d.ts +1 -11
- package/guider/guider-manager.d.ts +2 -1
- package/guider/guider-ref.d.ts +6 -6
- package/guider/guider-step-ref.d.ts +3 -4
- package/guider/guider.interface.d.ts +26 -0
- package/i18n/i18n.service.d.ts +1 -1
- package/i18n/index.d.ts +2 -5
- package/i18n/locale.d.ts +1 -7
- package/i18n/locales/index.d.ts +5 -0
- package/i18n/util.d.ts +3 -0
- package/icon/index.d.ts +1 -1
- package/image/image-group.component.d.ts +4 -4
- package/image/image.directive.d.ts +2 -1
- package/image/image.token.d.ts +17 -0
- package/layout/header.component.d.ts +6 -18
- package/list/selection/selection-list.d.ts +2 -1
- package/list/selection/selection.interface.d.ts +2 -3
- package/message/abstract/abstract-message-queue.service.d.ts +2 -2
- package/message/abstract/abstract-message-ref.d.ts +6 -2
- package/package.json +2 -1
- package/popover/popover.directive.d.ts +6 -2
- package/radio/group/radio-group.component.d.ts +2 -1
- package/radio/radio.component.d.ts +3 -3
- package/radio/radio.token.d.ts +12 -0
- package/resizable/interface.d.ts +5 -0
- package/resizable/resizable.directive.d.ts +9 -3
- package/resizable/resizable.service.d.ts +1 -1
- package/resizable/resize-handle.component.d.ts +1 -6
- package/schematics/version.d.ts +1 -1
- package/schematics/version.js +1 -1
- package/segment/segment-item.component.d.ts +2 -1
- package/segment/segment.token.d.ts +10 -4
- package/shared/index.d.ts +1 -0
- package/shared/option/list-option/list-option.component.d.ts +10 -5
- package/shared/option/option.component.d.ts +1 -3
- package/shared/option/option.token.d.ts +11 -11
- package/shared/shared.type.d.ts +1 -0
- package/table/index.d.ts +1 -0
- package/table/styles/table.scss +9 -1
- package/table/table-column.component.d.ts +5 -30
- package/table/table-skeleton.component.d.ts +11 -3
- package/table/table.component.d.ts +1 -3
- package/table/table.type.d.ts +3 -0
- package/tag/tag.component.d.ts +2 -4
- package/time-picker/inner/inner-time-picker.component.d.ts +3 -1
- package/time-picker/inner/inner-time-picker.store.d.ts +5 -5
- package/time-picker/time-picker.utils.d.ts +5 -5
- package/timeline/index.d.ts +1 -0
- package/timeline/timeline-item.component.d.ts +1 -1
- package/timeline/timeline.component.d.ts +1 -1
- package/timeline/timeline.type.d.ts +1 -0
- package/tooltip/tooltip.directive.d.ts +2 -10
- package/tree/index.d.ts +0 -1
- package/tree/tree-abstract.d.ts +1 -1
- package/tree/tree-node.component.d.ts +17 -8
- package/tree/tree.class.d.ts +40 -1
- package/tree/tree.component.d.ts +1 -1
- package/tree/tree.pipe.d.ts +1 -1
- package/tree/tree.service.d.ts +3 -9
- package/util/helpers/helpers.d.ts +1 -0
- package/tree/tree-node.class.d.ts +0 -29
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys-watermark.mjs","sources":["../../../src/watermark/config.ts","../../../src/watermark/watermark.directive.ts","../../../src/watermark/watermark.module.ts","../../../src/watermark/ngx-tethys-watermark.ts"],"sourcesContent":["export const DEFAULT_WATERMARK_CONFIG = {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n opacity: '0.8',\n 'background-repeat': 'repeat',\n 'pointer-events': 'none',\n 'z-index': 2147483647,\n 'background-image': ''\n};\n\nexport const DEFAULT_CANVAS_CONFIG = {\n degree: 15,\n color: ['rgba(51, 51, 51, 0.12)', 'rgb(60, 65, 74)'],\n fontSize: 12,\n textLineHeight: 20,\n gutter: [250, 200]\n};\n","import { Directive, Input, ElementRef, OnInit, SimpleChanges, OnChanges, inject, DestroyRef, effect } from '@angular/core';\nimport { Subject, Observable } from 'rxjs';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DEFAULT_WATERMARK_CONFIG, DEFAULT_CANVAS_CONFIG } from './config';\nimport { MutationObserverFactory } from '@angular/cdk/observers';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\nimport { ThyThemeStore } from 'ngx-tethys/core';\n\n/**\n * @public\n * 水印样式配置\n */\nexport interface ThyCanvasConfigType {\n /**\n * 偏移角度\n */\n degree?: number;\n /**\n * 字体颜色。如果传的是数组,第一个为默认主题的字体颜色,第二个为黑暗主题的字体颜色\n */\n color?: string | string[];\n /**\n * 字体大小\n */\n fontSize?: number | string;\n /**\n * 文本行高\n */\n textLineHeight?: number;\n /**\n * 横纵间距\n */\n gutter?: number[];\n}\n\n/**\n * 水印指令\n * @name thyWatermark\n */\n@Directive({\n selector: '[thyWatermark]',\n standalone: true\n})\nexport class ThyWatermarkDirective implements OnInit, OnChanges {\n private el = inject(ElementRef);\n\n /**\n * 是否禁用,默认为 false\n */\n @Input({ transform: coerceBooleanProperty })\n thyDisabled: boolean = false;\n\n content: string;\n /**\n * 水印内容\n */\n @Input()\n set thyWatermark(value: string) {\n value = value?.replace(/^\\\"|\\\"$/g, '');\n this.content = !!value ? value : '';\n }\n\n /**\n * 水印样式配置\n */\n @Input() thyCanvasConfig: ThyCanvasConfigType;\n\n private createWatermark$ = new Subject<string>();\n\n private observer: MutationObserver;\n\n private canvas: HTMLCanvasElement;\n\n private wmDiv: HTMLElement;\n\n private readonly destroyRef = inject(DestroyRef);\n\n private thyThemeStore = inject(ThyThemeStore);\n\n constructor() {\n effect(() => {\n if (!this.thyDisabled && this.thyThemeStore.theme()) {\n this.refreshWatermark();\n }\n });\n }\n\n ngOnInit() {\n if (!this.thyDisabled) {\n this.createWatermark$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.observeAttributes()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {});\n });\n\n this.createWatermark();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const { thyWatermark, thyDisabled } = changes;\n const thyWatermarkChange = () => {\n if (thyWatermark.firstChange) return;\n if (thyWatermark.currentValue) {\n this.refreshWatermark();\n }\n };\n const thyDisabledChange = () => {\n if (thyDisabled.firstChange) return;\n thyDisabled?.currentValue ? this.removeWatermark() : this.refreshWatermark();\n };\n thyWatermark && thyWatermarkChange();\n thyDisabled && thyDisabledChange();\n }\n\n private refreshWatermark() {\n this.removeWatermark();\n this.createWatermark();\n }\n\n private removeWatermark() {\n if (this.wmDiv) {\n this.wmDiv.remove();\n this.wmDiv = null;\n }\n }\n\n createCanvas() {\n let { gutter, fontSize, color, degree, textLineHeight } = {\n ...DEFAULT_CANVAS_CONFIG,\n ...(this.thyCanvasConfig || {})\n };\n color = this.thyThemeStore.normalizeColor(color);\n\n const [xGutter, yGutter] = gutter;\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n\n const getFakeSize = () => {\n const fakeBox = document.createElement('div');\n const fakeBoxStyle = {\n position: 'absolute',\n top: 0,\n left: 0,\n display: 'inline-block',\n 'font-size': `${parseFloat('' + fontSize)}px`,\n 'word-wrap': 'break-word',\n 'font-family': 'inherit',\n 'white-space': 'pre-line'\n };\n const styleStr = Object.keys(fakeBoxStyle).reduce((pre, next) => ((pre += `${next}:${fakeBoxStyle[next]};`), pre), '');\n fakeBox.setAttribute('style', styleStr);\n\n fakeBox.innerHTML = this.content.replace(/(\\\\n)/gm, '</br>');\n document.querySelector('body').insertBefore(fakeBox, document.querySelector('body').firstChild);\n const { width, height } = fakeBox.getBoundingClientRect();\n fakeBox.remove();\n return { width, height };\n };\n const { width: fakeBoxWidth, height: fakeBoxHeight } = getFakeSize();\n\n const angle = (degree * Math.PI) / 180;\n const contentArr = this.content.split('\\\\n');\n const canvasHeight = Math.sin(angle) * fakeBoxWidth + fakeBoxHeight;\n\n let start = Math.ceil(Math.sin(angle) * fakeBoxWidth * Math.sin(angle));\n const canvasWidth = start + fakeBoxWidth;\n canvas.setAttribute('width', '' + (canvasWidth + xGutter));\n canvas.setAttribute('height', '' + (canvasHeight + yGutter));\n\n ctx.font = `${parseFloat('' + fontSize)}px microsoft yahei`;\n ctx.textAlign = 'center';\n ctx.textBaseline = 'top';\n ctx.fillStyle = color;\n ctx.rotate(0 - (degree * Math.PI) / 180);\n contentArr.map((k, i) => {\n ctx.fillText(k, -start + Math.ceil(canvasWidth / 2), Math.sin(angle) * canvasWidth + textLineHeight * i);\n start += Math.sin(angle) * textLineHeight;\n });\n this.canvas = canvas;\n return canvas;\n }\n\n private createWatermark(isRefresh = true) {\n const watermarkDiv = this.wmDiv || document.createElement('div');\n\n const background = !isRefresh ? this.canvas.toDataURL() : this.createCanvas().toDataURL();\n const watermarkStyle = {\n ...DEFAULT_WATERMARK_CONFIG,\n 'background-image': `url(${background})`\n };\n\n const styleStr = Object.keys(watermarkStyle).reduce((pre, next) => ((pre += `${next}:${watermarkStyle[next]};`), pre), '');\n watermarkDiv.setAttribute('style', styleStr);\n\n if (!this.wmDiv) {\n const parentNode = this.el.nativeElement;\n watermarkDiv.classList.add(`_vm`);\n this.wmDiv = watermarkDiv;\n parentNode.insertBefore(watermarkDiv, parentNode.firstChild);\n }\n this.createWatermark$.next('');\n }\n\n private observeAttributes() {\n this.observer?.disconnect();\n return new Observable(observe => {\n const stream = new Subject<MutationRecord[]>();\n this.observer = new MutationObserverFactory().create(mutations => stream.next(mutations));\n if (this.observer) {\n this.observer.observe(this.wmDiv, {\n attributes: true\n });\n }\n stream.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n if (this.wmDiv) {\n this?.observer?.disconnect();\n this.createWatermark(false);\n }\n });\n observe.next(stream);\n return () => {\n this.observer?.disconnect();\n };\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ThySharedModule } from 'ngx-tethys/shared';\nimport { ThyWatermarkDirective } from './watermark.directive';\n\n@NgModule({\n imports: [CommonModule, ThySharedModule, ThyWatermarkDirective],\n exports: [ThyWatermarkDirective],\n providers: []\n})\nexport class ThyWatermarkModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAO,MAAM,wBAAwB,GAAG;AACpC,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,GAAG,EAAE,CAAC;AACN,IAAA,IAAI,EAAE,CAAC;AACP,IAAA,KAAK,EAAE,MAAM;AACb,IAAA,MAAM,EAAE,MAAM;AACd,IAAA,OAAO,EAAE,KAAK;AACd,IAAA,mBAAmB,EAAE,QAAQ;AAC7B,IAAA,gBAAgB,EAAE,MAAM;AACxB,IAAA,SAAS,EAAE,UAAU;AACrB,IAAA,kBAAkB,EAAE;CACvB;AAEM,MAAM,qBAAqB,GAAG;AACjC,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,KAAK,EAAE,CAAC,wBAAwB,EAAE,iBAAiB,CAAC;AACpD,IAAA,QAAQ,EAAE,EAAE;AACZ,IAAA,cAAc,EAAE,EAAE;AAClB,IAAA,MAAM,EAAE,CAAC,GAAG,EAAE,GAAG;CACpB;;ACgBD;;;AAGG;MAKU,qBAAqB,CAAA;AAU9B;;AAEG;IACH,IACI,YAAY,CAAC,KAAa,EAAA;QAC1B,KAAK,GAAG,KAAK,EAAE,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;AACtC,QAAA,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,KAAK,GAAG,KAAK,GAAG,EAAE;;AAoBvC,IAAA,WAAA,GAAA;AAnCQ,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;AAE/B;;AAEG;QAEH,IAAW,CAAA,WAAA,GAAY,KAAK;AAiBpB,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,OAAO,EAAU;AAQ/B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAExC,QAAA,IAAA,CAAA,aAAa,GAAG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,CAAA;;2FAI9B,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,qBAAqB,CAAC;oBAC/D,OAAO,EAAE,CAAC,qBAAqB,CAAC;AAChC,oBAAA,SAAS,EAAE;AACd,iBAAA;;;ACTD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-tethys-watermark.mjs","sources":["../../../src/watermark/config.ts","../../../src/watermark/watermark.directive.ts","../../../src/watermark/watermark.module.ts","../../../src/watermark/ngx-tethys-watermark.ts"],"sourcesContent":["export const DEFAULT_WATERMARK_CONFIG = {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n opacity: '0.8',\n 'background-repeat': 'repeat',\n 'pointer-events': 'none',\n 'z-index': 2147483647,\n 'background-image': ''\n};\n\nexport const DEFAULT_CANVAS_CONFIG = {\n degree: 15,\n color: ['rgba(51, 51, 51, 0.12)', 'rgb(60, 65, 74)'],\n fontSize: 12,\n textLineHeight: 20,\n gutter: [250, 200]\n};\n","import { Directive, Input, ElementRef, OnInit, SimpleChanges, OnChanges, inject, DestroyRef, effect } from '@angular/core';\nimport { Subject, Observable } from 'rxjs';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DEFAULT_WATERMARK_CONFIG, DEFAULT_CANVAS_CONFIG } from './config';\nimport { MutationObserverFactory } from '@angular/cdk/observers';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\nimport { ThyThemeStore } from 'ngx-tethys/core';\n\n/**\n * @public\n * 水印样式配置\n */\nexport interface ThyCanvasConfigType {\n /**\n * 偏移角度\n */\n degree?: number;\n /**\n * 字体颜色。如果传的是数组,第一个为默认主题的字体颜色,第二个为黑暗主题的字体颜色\n */\n color?: string | string[];\n /**\n * 字体大小\n */\n fontSize?: number | string;\n /**\n * 文本行高\n */\n textLineHeight?: number;\n /**\n * 横纵间距\n */\n gutter?: number[];\n}\n\n/**\n * 水印指令\n * @name thyWatermark\n */\n@Directive({\n selector: '[thyWatermark]'\n})\nexport class ThyWatermarkDirective implements OnInit, OnChanges {\n private el = inject(ElementRef);\n\n /**\n * 是否禁用,默认为 false\n */\n @Input({ transform: coerceBooleanProperty })\n thyDisabled: boolean = false;\n\n content: string;\n /**\n * 水印内容\n */\n @Input()\n set thyWatermark(value: string) {\n value = value?.replace(/^\\\"|\\\"$/g, '');\n this.content = !!value ? value : '';\n }\n\n /**\n * 水印样式配置\n */\n @Input() thyCanvasConfig: ThyCanvasConfigType;\n\n private createWatermark$ = new Subject<string>();\n\n private observer: MutationObserver;\n\n private canvas: HTMLCanvasElement;\n\n private wmDiv: HTMLElement;\n\n private readonly destroyRef = inject(DestroyRef);\n\n private thyThemeStore = inject(ThyThemeStore);\n\n constructor() {\n effect(() => {\n if (!this.thyDisabled && this.thyThemeStore.theme()) {\n this.refreshWatermark();\n }\n });\n }\n\n ngOnInit() {\n if (!this.thyDisabled) {\n this.createWatermark$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.observeAttributes()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {});\n });\n\n this.createWatermark();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const { thyWatermark, thyDisabled } = changes;\n const thyWatermarkChange = () => {\n if (thyWatermark.firstChange) return;\n if (thyWatermark.currentValue) {\n this.refreshWatermark();\n }\n };\n const thyDisabledChange = () => {\n if (thyDisabled.firstChange) return;\n thyDisabled?.currentValue ? this.removeWatermark() : this.refreshWatermark();\n };\n thyWatermark && thyWatermarkChange();\n thyDisabled && thyDisabledChange();\n }\n\n private refreshWatermark() {\n this.removeWatermark();\n this.createWatermark();\n }\n\n private removeWatermark() {\n if (this.wmDiv) {\n this.wmDiv.remove();\n this.wmDiv = null;\n }\n }\n\n createCanvas() {\n let { gutter, fontSize, color, degree, textLineHeight } = {\n ...DEFAULT_CANVAS_CONFIG,\n ...(this.thyCanvasConfig || {})\n };\n color = this.thyThemeStore.normalizeColor(color);\n\n const [xGutter, yGutter] = gutter;\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n\n const getFakeSize = () => {\n const fakeBox = document.createElement('div');\n const fakeBoxStyle = {\n position: 'absolute',\n top: 0,\n left: 0,\n display: 'inline-block',\n 'font-size': `${parseFloat('' + fontSize)}px`,\n 'word-wrap': 'break-word',\n 'font-family': 'inherit',\n 'white-space': 'pre-line'\n };\n const styleStr = Object.keys(fakeBoxStyle).reduce((pre, next) => ((pre += `${next}:${fakeBoxStyle[next]};`), pre), '');\n fakeBox.setAttribute('style', styleStr);\n\n fakeBox.innerHTML = this.content.replace(/(\\\\n)/gm, '</br>');\n document.querySelector('body').insertBefore(fakeBox, document.querySelector('body').firstChild);\n const { width, height } = fakeBox.getBoundingClientRect();\n fakeBox.remove();\n return { width, height };\n };\n const { width: fakeBoxWidth, height: fakeBoxHeight } = getFakeSize();\n\n const angle = (degree * Math.PI) / 180;\n const contentArr = this.content.split('\\\\n');\n const canvasHeight = Math.sin(angle) * fakeBoxWidth + fakeBoxHeight;\n\n let start = Math.ceil(Math.sin(angle) * fakeBoxWidth * Math.sin(angle));\n const canvasWidth = start + fakeBoxWidth;\n canvas.setAttribute('width', '' + (canvasWidth + xGutter));\n canvas.setAttribute('height', '' + (canvasHeight + yGutter));\n\n ctx.font = `${parseFloat('' + fontSize)}px microsoft yahei`;\n ctx.textAlign = 'center';\n ctx.textBaseline = 'top';\n ctx.fillStyle = color;\n ctx.rotate(0 - (degree * Math.PI) / 180);\n contentArr.map((k, i) => {\n ctx.fillText(k, -start + Math.ceil(canvasWidth / 2), Math.sin(angle) * canvasWidth + textLineHeight * i);\n start += Math.sin(angle) * textLineHeight;\n });\n this.canvas = canvas;\n return canvas;\n }\n\n private createWatermark(isRefresh = true) {\n const watermarkDiv = this.wmDiv || document.createElement('div');\n\n const background = !isRefresh ? this.canvas.toDataURL() : this.createCanvas().toDataURL();\n const watermarkStyle = {\n ...DEFAULT_WATERMARK_CONFIG,\n 'background-image': `url(${background})`\n };\n\n const styleStr = Object.keys(watermarkStyle).reduce((pre, next) => ((pre += `${next}:${watermarkStyle[next]};`), pre), '');\n watermarkDiv.setAttribute('style', styleStr);\n\n if (!this.wmDiv) {\n const parentNode = this.el.nativeElement;\n watermarkDiv.classList.add(`_vm`);\n this.wmDiv = watermarkDiv;\n parentNode.insertBefore(watermarkDiv, parentNode.firstChild);\n }\n this.createWatermark$.next('');\n }\n\n private observeAttributes() {\n this.observer?.disconnect();\n return new Observable(observe => {\n const stream = new Subject<MutationRecord[]>();\n this.observer = new MutationObserverFactory().create(mutations => stream.next(mutations));\n if (this.observer) {\n this.observer.observe(this.wmDiv, {\n attributes: true\n });\n }\n stream.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n if (this.wmDiv) {\n this?.observer?.disconnect();\n this.createWatermark(false);\n }\n });\n observe.next(stream);\n return () => {\n this.observer?.disconnect();\n };\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ThySharedModule } from 'ngx-tethys/shared';\nimport { ThyWatermarkDirective } from './watermark.directive';\n\n@NgModule({\n imports: [CommonModule, ThySharedModule, ThyWatermarkDirective],\n exports: [ThyWatermarkDirective],\n providers: []\n})\nexport class ThyWatermarkModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAAO,MAAM,wBAAwB,GAAG;AACpC,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,GAAG,EAAE,CAAC;AACN,IAAA,IAAI,EAAE,CAAC;AACP,IAAA,KAAK,EAAE,MAAM;AACb,IAAA,MAAM,EAAE,MAAM;AACd,IAAA,OAAO,EAAE,KAAK;AACd,IAAA,mBAAmB,EAAE,QAAQ;AAC7B,IAAA,gBAAgB,EAAE,MAAM;AACxB,IAAA,SAAS,EAAE,UAAU;AACrB,IAAA,kB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A,EAAA,CAAA,CAAA;;2FANhC,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAHjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE;AACb,iBAAA;wDAQG,WAAW,EAAA,CAAA;sBADV,KAAK;uBAAC,EAAE,SAAS,EAAE,qBAAqB,EAAE;gBAQvC,YAAY,EAAA,CAAA;sBADf;gBASQ,eAAe,EAAA,CAAA;sBAAvB;;;MCtDQ,kBAAkB,CAAA;8GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAJjB,YAAY,EAAE,eAAe,EAAE,qBAAqB,aACpD,qBAAqB,CAAA,EAAA,CAAA,CAAA;+GAGtB,kBAAkB,EAAA,OAAA,EAAA,CAJjB,YAAY,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAI9B,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,qBAAqB,CAAC;oBAC/D,OAAO,EAAE,CAAC,qBAAqB,CAAC;AAChC,oBAAA,SAAS,EAAE;AACd,iBAAA;;;ACTD;;AAEG;;;;"}
|
package/fesm2022/ngx-tethys.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-tethys.mjs","sources":["../../../src/version.ts","../../../src/ngx-tethys.ts"],"sourcesContent":["import { Version } from '@angular/core';\n\nexport const VERSION = new Version('19.0.
|
|
1
|
+
{"version":3,"file":"ngx-tethys.mjs","sources":["../../../src/version.ts","../../../src/ngx-tethys.ts"],"sourcesContent":["import { Version } from '@angular/core';\n\nexport const VERSION = new Version('19.0.6');\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;MAEa,OAAO,GAAG,IAAI,OAAO,CAAC,QAAQ;;ACF3C;;AAEG;;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type ThyGridResponsiveMode = 'none' | 'self' | 'screen';
|
|
2
|
+
export type ThyGridResponsiveDescription = string;
|
|
3
|
+
export declare const THY_GRID_DEFAULT_COLUMNS = 24;
|
|
4
|
+
export declare const THY_GRID_ITEM_DEFAULT_SPAN = 1;
|
|
5
|
+
export declare const screenBreakpointsMap: Record<string, number>;
|
package/grid/index.d.ts
CHANGED
|
@@ -2,18 +2,8 @@ import { AfterContentInit, OnChanges, OnInit, QueryList, SimpleChanges } from '@
|
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
3
|
import { ThyGridToken } from './grid.token';
|
|
4
4
|
import { ThyGridItem } from './thy-grid-item.component';
|
|
5
|
+
import { ThyGridResponsiveMode, ThyGridResponsiveDescription } from './grid.type';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
|
-
export type ThyGridResponsiveMode = 'none' | 'self' | 'screen';
|
|
7
|
-
export type ThyGridResponsiveDescription = string;
|
|
8
|
-
export declare const THY_GRID_DEFAULT_COLUMNS = 24;
|
|
9
|
-
export declare const THY_GRID_ITEM_DEFAULT_SPAN = 1;
|
|
10
|
-
export declare const screenBreakpointsMap: {
|
|
11
|
-
xs: number;
|
|
12
|
-
sm: number;
|
|
13
|
-
md: number;
|
|
14
|
-
lg: number;
|
|
15
|
-
xl: number;
|
|
16
|
-
};
|
|
17
7
|
/**
|
|
18
8
|
* 栅格组件
|
|
19
9
|
* @name thy-grid, [thyGrid]
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ThyGuiderRef } from './guider-ref';
|
|
2
|
+
import { IThyGuiderManager } from './guider.interface';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
/**
|
|
4
5
|
* @public
|
|
5
6
|
* @order 60
|
|
6
7
|
*/
|
|
7
|
-
export declare class ThyGuiderManager {
|
|
8
|
+
export declare class ThyGuiderManager implements IThyGuiderManager {
|
|
8
9
|
private targetListMap;
|
|
9
10
|
private thyGuiderRef;
|
|
10
11
|
private activeStepKey;
|
package/guider/guider-ref.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Router } from '@angular/router';
|
|
2
2
|
import { ThyPopover } from 'ngx-tethys/popover';
|
|
3
|
-
import {
|
|
3
|
+
import { IThyGuiderManager, IThyGuiderRef } from './guider.interface';
|
|
4
4
|
import { Observable, Subject } from 'rxjs';
|
|
5
5
|
import { ThyGuiderConfig, ThyGuiderStep } from './guider.class';
|
|
6
6
|
import { NgZone, RendererFactory2 } from '@angular/core';
|
|
7
7
|
import { Overlay } from '@angular/cdk/overlay';
|
|
8
|
-
export declare class ThyGuiderRef {
|
|
8
|
+
export declare class ThyGuiderRef implements IThyGuiderRef {
|
|
9
9
|
config: ThyGuiderConfig;
|
|
10
10
|
private rendererFactory;
|
|
11
11
|
private popover;
|
|
@@ -22,11 +22,11 @@ export declare class ThyGuiderRef {
|
|
|
22
22
|
private currentStep;
|
|
23
23
|
private currentStepIndex;
|
|
24
24
|
private stepsRef;
|
|
25
|
-
constructor(config: ThyGuiderConfig, rendererFactory: RendererFactory2, popover: ThyPopover, router: Router, guiderManager:
|
|
25
|
+
constructor(config: ThyGuiderConfig, rendererFactory: RendererFactory2, popover: ThyPopover, router: Router, guiderManager: IThyGuiderManager, ngZone: NgZone, overlay: Overlay, document: any);
|
|
26
26
|
stepChange(): Observable<ThyGuiderStep>;
|
|
27
|
-
ended(): Subject<
|
|
28
|
-
closed(): Subject<ThyGuiderStep
|
|
29
|
-
targetClicked(): Subject<ThyGuiderStep
|
|
27
|
+
ended(): Subject<ThyGuiderStep>;
|
|
28
|
+
closed(): Subject<ThyGuiderStep>;
|
|
29
|
+
targetClicked(): Subject<ThyGuiderStep>;
|
|
30
30
|
start(startWith?: number): Observable<ThyGuiderStep<any>>;
|
|
31
31
|
next(): void;
|
|
32
32
|
previous(): void;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Overlay } from '@angular/cdk/overlay';
|
|
2
2
|
import { RendererFactory2 } from '@angular/core';
|
|
3
3
|
import { ThyPopover } from 'ngx-tethys/popover';
|
|
4
|
-
import {
|
|
5
|
-
import { ThyGuiderRef } from './guider-ref';
|
|
4
|
+
import { IThyGuiderManager, IThyGuiderRef } from './guider.interface';
|
|
6
5
|
import { ThyGuiderStep } from './guider.class';
|
|
7
6
|
/**
|
|
8
7
|
* @public
|
|
@@ -23,8 +22,8 @@ export declare class ThyGuiderStepRef {
|
|
|
23
22
|
private lastTipContainer;
|
|
24
23
|
private guiderRef;
|
|
25
24
|
private lastPopoverRef;
|
|
26
|
-
constructor(step: ThyGuiderStep, stepIndex: number, rendererFactory: RendererFactory2, popover: ThyPopover, guiderManager:
|
|
27
|
-
show(guiderRef:
|
|
25
|
+
constructor(step: ThyGuiderStep, stepIndex: number, rendererFactory: RendererFactory2, popover: ThyPopover, guiderManager: IThyGuiderManager, overlay: Overlay, document: Document);
|
|
26
|
+
show(guiderRef: IThyGuiderRef): void;
|
|
28
27
|
dispose(): void;
|
|
29
28
|
private getTargetElement;
|
|
30
29
|
private createPoint;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Observable, Subject } from 'rxjs';
|
|
2
|
+
import { ThyGuiderConfig, ThyGuiderStep } from './guider.class';
|
|
3
|
+
export interface IThyGuiderRef {
|
|
4
|
+
config: ThyGuiderConfig;
|
|
5
|
+
steps: ThyGuiderStep[];
|
|
6
|
+
stepChange: () => Observable<ThyGuiderStep>;
|
|
7
|
+
ended: () => Subject<ThyGuiderStep>;
|
|
8
|
+
closed: () => Subject<ThyGuiderStep>;
|
|
9
|
+
targetClicked: () => Subject<ThyGuiderStep>;
|
|
10
|
+
start: (startWith?: number) => void;
|
|
11
|
+
next: () => void;
|
|
12
|
+
previous: () => void;
|
|
13
|
+
active: (indexOrKey: number | string) => void;
|
|
14
|
+
close: () => void;
|
|
15
|
+
end: () => void;
|
|
16
|
+
}
|
|
17
|
+
export interface IThyGuiderManager {
|
|
18
|
+
updateActive: (key: string, guiderRef: IThyGuiderRef) => void;
|
|
19
|
+
addStepTarget: (key: string, el: HTMLElement) => void;
|
|
20
|
+
removeStepTarget: (key: string) => void;
|
|
21
|
+
getActiveTarget: (key: string) => HTMLElement;
|
|
22
|
+
getActive: () => {
|
|
23
|
+
key: string;
|
|
24
|
+
guiderRef: IThyGuiderRef;
|
|
25
|
+
};
|
|
26
|
+
}
|
package/i18n/i18n.service.d.ts
CHANGED
package/i18n/index.d.ts
CHANGED
|
@@ -2,8 +2,5 @@ export * from './i18n';
|
|
|
2
2
|
export * from './i18n.service';
|
|
3
3
|
export * from './i18n.token';
|
|
4
4
|
export * from './locale';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export { default as enUsLocale } from './locales/en-us';
|
|
8
|
-
export { default as jaJpLocale } from './locales/ja-jp';
|
|
9
|
-
export { default as deDeLocale } from './locales/de-de';
|
|
5
|
+
export * from './locales';
|
|
6
|
+
export * from './util';
|
package/i18n/locale.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { Signal } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ThyModuleLocaleType, ThyModuleType, ThyI18nLocale } from './i18n';
|
|
3
3
|
export declare function injectLocale(): Signal<ThyI18nLocale>;
|
|
4
4
|
export declare function injectLocale<K extends ThyModuleType>(key: K): Signal<ThyModuleLocaleType<K>>;
|
|
5
|
-
export declare function normalizeLocale(localeId: string): ThyLocaleType;
|
|
6
|
-
/**
|
|
7
|
-
* 支持语言列表中获取默认语言
|
|
8
|
-
* return ThyLocaleType
|
|
9
|
-
*/
|
|
10
|
-
export declare function getDefaultLocaleId(): ThyLocaleType;
|
package/i18n/util.d.ts
ADDED
package/icon/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ThyIconModule } from './icon.module';
|
|
2
2
|
export { ThyIcon } from './icon.component';
|
|
3
3
|
export { ThyIconRegistry } from './icon-registry';
|
|
4
|
-
export { setPrintErrorWhenIconNotFound } from './config';
|
|
4
|
+
export { setPrintErrorWhenIconNotFound, getWhetherPrintErrorWhenIconNotFound } from './config';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Injector, ElementRef } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { IThyImageDirective, IThyImageGroupComponent } from './image.token';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
5
|
* 图片分组,提供 thyImageGroup 指令和 thy-image-group 标签两种使用方式
|
|
6
6
|
* @name thy-image-group,[thyImageGroup]
|
|
7
7
|
*/
|
|
8
|
-
export declare class ThyImageGroup {
|
|
8
|
+
export declare class ThyImageGroup implements IThyImageGroupComponent {
|
|
9
9
|
injector: Injector;
|
|
10
10
|
element: ElementRef<any>;
|
|
11
|
-
images:
|
|
12
|
-
addImage(image:
|
|
11
|
+
images: IThyImageDirective[];
|
|
12
|
+
addImage(image: IThyImageDirective, index: number): void;
|
|
13
13
|
removeImage(index: number): void;
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<ThyImageGroup, never>;
|
|
15
15
|
static ɵcmp: i0.ɵɵComponentDeclaration<ThyImageGroup, "thy-image-group, [thyImageGroup]", never, {}, {}, never, ["*"], true, never>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OnChanges, OnInit, SimpleChanges, OnDestroy, AfterViewInit } from '@angular/core';
|
|
2
|
+
import { IThyImageDirective } from './image.token';
|
|
2
3
|
import { ThyImageMeta } from './image.class';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
/**
|
|
@@ -6,7 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
6
7
|
* @name img[thyImage]
|
|
7
8
|
* @order 10
|
|
8
9
|
*/
|
|
9
|
-
export declare class ThyImageDirective implements OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
10
|
+
export declare class ThyImageDirective implements IThyImageDirective, OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
10
11
|
private thyImageService;
|
|
11
12
|
private injector;
|
|
12
13
|
private elementRef;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ElementRef, InjectionToken, Injector } from '@angular/core';
|
|
2
|
+
import { ThyImageMeta } from './image.class';
|
|
3
|
+
export interface IThyImageDirective {
|
|
4
|
+
previewable: boolean;
|
|
5
|
+
thySrc: string;
|
|
6
|
+
thyPreviewSrc: string;
|
|
7
|
+
thyOriginSrc: string;
|
|
8
|
+
thyImageMeta: ThyImageMeta;
|
|
9
|
+
}
|
|
10
|
+
export interface IThyImageGroupComponent {
|
|
11
|
+
injector: Injector;
|
|
12
|
+
element: ElementRef;
|
|
13
|
+
images: IThyImageDirective[];
|
|
14
|
+
addImage: (image: IThyImageDirective, index: number) => void;
|
|
15
|
+
removeImage: (index: number) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const THY_IMAGE_GROUP_COMPONENT: InjectionToken<IThyImageGroupComponent>;
|
|
@@ -28,27 +28,15 @@ export declare class ThyHeaderDirective {
|
|
|
28
28
|
set thyHasBorder(value: boolean);
|
|
29
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<ThyHeaderDirective, never>;
|
|
30
30
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ThyHeaderDirective, "[thyHeader]", never, { "thySize": { "alias": "thySize"; "required": false; }; "thyShadow": { "alias": "thyShadow"; "required": false; }; "thyDivided": { "alias": "thyDivided"; "required": false; }; "thyHasBorder": { "alias": "thyHasBorder"; "required": false; }; }, {}, never, never, true, never>;
|
|
31
|
-
static ngAcceptInputType_thyShadow:
|
|
32
|
-
/**
|
|
31
|
+
static ngAcceptInputType_thyShadow: /**
|
|
33
32
|
* 图标,SVG 图标名称
|
|
34
|
-
*/
|
|
35
|
-
|
|
33
|
+
*/ boolean | string | number;
|
|
34
|
+
static ngAcceptInputType_thyDivided: /**
|
|
36
35
|
* 图标,SVG 图标名称
|
|
37
|
-
*/ number;
|
|
38
|
-
static
|
|
39
|
-
/**
|
|
40
|
-
* 图标,SVG 图标名称
|
|
41
|
-
*/
|
|
42
|
-
| /**
|
|
43
|
-
* 图标,SVG 图标名称
|
|
44
|
-
*/ number;
|
|
45
|
-
static ngAcceptInputType_thyHasBorder: boolean | string
|
|
46
|
-
/**
|
|
47
|
-
* 图标,SVG 图标名称
|
|
48
|
-
*/
|
|
49
|
-
| /**
|
|
36
|
+
*/ boolean | string | number;
|
|
37
|
+
static ngAcceptInputType_thyHasBorder: /**
|
|
50
38
|
* 图标,SVG 图标名称
|
|
51
|
-
*/ number;
|
|
39
|
+
*/ boolean | string | number;
|
|
52
40
|
}
|
|
53
41
|
/**
|
|
54
42
|
* 头部布局组件
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { IThyListOptionParentComponent,
|
|
1
|
+
import { IThyListOptionParentComponent, ThyListOption } from 'ngx-tethys/shared';
|
|
2
2
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
3
3
|
import { AfterContentInit, ElementRef, EventEmitter, OnDestroy, OnInit, QueryList } from '@angular/core';
|
|
4
4
|
import { ControlValueAccessor } from '@angular/forms';
|
|
5
|
+
import { ThyListLayout } from 'ngx-tethys/shared';
|
|
5
6
|
import { ThySelectionListChange } from './selection.interface';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export type ThyListSize = 'sm' | 'md' | 'lg';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ThyListOption } from 'ngx-tethys/shared';
|
|
1
|
+
import { ThyListOption, IThyListOptionParentComponent } from 'ngx-tethys/shared';
|
|
3
2
|
export interface ThySelectionListChange<TValue = any> {
|
|
4
|
-
source:
|
|
3
|
+
source: IThyListOptionParentComponent;
|
|
5
4
|
option: ThyListOption;
|
|
6
5
|
value: TValue;
|
|
7
6
|
event: Event;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BehaviorSubject } from 'rxjs';
|
|
2
2
|
import { ThyGlobalMessageConfig } from '../message.config';
|
|
3
|
-
import { ThyAbstractMessageRef } from './abstract-message-ref';
|
|
3
|
+
import { IThyAbstractMessageQueue, ThyAbstractMessageRef } from './abstract-message-ref';
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export declare class ThyAbstractMessageQueue<TReferences extends ThyAbstractMessageRef = ThyAbstractMessageRef> {
|
|
7
|
+
export declare class ThyAbstractMessageQueue<TReferences extends ThyAbstractMessageRef = ThyAbstractMessageRef> implements IThyAbstractMessageQueue {
|
|
8
8
|
queues$: BehaviorSubject<TReferences[]>;
|
|
9
9
|
protected defaultConfig: ThyGlobalMessageConfig;
|
|
10
10
|
get queues(): TReferences[];
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { OverlayRef } from '@angular/cdk/overlay';
|
|
2
2
|
import { ThyMessageBaseConfig } from '../message.config';
|
|
3
|
-
import {
|
|
3
|
+
import { BehaviorSubject } from 'rxjs';
|
|
4
|
+
export interface IThyAbstractMessageQueue<TReferences extends ThyAbstractMessageRef = ThyAbstractMessageRef> {
|
|
5
|
+
queues$: BehaviorSubject<TReferences[]>;
|
|
6
|
+
queues: TReferences[];
|
|
7
|
+
}
|
|
4
8
|
export declare class ThyAbstractMessageRef<TConfig extends ThyMessageBaseConfig = ThyMessageBaseConfig> {
|
|
5
9
|
id: string;
|
|
6
10
|
config: TConfig;
|
|
7
11
|
private overlayRef;
|
|
8
12
|
private queueService;
|
|
9
13
|
private _afterClosed;
|
|
10
|
-
constructor(config: TConfig, overlayRef: OverlayRef, queueService:
|
|
14
|
+
constructor(config: TConfig, overlayRef: OverlayRef, queueService: IThyAbstractMessageQueue);
|
|
11
15
|
close(): void;
|
|
12
16
|
afterClosed(): import("rxjs").Observable<void>;
|
|
13
17
|
getOverlayRef(): OverlayRef;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-tethys",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@github.com/atinc/ngx-tethys.git"
|
|
@@ -365,6 +365,7 @@
|
|
|
365
365
|
"@tethys/cdk": "^19.0.0",
|
|
366
366
|
"date-fns": "4.1.0",
|
|
367
367
|
"@date-fns/tz": "1.2.0",
|
|
368
|
+
"date-fns-tz": "3.2.0",
|
|
368
369
|
"@tethys/icons": "^1.4.23",
|
|
369
370
|
"rxjs": "^6.5.4 || ^7.0.0"
|
|
370
371
|
},
|
|
@@ -65,6 +65,10 @@ export declare class ThyPopoverDirective extends ThyOverlayDirectiveBase impleme
|
|
|
65
65
|
static ngAcceptInputType_thyOffset: unknown;
|
|
66
66
|
static ngAcceptInputType_thyShowDelay: unknown;
|
|
67
67
|
static ngAcceptInputType_thyHideDelay: unknown;
|
|
68
|
-
static ngAcceptInputType_thyAutoAdaptive: boolean | string | number
|
|
69
|
-
|
|
68
|
+
static ngAcceptInputType_thyAutoAdaptive: boolean | string | number /**
|
|
69
|
+
* 自动适配内容变化重新计算位置
|
|
70
|
+
*/;
|
|
71
|
+
static ngAcceptInputType_thyDisabled: boolean | string | number /**
|
|
72
|
+
* 自动适配内容变化重新计算位置
|
|
73
|
+
*/;
|
|
70
74
|
}
|
|
@@ -2,12 +2,13 @@ import { AfterContentInit, OnChanges, OnInit, SimpleChanges } from '@angular/cor
|
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import { ThyRadioButton } from '../button/radio-button.component';
|
|
4
4
|
import { ThyRadio } from '../radio.component';
|
|
5
|
+
import { IThyRadioGroupComponent } from '../radio.token';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* @name thy-radio-group
|
|
8
9
|
* @order 20
|
|
9
10
|
*/
|
|
10
|
-
export declare class ThyRadioGroup implements ControlValueAccessor, OnInit, OnChanges, AfterContentInit {
|
|
11
|
+
export declare class ThyRadioGroup implements IThyRadioGroupComponent, ControlValueAccessor, OnInit, OnChanges, AfterContentInit {
|
|
11
12
|
private changeDetectorRef;
|
|
12
13
|
thyRadioGroup: boolean;
|
|
13
14
|
isButtonGroup: boolean;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { ThyFormCheckBaseComponent } from 'ngx-tethys/shared';
|
|
3
|
-
import {
|
|
3
|
+
import { IThyRadioComponent } from './radio.token';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
6
|
* 单选框组件
|
|
7
7
|
* @name thy-radio,[thyRadio]
|
|
8
8
|
* @order 10
|
|
9
9
|
*/
|
|
10
|
-
export declare class ThyRadio extends ThyFormCheckBaseComponent implements OnInit {
|
|
11
|
-
thyRadioGroupComponent:
|
|
10
|
+
export declare class ThyRadio extends ThyFormCheckBaseComponent implements IThyRadioComponent, OnInit {
|
|
11
|
+
thyRadioGroupComponent: import("./radio.token").IThyRadioGroupComponent;
|
|
12
12
|
name: string;
|
|
13
13
|
/**
|
|
14
14
|
* 当和 thy-radio-group 配合使用时的值,选中后的 NgModel 值
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
export interface IThyRadioComponent {
|
|
3
|
+
thyValue: string;
|
|
4
|
+
thyChecked: boolean;
|
|
5
|
+
setDisabledState?(isDisabled: boolean): void;
|
|
6
|
+
}
|
|
7
|
+
export interface IThyRadioGroupComponent {
|
|
8
|
+
addRadio(radio: IThyRadioComponent): void;
|
|
9
|
+
updateValue(value: string, emit: boolean): void;
|
|
10
|
+
setGroup(): void;
|
|
11
|
+
}
|
|
12
|
+
export declare const THY_RADIO_GROUP_COMPONENT: InjectionToken<IThyRadioGroupComponent>;
|
package/resizable/interface.d.ts
CHANGED
|
@@ -5,3 +5,8 @@ export interface ThyResizeEvent {
|
|
|
5
5
|
col?: number;
|
|
6
6
|
mouseEvent?: MouseEvent | TouchEvent;
|
|
7
7
|
}
|
|
8
|
+
export declare class ThyResizeHandleMouseDownEvent {
|
|
9
|
+
direction: ThyResizeDirection;
|
|
10
|
+
mouseEvent: MouseEvent | TouchEvent;
|
|
11
|
+
constructor(direction: ThyResizeDirection, mouseEvent: MouseEvent | TouchEvent);
|
|
12
|
+
}
|
|
@@ -96,7 +96,13 @@ export declare class ThyResizableDirective implements AfterViewInit, OnDestroy {
|
|
|
96
96
|
static ngAcceptInputType_thyGridColumnCount: unknown;
|
|
97
97
|
static ngAcceptInputType_thyMaxColumn: unknown;
|
|
98
98
|
static ngAcceptInputType_thyMinColumn: unknown;
|
|
99
|
-
static ngAcceptInputType_thyLockAspectRatio: boolean
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
static ngAcceptInputType_thyLockAspectRatio: boolean /**
|
|
100
|
+
* 栅格最大列数
|
|
101
|
+
*/ | string | number;
|
|
102
|
+
static ngAcceptInputType_thyPreview: boolean /**
|
|
103
|
+
* 栅格最大列数
|
|
104
|
+
*/ | string | number;
|
|
105
|
+
static ngAcceptInputType_thyDisabled: boolean /**
|
|
106
|
+
* 栅格最大列数
|
|
107
|
+
*/ | string | number;
|
|
102
108
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
|
-
import { ThyResizeHandleMouseDownEvent } from './
|
|
3
|
+
import { ThyResizeHandleMouseDownEvent } from './interface';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { OnInit, EventEmitter } from '@angular/core';
|
|
2
|
-
import { ThyResizeDirection } from './interface';
|
|
2
|
+
import { ThyResizeDirection, ThyResizeHandleMouseDownEvent } from './interface';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ThyResizeHandleMouseDownEvent {
|
|
5
|
-
direction: ThyResizeDirection;
|
|
6
|
-
mouseEvent: MouseEvent | TouchEvent;
|
|
7
|
-
constructor(direction: ThyResizeDirection, mouseEvent: MouseEvent | TouchEvent);
|
|
8
|
-
}
|
|
9
4
|
/**
|
|
10
5
|
* 定义调整手柄及方向
|
|
11
6
|
* @name thy-resize-handle
|
package/schematics/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "19.0.
|
|
1
|
+
export declare const VERSION = "19.0.6";
|
package/schematics/version.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AfterViewInit, ElementRef, OnDestroy } from '@angular/core';
|
|
2
|
+
import { IThySegmentItemComponent } from './segment.token';
|
|
2
3
|
import { SafeAny } from 'ngx-tethys/types';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
/**
|
|
5
6
|
* 分段控制器的选项组件
|
|
6
7
|
* @name thy-segment-item,[thy-segment-item]
|
|
7
8
|
*/
|
|
8
|
-
export declare class ThySegmentItem implements AfterViewInit, OnDestroy {
|
|
9
|
+
export declare class ThySegmentItem implements IThySegmentItemComponent, AfterViewInit, OnDestroy {
|
|
9
10
|
elementRef: ElementRef<any>;
|
|
10
11
|
private ngZone;
|
|
11
12
|
private cdr;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import {
|
|
1
|
+
import { ElementRef, InjectionToken } from '@angular/core';
|
|
2
|
+
import { SafeAny } from 'ngx-tethys/types';
|
|
3
|
+
export interface IThySegmentItemComponent {
|
|
4
|
+
elementRef: ElementRef<HTMLElement>;
|
|
5
|
+
thyValue: SafeAny;
|
|
6
|
+
unselect: () => void;
|
|
7
|
+
select: () => void;
|
|
8
|
+
}
|
|
3
9
|
export interface IThySegmentComponent {
|
|
4
10
|
thyMode: string;
|
|
5
11
|
thyDisabled: boolean;
|
|
6
|
-
selectedItem:
|
|
7
|
-
changeSelectedItem: (item:
|
|
12
|
+
selectedItem: IThySegmentItemComponent;
|
|
13
|
+
changeSelectedItem: (item: IThySegmentItemComponent, event?: Event) => void;
|
|
8
14
|
}
|
|
9
15
|
export declare const THY_SEGMENTED_COMPONENT: InjectionToken<IThySegmentComponent>;
|