raise-common-lib 0.0.217 → 0.0.218

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.
Files changed (55) hide show
  1. package/README.md +57 -57
  2. package/bundles/raise-common-lib.umd.js +1164 -0
  3. package/bundles/raise-common-lib.umd.js.map +1 -1
  4. package/bundles/raise-common-lib.umd.min.js +1 -1
  5. package/bundles/raise-common-lib.umd.min.js.map +1 -1
  6. package/esm2015/lib/raise-common-lib.module.js +4 -1
  7. package/esm2015/lib/smart-popup/index.component.js +1059 -0
  8. package/esm2015/public-api.js +2 -1
  9. package/esm2015/raise-common-lib.js +2 -2
  10. package/esm5/lib/raise-common-lib.module.js +4 -1
  11. package/esm5/lib/smart-popup/index.component.js +1164 -0
  12. package/esm5/public-api.js +2 -1
  13. package/esm5/raise-common-lib.js +2 -2
  14. package/fesm2015/raise-common-lib.js +1061 -1
  15. package/fesm2015/raise-common-lib.js.map +1 -1
  16. package/fesm5/raise-common-lib.js +1164 -1
  17. package/fesm5/raise-common-lib.js.map +1 -1
  18. package/lib/smart-popup/index.component.d.ts +55 -0
  19. package/package.json +1 -1
  20. package/public-api.d.ts +1 -0
  21. package/raise-common-lib.metadata.json +1 -1
  22. package/src/assets/img/arrow_right.svg +4 -4
  23. package/src/assets/img/calendar-disabled.svg +6 -6
  24. package/src/assets/img/calendar.svg +6 -6
  25. package/src/assets/img/calendar_arrow_left.svg +3 -3
  26. package/src/assets/img/calendar_arrow_right.svg +3 -3
  27. package/src/assets/img/checked-vector.svg +3 -3
  28. package/src/assets/img/dialog-close.svg +4 -4
  29. package/src/assets/img/dialog-grow.svg +6 -6
  30. package/src/assets/img/dialog-shrink.svg +6 -6
  31. package/src/assets/img/plus.svg +4 -4
  32. package/src/assets/img/search.svg +4 -4
  33. package/src/assets/img/shrink-icon.svg +6 -6
  34. package/src/assets/img/time-disabled.svg +4 -4
  35. package/src/assets/img/time.svg +4 -4
  36. package/src/assets/img/toolbar-action-addFolder.svg +17 -17
  37. package/src/assets/img/toolbar-action-calculator.svg +11 -11
  38. package/src/assets/img/toolbar-action-collapse.svg +7 -7
  39. package/src/assets/img/toolbar-action-combine.svg +4 -4
  40. package/src/assets/img/toolbar-action-edit.svg +4 -4
  41. package/src/assets/img/toolbar-action-expand.svg +7 -7
  42. package/src/assets/img/toolbar-action-folderMove.svg +8 -8
  43. package/src/assets/img/toolbar-action-lock.svg +6 -6
  44. package/src/assets/img/toolbar-action-preview.svg +7 -7
  45. package/src/assets/img/toolbar-action-publish.svg +5 -5
  46. package/src/assets/img/toolbar-action-reminders.svg +10 -10
  47. package/src/assets/img/toolbar-action-rename.svg +7 -7
  48. package/src/assets/img/toolbar-action-saveSequence.svg +5 -5
  49. package/src/assets/img/toolbar-action-send-file.svg +5 -5
  50. package/src/assets/img/toolbar-action-settle.svg +7 -7
  51. package/src/assets/img/toolbar-action-share.svg +5 -5
  52. package/src/assets/img/toolbar-action-submitForApproval.svg +4 -4
  53. package/src/assets/img/toolbar-action-sync.svg +4 -4
  54. package/src/assets/img/toolbar-action-template.svg +6 -6
  55. package/src/assets/img/toolbar-action-workflow.svg +9 -9
@@ -23744,6 +23744,1167 @@ if (false) {
23744
23744
  CommonDialogComponent.prototype.dialogRef;
23745
23745
  }
23746
23746
 
23747
+ /**
23748
+ * @fileoverview added by tsickle
23749
+ * Generated from: lib/smart-popup/index.component.ts
23750
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23751
+ */
23752
+ var SmartPopupComponent = /** @class */ (function () {
23753
+ function SmartPopupComponent(ref) {
23754
+ var _this = this;
23755
+ this.ref = ref;
23756
+ this._placement = "BottomLeft";
23757
+ this._offset = 8;
23758
+ this._autoAdjust = "yes";
23759
+ this.triggerElementRef = null;
23760
+ this.loading = false;
23761
+ this._open = false;
23762
+ this._width = null;
23763
+ this._height = null;
23764
+ this.openChange = new EventEmitter();
23765
+ this.contentLoad = new EventEmitter();
23766
+ this.currentTriggerElement = null;
23767
+ this.FIXED_CONTAINER_ID = "rs-smart-popup-fixed-container";
23768
+ this.opened = "no";
23769
+ this.positioning = "no";
23770
+ this.actualPlacement = "bottom";
23771
+ this.actualPosition = "start";
23772
+ this.onClickOutside = (/**
23773
+ * @param {?} event
23774
+ * @return {?}
23775
+ */
23776
+ function (event) {
23777
+ /** @type {?} */
23778
+ var target = (/** @type {?} */ (event.target));
23779
+ /** @type {?} */
23780
+ var isClickOnTrigger = _this.currentTriggerElement && _this.currentTriggerElement.contains(target);
23781
+ /** @type {?} */
23782
+ var isClickOnPopup = _this.popupElement &&
23783
+ _this.popupElement.nativeElement &&
23784
+ _this.popupElement.nativeElement.contains(target);
23785
+ if (!isClickOnTrigger && !isClickOnPopup) {
23786
+ _this.close();
23787
+ }
23788
+ });
23789
+ this.onWindowScroll = (/**
23790
+ * @return {?}
23791
+ */
23792
+ function () {
23793
+ if (_this.opened === "yes") {
23794
+ _this.updatePopupPosition();
23795
+ }
23796
+ });
23797
+ }
23798
+ Object.defineProperty(SmartPopupComponent.prototype, "placementInfo", {
23799
+ // 解析placement格式
23800
+ get:
23801
+ // 解析placement格式
23802
+ /**
23803
+ * @return {?}
23804
+ */
23805
+ function () {
23806
+ /** @type {?} */
23807
+ var placementMap = {
23808
+ TopLeft: { placement: "top", position: "start" },
23809
+ TopCenter: { placement: "top", position: "center" },
23810
+ TopRight: { placement: "top", position: "end" },
23811
+ BottomLeft: { placement: "bottom", position: "start" },
23812
+ BottomCenter: { placement: "bottom", position: "center" },
23813
+ BottomRight: { placement: "bottom", position: "end" },
23814
+ LeftTop: { placement: "left", position: "start" },
23815
+ LeftCenter: { placement: "left", position: "center" },
23816
+ LeftBottom: { placement: "left", position: "end" },
23817
+ RightTop: { placement: "right", position: "start" },
23818
+ RightCenter: { placement: "right", position: "center" },
23819
+ RightBottom: { placement: "right", position: "end" },
23820
+ };
23821
+ return (placementMap[this._placement] || {
23822
+ placement: "bottom",
23823
+ position: "start",
23824
+ });
23825
+ },
23826
+ enumerable: true,
23827
+ configurable: true
23828
+ });
23829
+ Object.defineProperty(SmartPopupComponent.prototype, "offset", {
23830
+ get: /**
23831
+ * @return {?}
23832
+ */
23833
+ function () {
23834
+ return this._offset || 8;
23835
+ },
23836
+ enumerable: true,
23837
+ configurable: true
23838
+ });
23839
+ Object.defineProperty(SmartPopupComponent.prototype, "autoAdjust", {
23840
+ get: /**
23841
+ * @return {?}
23842
+ */
23843
+ function () {
23844
+ return this._autoAdjust === "yes";
23845
+ },
23846
+ enumerable: true,
23847
+ configurable: true
23848
+ });
23849
+ /**
23850
+ * @return {?}
23851
+ */
23852
+ SmartPopupComponent.prototype.ngAfterViewInit = /**
23853
+ * @return {?}
23854
+ */
23855
+ function () {
23856
+ var _this = this;
23857
+ this.fixedContainerEl = this.getFixedContainer();
23858
+ this.fixedContainerEl.append(this.popupElement.nativeElement);
23859
+ this.updateTriggerElement();
23860
+ // 如果提供了固定尺寸,立即应用
23861
+ if (this._width !== null &&
23862
+ this._height !== null &&
23863
+ this.popupElement &&
23864
+ this.popupElement.nativeElement) {
23865
+ /** @type {?} */
23866
+ var popupEl = this.popupElement.nativeElement;
23867
+ popupEl.style.width = this._width + "px";
23868
+ popupEl.style.height = this._height + "px";
23869
+ popupEl.style.minWidth = this._width + "px";
23870
+ popupEl.style.maxWidth = this._width + "px";
23871
+ popupEl.style.minHeight = this._height + "px";
23872
+ popupEl.style.maxHeight = this._height + "px";
23873
+ }
23874
+ // 如果外部传入 open 属性为 true,自动打开
23875
+ if (this._open) {
23876
+ setTimeout((/**
23877
+ * @return {?}
23878
+ */
23879
+ function () { return _this.open(); }), 0);
23880
+ }
23881
+ };
23882
+ /**
23883
+ * @param {?} changes
23884
+ * @return {?}
23885
+ */
23886
+ SmartPopupComponent.prototype.ngOnChanges = /**
23887
+ * @param {?} changes
23888
+ * @return {?}
23889
+ */
23890
+ function (changes) {
23891
+ var _this = this;
23892
+ // 处理固定尺寸变化
23893
+ if ((changes._width || changes._height) &&
23894
+ this.popupElement &&
23895
+ this.popupElement.nativeElement) {
23896
+ /** @type {?} */
23897
+ var popupEl = this.popupElement.nativeElement;
23898
+ if (this._width !== null) {
23899
+ popupEl.style.width = this._width + "px";
23900
+ popupEl.style.minWidth = this._width + "px";
23901
+ popupEl.style.maxWidth = this._width + "px";
23902
+ }
23903
+ if (this._height !== null) {
23904
+ popupEl.style.height = this._height + "px";
23905
+ popupEl.style.minHeight = this._height + "px";
23906
+ popupEl.style.maxHeight = this._height + "px";
23907
+ }
23908
+ }
23909
+ // 先处理触发元素变化(确保在打开前更新触发元素)
23910
+ if (changes.triggerElementRef) {
23911
+ /** @type {?} */
23912
+ var previousTrigger = this.currentTriggerElement;
23913
+ this.updateTriggerElement();
23914
+ // 如果弹窗已经打开,且触发元素发生了变化,立即更新位置
23915
+ if (this.opened === "yes" &&
23916
+ previousTrigger !== this.currentTriggerElement &&
23917
+ this.currentTriggerElement) {
23918
+ // 使用新的打开方式更新位置
23919
+ this.positioning = "yes";
23920
+ this.ref.markForCheck();
23921
+ requestAnimationFrame((/**
23922
+ * @return {?}
23923
+ */
23924
+ function () {
23925
+ requestAnimationFrame((/**
23926
+ * @return {?}
23927
+ */
23928
+ function () {
23929
+ _this.updatePopupPosition();
23930
+ _this.positioning = "no";
23931
+ _this.ref.markForCheck();
23932
+ }));
23933
+ }));
23934
+ }
23935
+ }
23936
+ // 处理 open 变化(确保在触发元素更新后处理)
23937
+ if (changes._open) {
23938
+ if (this._open && this.opened === "no") {
23939
+ // 确保触发元素已更新
23940
+ this.updateTriggerElement();
23941
+ // 使用 setTimeout 确保所有变更都已处理
23942
+ setTimeout((/**
23943
+ * @return {?}
23944
+ */
23945
+ function () {
23946
+ // 再次确保触发元素已更新
23947
+ _this.updateTriggerElement();
23948
+ _this.open();
23949
+ }), 0);
23950
+ }
23951
+ else if (!this._open && this.opened === "yes") {
23952
+ this.close();
23953
+ }
23954
+ }
23955
+ // 当加载完成时,更新位置(如果提供了固定尺寸,不需要更新位置)
23956
+ if (changes.loading &&
23957
+ !changes.loading.currentValue &&
23958
+ changes.loading.previousValue) {
23959
+ if (this.opened === "yes") {
23960
+ // 如果提供了固定尺寸,位置已经计算好了,不需要更新
23961
+ if (this._width !== null && this._height !== null) {
23962
+ this.contentLoad.emit();
23963
+ }
23964
+ else {
23965
+ // 如果正在定位,不需要更新位置
23966
+ if (this.positioning === "no") {
23967
+ requestAnimationFrame((/**
23968
+ * @return {?}
23969
+ */
23970
+ function () {
23971
+ _this.updatePopupPosition();
23972
+ _this.contentLoad.emit();
23973
+ }));
23974
+ }
23975
+ else {
23976
+ // 如果正在定位,等待定位完成后再触发事件
23977
+ /** @type {?} */
23978
+ var checkPositioning_1 = (/**
23979
+ * @return {?}
23980
+ */
23981
+ function () {
23982
+ if (_this.positioning === "no") {
23983
+ _this.contentLoad.emit();
23984
+ }
23985
+ else {
23986
+ setTimeout(checkPositioning_1, 10);
23987
+ }
23988
+ });
23989
+ checkPositioning_1();
23990
+ }
23991
+ }
23992
+ }
23993
+ }
23994
+ };
23995
+ /**
23996
+ * @return {?}
23997
+ */
23998
+ SmartPopupComponent.prototype.ngOnDestroy = /**
23999
+ * @return {?}
24000
+ */
24001
+ function () {
24002
+ if (this.popupElement && this.popupElement.nativeElement) {
24003
+ this.popupElement.nativeElement.remove();
24004
+ }
24005
+ window.removeEventListener("click", this.onClickOutside);
24006
+ window.removeEventListener("scroll", this.onWindowScroll, true);
24007
+ };
24008
+ /**
24009
+ * @return {?}
24010
+ */
24011
+ SmartPopupComponent.prototype.updateTriggerElement = /**
24012
+ * @return {?}
24013
+ */
24014
+ function () {
24015
+ if (this.triggerElementRef) {
24016
+ this.currentTriggerElement = this.triggerElementRef;
24017
+ }
24018
+ else if (this.internalTriggerElement &&
24019
+ this.internalTriggerElement.nativeElement) {
24020
+ this.currentTriggerElement = this.internalTriggerElement.nativeElement;
24021
+ }
24022
+ else {
24023
+ this.currentTriggerElement = null;
24024
+ }
24025
+ };
24026
+ /**
24027
+ * @return {?}
24028
+ */
24029
+ SmartPopupComponent.prototype.getFixedContainer = /**
24030
+ * @return {?}
24031
+ */
24032
+ function () {
24033
+ /** @type {?} */
24034
+ var containerElement = document.getElementById(this.FIXED_CONTAINER_ID);
24035
+ if (!containerElement) {
24036
+ containerElement = document.createElement("div");
24037
+ containerElement.setAttribute("id", this.FIXED_CONTAINER_ID);
24038
+ document.body.append(containerElement);
24039
+ }
24040
+ return containerElement;
24041
+ };
24042
+ /**
24043
+ * @param {?=} triggerElement
24044
+ * @return {?}
24045
+ */
24046
+ SmartPopupComponent.prototype.open = /**
24047
+ * @param {?=} triggerElement
24048
+ * @return {?}
24049
+ */
24050
+ function (triggerElement) {
24051
+ var _this = this;
24052
+ // 如果传入了触发元素,使用它
24053
+ if (triggerElement) {
24054
+ this.currentTriggerElement = triggerElement;
24055
+ }
24056
+ else {
24057
+ this.updateTriggerElement();
24058
+ }
24059
+ if (!this.currentTriggerElement) {
24060
+ console.warn("SmartPopupComponent: No trigger element found");
24061
+ return;
24062
+ }
24063
+ // 如果已经打开,先关闭再打开(更新位置)
24064
+ if (this.opened === "yes") {
24065
+ // 先关闭弹窗
24066
+ this.opened = "no";
24067
+ this.positioning = "no";
24068
+ this.ref.markForCheck();
24069
+ // 立即在新位置打开
24070
+ requestAnimationFrame((/**
24071
+ * @return {?}
24072
+ */
24073
+ function () {
24074
+ // 再次确保触发元素已更新
24075
+ _this.updateTriggerElement();
24076
+ _this.openPopup();
24077
+ }));
24078
+ return;
24079
+ }
24080
+ // 确保触发元素已更新
24081
+ this.updateTriggerElement();
24082
+ this.openPopup();
24083
+ };
24084
+ /**
24085
+ * @private
24086
+ * @return {?}
24087
+ */
24088
+ SmartPopupComponent.prototype.openPopup = /**
24089
+ * @private
24090
+ * @return {?}
24091
+ */
24092
+ function () {
24093
+ var _this = this;
24094
+ // 再次确保触发元素已更新
24095
+ this.updateTriggerElement();
24096
+ if (!this.currentTriggerElement) {
24097
+ console.warn("SmartPopupComponent: No trigger element found when opening popup");
24098
+ return;
24099
+ }
24100
+ // 如果提供了固定尺寸,可以在打开前就计算好位置
24101
+ if (this._width !== null && this._height !== null) {
24102
+ // 先计算位置(不依赖DOM渲染,直接根据triggerElement计算)
24103
+ /** @type {?} */
24104
+ var triggerRect = this.currentTriggerElement.getBoundingClientRect();
24105
+ /** @type {?} */
24106
+ var viewportWidth = window.innerWidth;
24107
+ /** @type {?} */
24108
+ var viewportHeight = window.innerHeight;
24109
+ /** @type {?} */
24110
+ var popupSize = {
24111
+ width: this._width,
24112
+ height: this._height,
24113
+ };
24114
+ /** @type {?} */
24115
+ var popupRect = (/** @type {?} */ ({
24116
+ width: popupSize.width,
24117
+ height: popupSize.height,
24118
+ top: 0,
24119
+ left: 0,
24120
+ right: popupSize.width,
24121
+ bottom: popupSize.height,
24122
+ x: 0,
24123
+ y: 0,
24124
+ toJSON: (/**
24125
+ * @return {?}
24126
+ */
24127
+ function () { return ({}); }),
24128
+ }));
24129
+ /** @type {?} */
24130
+ var targetInfo = this.placementInfo;
24131
+ /** @type {?} */
24132
+ var finalPlacement = targetInfo.placement;
24133
+ /** @type {?} */
24134
+ var finalPosition = targetInfo.position;
24135
+ if (this.autoAdjust) {
24136
+ /** @type {?} */
24137
+ var optimal = this.calculateOptimalPlacement(triggerRect, popupRect, viewportWidth, viewportHeight);
24138
+ finalPlacement = optimal.placement;
24139
+ finalPosition = optimal.position;
24140
+ }
24141
+ this.actualPlacement = finalPlacement;
24142
+ this.actualPosition = finalPosition;
24143
+ // 计算位置坐标(不依赖DOM,直接计算)
24144
+ /** @type {?} */
24145
+ var position_1 = this.calculatePositionCoordinates(triggerRect, finalPlacement, finalPosition, popupSize);
24146
+ // 先设置打开状态,但保持隐藏(positioning = yes)
24147
+ this.opened = "yes";
24148
+ this.positioning = "yes";
24149
+ this.openChange.emit(true);
24150
+ this.ref.markForCheck();
24151
+ // 强制更新视图,确保DOM已更新
24152
+ this.ref.detectChanges();
24153
+ // 如果元素已经存在,立即设置位置(不等待 requestAnimationFrame)
24154
+ if (this.popupElement && this.popupElement.nativeElement) {
24155
+ /** @type {?} */
24156
+ var popupEl = this.popupElement.nativeElement;
24157
+ // 立即设置尺寸和位置
24158
+ popupEl.style.width = this._width + "px";
24159
+ popupEl.style.height = this._height + "px";
24160
+ popupEl.style.minWidth = this._width + "px";
24161
+ popupEl.style.maxWidth = this._width + "px";
24162
+ popupEl.style.minHeight = this._height + "px";
24163
+ popupEl.style.maxHeight = this._height + "px";
24164
+ popupEl.style.top = position_1.top;
24165
+ popupEl.style.left = position_1.left;
24166
+ popupEl.style.transform = "translate(" + position_1.translateX + ", " + position_1.translateY + ")";
24167
+ // 强制同步应用样式
24168
+ popupEl.offsetHeight;
24169
+ // 位置设置完成后,立即显示弹窗
24170
+ this.positioning = "no";
24171
+ this.ref.markForCheck();
24172
+ }
24173
+ else {
24174
+ // 如果元素还不存在,等待渲染
24175
+ requestAnimationFrame((/**
24176
+ * @return {?}
24177
+ */
24178
+ function () {
24179
+ if (_this.popupElement && _this.popupElement.nativeElement) {
24180
+ /** @type {?} */
24181
+ var popupEl = _this.popupElement.nativeElement;
24182
+ // 立即设置尺寸和位置
24183
+ popupEl.style.width = _this._width + "px";
24184
+ popupEl.style.height = _this._height + "px";
24185
+ popupEl.style.minWidth = _this._width + "px";
24186
+ popupEl.style.maxWidth = _this._width + "px";
24187
+ popupEl.style.minHeight = _this._height + "px";
24188
+ popupEl.style.maxHeight = _this._height + "px";
24189
+ popupEl.style.top = position_1.top;
24190
+ popupEl.style.left = position_1.left;
24191
+ popupEl.style.transform = "translate(" + position_1.translateX + ", " + position_1.translateY + ")";
24192
+ // 强制同步应用样式
24193
+ popupEl.offsetHeight;
24194
+ // 位置设置完成后,立即显示弹窗
24195
+ _this.positioning = "no";
24196
+ _this.ref.markForCheck();
24197
+ }
24198
+ }));
24199
+ }
24200
+ }
24201
+ else {
24202
+ // 没有固定尺寸,需要等待DOM渲染
24203
+ this.positioning = "yes";
24204
+ this.ref.markForCheck();
24205
+ // 立即强制更新视图,确保DOM已更新
24206
+ this.ref.detectChanges();
24207
+ // 使用 requestAnimationFrame 确保在浏览器渲染之前更新位置
24208
+ requestAnimationFrame((/**
24209
+ * @return {?}
24210
+ */
24211
+ function () {
24212
+ // 确保元素已渲染并获取尺寸
24213
+ if (_this.popupElement && _this.popupElement.nativeElement) {
24214
+ // 强制重新计算布局,确保元素尺寸已计算
24215
+ _this.popupElement.nativeElement.offsetHeight;
24216
+ // 计算并设置位置
24217
+ _this.updatePopupPosition();
24218
+ // 位置设置完成后,移除定位状态,显示弹窗
24219
+ _this.positioning = "no";
24220
+ _this.ref.markForCheck();
24221
+ }
24222
+ }));
24223
+ }
24224
+ window.addEventListener("click", this.onClickOutside);
24225
+ window.addEventListener("scroll", this.onWindowScroll, true);
24226
+ };
24227
+ /**
24228
+ * @return {?}
24229
+ */
24230
+ SmartPopupComponent.prototype.close = /**
24231
+ * @return {?}
24232
+ */
24233
+ function () {
24234
+ if (this.opened === "no") {
24235
+ return;
24236
+ }
24237
+ this.opened = "no";
24238
+ this.positioning = "no";
24239
+ this.openChange.emit(false);
24240
+ window.removeEventListener("click", this.onClickOutside);
24241
+ window.removeEventListener("scroll", this.onWindowScroll, true);
24242
+ this.ref.markForCheck();
24243
+ };
24244
+ /**
24245
+ * @return {?}
24246
+ */
24247
+ SmartPopupComponent.prototype.toggle = /**
24248
+ * @return {?}
24249
+ */
24250
+ function () {
24251
+ if (this.opened === "yes") {
24252
+ this.close();
24253
+ }
24254
+ else {
24255
+ this.open();
24256
+ }
24257
+ };
24258
+ /**
24259
+ * @param {?} event
24260
+ * @return {?}
24261
+ */
24262
+ SmartPopupComponent.prototype.onClickTrigger = /**
24263
+ * @param {?} event
24264
+ * @return {?}
24265
+ */
24266
+ function (event) {
24267
+ event.stopPropagation();
24268
+ this.toggle();
24269
+ };
24270
+ // 计算并设置位置(支持固定尺寸,可在打开前调用)
24271
+ // 计算并设置位置(支持固定尺寸,可在打开前调用)
24272
+ /**
24273
+ * @private
24274
+ * @return {?}
24275
+ */
24276
+ SmartPopupComponent.prototype.calculateAndSetPosition =
24277
+ // 计算并设置位置(支持固定尺寸,可在打开前调用)
24278
+ /**
24279
+ * @private
24280
+ * @return {?}
24281
+ */
24282
+ function () {
24283
+ var _this = this;
24284
+ if (!this.currentTriggerElement) {
24285
+ return;
24286
+ }
24287
+ /** @type {?} */
24288
+ var triggerRect = this.currentTriggerElement.getBoundingClientRect();
24289
+ /** @type {?} */
24290
+ var viewportWidth = window.innerWidth;
24291
+ /** @type {?} */
24292
+ var viewportHeight = window.innerHeight;
24293
+ // 获取弹窗尺寸(优先使用固定尺寸)
24294
+ /** @type {?} */
24295
+ var popupSize = {
24296
+ width: this._width !== null
24297
+ ? this._width
24298
+ : this.popupElement && this.popupElement.nativeElement
24299
+ ? this.popupElement.nativeElement.offsetWidth
24300
+ : 300,
24301
+ height: this._height !== null
24302
+ ? this._height
24303
+ : this.popupElement && this.popupElement.nativeElement
24304
+ ? this.popupElement.nativeElement.offsetHeight
24305
+ : 200,
24306
+ };
24307
+ // 创建虚拟的 popupRect(用于计算)
24308
+ /** @type {?} */
24309
+ var popupRect = (/** @type {?} */ ({
24310
+ width: popupSize.width,
24311
+ height: popupSize.height,
24312
+ top: 0,
24313
+ left: 0,
24314
+ right: popupSize.width,
24315
+ bottom: popupSize.height,
24316
+ x: 0,
24317
+ y: 0,
24318
+ toJSON: (/**
24319
+ * @return {?}
24320
+ */
24321
+ function () { return ({}); }),
24322
+ }));
24323
+ // 获取目标位置信息
24324
+ /** @type {?} */
24325
+ var targetInfo = this.placementInfo;
24326
+ /** @type {?} */
24327
+ var finalPlacement = targetInfo.placement;
24328
+ /** @type {?} */
24329
+ var finalPosition = targetInfo.position;
24330
+ if (this.autoAdjust) {
24331
+ /** @type {?} */
24332
+ var optimal = this.calculateOptimalPlacement(triggerRect, popupRect, viewportWidth, viewportHeight);
24333
+ finalPlacement = optimal.placement;
24334
+ finalPosition = optimal.position;
24335
+ }
24336
+ this.actualPlacement = finalPlacement;
24337
+ this.actualPosition = finalPosition;
24338
+ // 立即设置位置(即使元素还没完全渲染,也要先设置位置)
24339
+ if (this.popupElement && this.popupElement.nativeElement) {
24340
+ this.setPopupPosition(triggerRect, popupRect, finalPlacement, finalPosition, popupSize);
24341
+ // 强制应用样式,确保位置立即生效
24342
+ this.ref.detectChanges();
24343
+ }
24344
+ else {
24345
+ // 如果元素还不存在,延迟设置位置
24346
+ setTimeout((/**
24347
+ * @return {?}
24348
+ */
24349
+ function () {
24350
+ if (_this.popupElement && _this.popupElement.nativeElement) {
24351
+ _this.setPopupPosition(triggerRect, popupRect, finalPlacement, finalPosition, popupSize);
24352
+ _this.ref.detectChanges();
24353
+ }
24354
+ }), 0);
24355
+ }
24356
+ this.ref.markForCheck();
24357
+ };
24358
+ /**
24359
+ * @return {?}
24360
+ */
24361
+ SmartPopupComponent.prototype.updatePopupPosition = /**
24362
+ * @return {?}
24363
+ */
24364
+ function () {
24365
+ if (!this.currentTriggerElement ||
24366
+ !this.popupElement ||
24367
+ !this.popupElement.nativeElement) {
24368
+ return;
24369
+ }
24370
+ // 如果提供了固定尺寸,使用固定尺寸计算
24371
+ if (this._width !== null && this._height !== null) {
24372
+ this.calculateAndSetPosition();
24373
+ return;
24374
+ }
24375
+ /** @type {?} */
24376
+ var triggerRect = this.currentTriggerElement.getBoundingClientRect();
24377
+ /** @type {?} */
24378
+ var popupRect = this.popupElement.nativeElement.getBoundingClientRect();
24379
+ /** @type {?} */
24380
+ var viewportWidth = window.innerWidth;
24381
+ /** @type {?} */
24382
+ var viewportHeight = window.innerHeight;
24383
+ // 获取目标位置信息
24384
+ /** @type {?} */
24385
+ var targetInfo = this.placementInfo;
24386
+ /** @type {?} */
24387
+ var finalPlacement = targetInfo.placement;
24388
+ /** @type {?} */
24389
+ var finalPosition = targetInfo.position;
24390
+ if (this.autoAdjust) {
24391
+ /** @type {?} */
24392
+ var optimal = this.calculateOptimalPlacement(triggerRect, popupRect, viewportWidth, viewportHeight);
24393
+ finalPlacement = optimal.placement;
24394
+ finalPosition = optimal.position;
24395
+ }
24396
+ this.actualPlacement = finalPlacement;
24397
+ this.actualPosition = finalPosition;
24398
+ this.setPopupPosition(triggerRect, popupRect, finalPlacement, finalPosition);
24399
+ this.ref.markForCheck();
24400
+ };
24401
+ /**
24402
+ * @param {?} triggerRect
24403
+ * @param {?} popupRect
24404
+ * @param {?} viewportWidth
24405
+ * @param {?} viewportHeight
24406
+ * @return {?}
24407
+ */
24408
+ SmartPopupComponent.prototype.calculateOptimalPlacement = /**
24409
+ * @param {?} triggerRect
24410
+ * @param {?} popupRect
24411
+ * @param {?} viewportWidth
24412
+ * @param {?} viewportHeight
24413
+ * @return {?}
24414
+ */
24415
+ function (triggerRect, popupRect, viewportWidth, viewportHeight) {
24416
+ var e_1, _a;
24417
+ var _this = this;
24418
+ /** @type {?} */
24419
+ var targetInfo = this.placementInfo;
24420
+ /** @type {?} */
24421
+ var preferred = targetInfo.placement;
24422
+ /** @type {?} */
24423
+ var preferredPosition = targetInfo.position;
24424
+ /** @type {?} */
24425
+ var space = {
24426
+ top: triggerRect.top,
24427
+ bottom: viewportHeight - triggerRect.bottom,
24428
+ left: triggerRect.left,
24429
+ right: viewportWidth - triggerRect.right,
24430
+ };
24431
+ /** @type {?} */
24432
+ var popupSize = {
24433
+ width: popupRect.width || 300,
24434
+ // 默认宽度,如果还没有渲染
24435
+ height: popupRect.height || 200,
24436
+ };
24437
+ // 检查首选位置是否有足够空间
24438
+ /** @type {?} */
24439
+ var hasEnoughSpace = (/**
24440
+ * @param {?} placement
24441
+ * @return {?}
24442
+ */
24443
+ function (placement) {
24444
+ switch (placement) {
24445
+ case "top":
24446
+ return space.top >= popupSize.height + _this.offset;
24447
+ case "bottom":
24448
+ return space.bottom >= popupSize.height + _this.offset;
24449
+ case "left":
24450
+ return space.left >= popupSize.width + _this.offset;
24451
+ case "right":
24452
+ return space.right >= popupSize.width + _this.offset;
24453
+ }
24454
+ });
24455
+ // 检查指定位置是否有足够空间
24456
+ /** @type {?} */
24457
+ var checkPositionSpace = (/**
24458
+ * @param {?} placement
24459
+ * @param {?} position
24460
+ * @return {?}
24461
+ */
24462
+ function (placement, position) {
24463
+ if (placement === "top" || placement === "bottom") {
24464
+ // 对于上下位置,检查水平对齐空间
24465
+ /** @type {?} */
24466
+ var popupWidth = popupSize.width;
24467
+ /** @type {?} */
24468
+ var spaceLeft = triggerRect.left;
24469
+ /** @type {?} */
24470
+ var spaceRight = viewportWidth - triggerRect.right;
24471
+ if (position === "center") {
24472
+ return spaceLeft >= popupWidth / 2 && spaceRight >= popupWidth / 2;
24473
+ }
24474
+ else if (position === "start") {
24475
+ return spaceLeft >= popupWidth;
24476
+ }
24477
+ else {
24478
+ // end
24479
+ return spaceRight >= popupWidth;
24480
+ }
24481
+ }
24482
+ else {
24483
+ // 对于左右位置,检查垂直对齐空间
24484
+ /** @type {?} */
24485
+ var popupHeight = popupSize.height;
24486
+ /** @type {?} */
24487
+ var spaceTop = triggerRect.top;
24488
+ /** @type {?} */
24489
+ var spaceBottom = viewportHeight - triggerRect.bottom;
24490
+ if (position === "center") {
24491
+ return spaceTop >= popupHeight / 2 && spaceBottom >= popupHeight / 2;
24492
+ }
24493
+ else if (position === "start") {
24494
+ return spaceTop >= popupHeight;
24495
+ }
24496
+ else {
24497
+ // end
24498
+ return spaceBottom >= popupHeight;
24499
+ }
24500
+ }
24501
+ });
24502
+ // 计算位置是否合适(考虑水平/垂直对齐)
24503
+ /** @type {?} */
24504
+ var calculatePosition = (/**
24505
+ * @param {?} placement
24506
+ * @return {?}
24507
+ */
24508
+ function (placement) {
24509
+ if (placement === "top" || placement === "bottom") {
24510
+ // 对于上下位置,检查水平对齐
24511
+ /** @type {?} */
24512
+ var popupWidth = popupSize.width;
24513
+ /** @type {?} */
24514
+ var spaceLeft = triggerRect.left;
24515
+ /** @type {?} */
24516
+ var spaceRight = viewportWidth - triggerRect.right;
24517
+ // 优先尝试使用用户指定的position
24518
+ if (checkPositionSpace(placement, preferredPosition)) {
24519
+ return preferredPosition;
24520
+ }
24521
+ // 如果中心对齐有足够空间,优先使用中心
24522
+ if (spaceLeft >= popupWidth / 2 && spaceRight >= popupWidth / 2) {
24523
+ return "center";
24524
+ }
24525
+ // 如果左侧空间不足,使用右对齐
24526
+ if (spaceLeft < popupWidth / 2) {
24527
+ return "end";
24528
+ }
24529
+ // 如果右侧空间不足,使用左对齐
24530
+ if (spaceRight < popupWidth / 2) {
24531
+ return "start";
24532
+ }
24533
+ return preferredPosition;
24534
+ }
24535
+ else {
24536
+ // 对于左右位置,检查垂直对齐
24537
+ /** @type {?} */
24538
+ var popupHeight = popupSize.height;
24539
+ /** @type {?} */
24540
+ var spaceTop = triggerRect.top;
24541
+ /** @type {?} */
24542
+ var spaceBottom = viewportHeight - triggerRect.bottom;
24543
+ // 优先尝试使用用户指定的position
24544
+ if (checkPositionSpace(placement, preferredPosition)) {
24545
+ return preferredPosition;
24546
+ }
24547
+ // 如果中心对齐有足够空间,优先使用中心
24548
+ if (spaceTop >= popupHeight / 2 && spaceBottom >= popupHeight / 2) {
24549
+ return "center";
24550
+ }
24551
+ // 如果上方空间不足,使用下对齐
24552
+ if (spaceTop < popupHeight / 2) {
24553
+ return "end";
24554
+ }
24555
+ // 如果下方空间不足,使用上对齐
24556
+ if (spaceBottom < popupHeight / 2) {
24557
+ return "start";
24558
+ }
24559
+ return preferredPosition;
24560
+ }
24561
+ });
24562
+ // 如果首选位置有足够空间,优先使用用户指定的position
24563
+ if (hasEnoughSpace(preferred)) {
24564
+ // 检查用户指定的position是否有足够空间
24565
+ if (checkPositionSpace(preferred, preferredPosition)) {
24566
+ return {
24567
+ placement: preferred,
24568
+ position: preferredPosition,
24569
+ };
24570
+ }
24571
+ // 如果指定的position空间不足,自动计算最佳position
24572
+ return {
24573
+ placement: preferred,
24574
+ position: calculatePosition(preferred),
24575
+ };
24576
+ }
24577
+ // 根据首选位置选择备选位置
24578
+ /** @type {?} */
24579
+ var alternatives = {
24580
+ bottom: ["top", "right", "left"],
24581
+ top: ["bottom", "right", "left"],
24582
+ right: ["left", "bottom", "top"],
24583
+ left: ["right", "bottom", "top"],
24584
+ };
24585
+ /** @type {?} */
24586
+ var altList = alternatives[preferred] || [];
24587
+ try {
24588
+ // 尝试找到第一个有足够空间的备选位置
24589
+ for (var altList_1 = __values(altList), altList_1_1 = altList_1.next(); !altList_1_1.done; altList_1_1 = altList_1.next()) {
24590
+ var alt = altList_1_1.value;
24591
+ if (hasEnoughSpace(alt)) {
24592
+ return {
24593
+ placement: alt,
24594
+ position: calculatePosition(alt),
24595
+ };
24596
+ }
24597
+ }
24598
+ }
24599
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
24600
+ finally {
24601
+ try {
24602
+ if (altList_1_1 && !altList_1_1.done && (_a = altList_1.return)) _a.call(altList_1);
24603
+ }
24604
+ finally { if (e_1) throw e_1.error; }
24605
+ }
24606
+ // 如果都没有足够空间,选择空间最大的位置
24607
+ /** @type {?} */
24608
+ var maxSpace = Math.max(space.top, space.bottom, space.left, space.right);
24609
+ /** @type {?} */
24610
+ var bestPlacement;
24611
+ if (maxSpace === space.top)
24612
+ bestPlacement = "top";
24613
+ else if (maxSpace === space.bottom)
24614
+ bestPlacement = "bottom";
24615
+ else if (maxSpace === space.left)
24616
+ bestPlacement = "left";
24617
+ else
24618
+ bestPlacement = "right";
24619
+ return {
24620
+ placement: bestPlacement,
24621
+ position: calculatePosition(bestPlacement),
24622
+ };
24623
+ };
24624
+ // 计算位置坐标(纯计算,不依赖DOM,包含边界约束)
24625
+ // 计算位置坐标(纯计算,不依赖DOM,包含边界约束)
24626
+ /**
24627
+ * @private
24628
+ * @param {?} triggerRect
24629
+ * @param {?} placement
24630
+ * @param {?} position
24631
+ * @param {?} popupSize
24632
+ * @return {?}
24633
+ */
24634
+ SmartPopupComponent.prototype.calculatePositionCoordinates =
24635
+ // 计算位置坐标(纯计算,不依赖DOM,包含边界约束)
24636
+ /**
24637
+ * @private
24638
+ * @param {?} triggerRect
24639
+ * @param {?} placement
24640
+ * @param {?} position
24641
+ * @param {?} popupSize
24642
+ * @return {?}
24643
+ */
24644
+ function (triggerRect, placement, position, popupSize) {
24645
+ /** @type {?} */
24646
+ var triggerWidth = triggerRect.width;
24647
+ /** @type {?} */
24648
+ var triggerHeight = triggerRect.height;
24649
+ /** @type {?} */
24650
+ var viewportWidth = window.innerWidth;
24651
+ /** @type {?} */
24652
+ var viewportHeight = window.innerHeight;
24653
+ /** @type {?} */
24654
+ var scrollX = window.scrollX;
24655
+ /** @type {?} */
24656
+ var scrollY = window.scrollY;
24657
+ /** @type {?} */
24658
+ var top = 0;
24659
+ /** @type {?} */
24660
+ var left = 0;
24661
+ /** @type {?} */
24662
+ var translateX = "0";
24663
+ /** @type {?} */
24664
+ var translateY = "0";
24665
+ switch (placement) {
24666
+ case "top":
24667
+ top = triggerRect.top + scrollY - this.offset;
24668
+ translateY = "-100%";
24669
+ if (position === "start") {
24670
+ left = triggerRect.left + scrollX;
24671
+ }
24672
+ else if (position === "center") {
24673
+ left = triggerRect.left + scrollX + triggerWidth / 2;
24674
+ translateX = "-50%";
24675
+ }
24676
+ else {
24677
+ left = triggerRect.left + scrollX + triggerWidth;
24678
+ translateX = "-100%";
24679
+ }
24680
+ // 边界约束:确保弹窗不超出视口
24681
+ if (top - popupSize.height < scrollY) {
24682
+ top = scrollY + 8; // 距离顶部至少8px
24683
+ }
24684
+ if (left < scrollX) {
24685
+ left = scrollX + 8;
24686
+ translateX = "0";
24687
+ }
24688
+ else if (left + popupSize.width > scrollX + viewportWidth) {
24689
+ left = scrollX + viewportWidth - popupSize.width - 8;
24690
+ translateX = "0";
24691
+ }
24692
+ break;
24693
+ case "bottom":
24694
+ top = triggerRect.bottom + scrollY + this.offset;
24695
+ if (position === "start") {
24696
+ left = triggerRect.left + scrollX;
24697
+ }
24698
+ else if (position === "center") {
24699
+ left = triggerRect.left + scrollX + triggerWidth / 2;
24700
+ translateX = "-50%";
24701
+ }
24702
+ else {
24703
+ left = triggerRect.left + scrollX + triggerWidth;
24704
+ translateX = "-100%";
24705
+ }
24706
+ // 边界约束:确保弹窗不超出视口
24707
+ if (top + popupSize.height > scrollY + viewportHeight) {
24708
+ top = scrollY + viewportHeight - popupSize.height - 8; // 距离底部至少8px
24709
+ }
24710
+ if (left < scrollX) {
24711
+ left = scrollX + 8;
24712
+ translateX = "0";
24713
+ }
24714
+ else if (left + popupSize.width > scrollX + viewportWidth) {
24715
+ left = scrollX + viewportWidth - popupSize.width - 8;
24716
+ translateX = "0";
24717
+ }
24718
+ break;
24719
+ case "left":
24720
+ left = triggerRect.left + scrollX - this.offset;
24721
+ translateX = "-100%";
24722
+ if (position === "start") {
24723
+ top = triggerRect.top + scrollY;
24724
+ }
24725
+ else if (position === "center") {
24726
+ top = triggerRect.top + scrollY + triggerHeight / 2;
24727
+ translateY = "-50%";
24728
+ }
24729
+ else {
24730
+ top = triggerRect.top + scrollY + triggerHeight;
24731
+ translateY = "-100%";
24732
+ }
24733
+ // 边界约束:确保弹窗不超出视口
24734
+ if (left - popupSize.width < scrollX) {
24735
+ left = scrollX + 8; // 距离左侧至少8px
24736
+ }
24737
+ if (top < scrollY) {
24738
+ top = scrollY + 8;
24739
+ translateY = "0";
24740
+ }
24741
+ else if (top + popupSize.height > scrollY + viewportHeight) {
24742
+ top = scrollY + viewportHeight - popupSize.height - 8;
24743
+ translateY = "0";
24744
+ }
24745
+ break;
24746
+ case "right":
24747
+ left = triggerRect.right + scrollX + this.offset;
24748
+ if (position === "start") {
24749
+ top = triggerRect.top + scrollY;
24750
+ }
24751
+ else if (position === "center") {
24752
+ top = triggerRect.top + scrollY + triggerHeight / 2;
24753
+ translateY = "-50%";
24754
+ }
24755
+ else {
24756
+ top = triggerRect.top + scrollY + triggerHeight;
24757
+ translateY = "-100%";
24758
+ }
24759
+ // 边界约束:确保弹窗不超出视口
24760
+ if (left + popupSize.width > scrollX + viewportWidth) {
24761
+ left = scrollX + viewportWidth - popupSize.width - 8; // 距离右侧至少8px
24762
+ }
24763
+ if (top < scrollY) {
24764
+ top = scrollY + 8;
24765
+ translateY = "0";
24766
+ }
24767
+ else if (top + popupSize.height > scrollY + viewportHeight) {
24768
+ top = scrollY + viewportHeight - popupSize.height - 8;
24769
+ translateY = "0";
24770
+ }
24771
+ break;
24772
+ }
24773
+ return {
24774
+ top: top + "px",
24775
+ left: left + "px",
24776
+ translateX: translateX,
24777
+ translateY: translateY,
24778
+ };
24779
+ };
24780
+ /**
24781
+ * @param {?} triggerRect
24782
+ * @param {?} popupRect
24783
+ * @param {?} placement
24784
+ * @param {?} position
24785
+ * @param {?=} popupSize
24786
+ * @return {?}
24787
+ */
24788
+ SmartPopupComponent.prototype.setPopupPosition = /**
24789
+ * @param {?} triggerRect
24790
+ * @param {?} popupRect
24791
+ * @param {?} placement
24792
+ * @param {?} position
24793
+ * @param {?=} popupSize
24794
+ * @return {?}
24795
+ */
24796
+ function (triggerRect, popupRect, placement, position, popupSize) {
24797
+ /** @type {?} */
24798
+ var popupEl = this.popupElement && this.popupElement.nativeElement
24799
+ ? this.popupElement.nativeElement
24800
+ : null;
24801
+ if (!popupEl) {
24802
+ return; // 如果元素还不存在,无法设置位置
24803
+ }
24804
+ // 优先使用传入的固定尺寸,否则从DOM获取
24805
+ /** @type {?} */
24806
+ var popupWidth = popupSize && popupSize.width !== null && popupSize.width !== undefined
24807
+ ? popupSize.width
24808
+ : popupRect.width || popupEl.offsetWidth || 300;
24809
+ /** @type {?} */
24810
+ var popupHeight = popupSize && popupSize.height !== null && popupSize.height !== undefined
24811
+ ? popupSize.height
24812
+ : popupRect.height || popupEl.offsetHeight || 200;
24813
+ /** @type {?} */
24814
+ var coordinates = this.calculatePositionCoordinates(triggerRect, placement, position, { width: popupWidth, height: popupHeight });
24815
+ popupEl.style.top = coordinates.top;
24816
+ popupEl.style.left = coordinates.left;
24817
+ popupEl.style.transform = "translate(" + coordinates.translateX + ", " + coordinates.translateY + ")";
24818
+ };
24819
+ /**
24820
+ * @return {?}
24821
+ */
24822
+ SmartPopupComponent.prototype.onWindowResize = /**
24823
+ * @return {?}
24824
+ */
24825
+ function () {
24826
+ if (this.opened === "yes") {
24827
+ this.updatePopupPosition();
24828
+ }
24829
+ };
24830
+ SmartPopupComponent.decorators = [
24831
+ { type: Component, args: [{
24832
+ selector: "rs-smart-popup",
24833
+ template: "<!-- \u89E6\u53D1\u5143\u7D20\u63D2\u69FD -->\r\n<ng-container #trigger>\r\n <ng-content select=\"[trigger]\"></ng-content>\r\n</ng-container>\r\n\r\n<!-- \u5F39\u7A97\u5185\u5BB9 -->\r\n<div\r\n #popup\r\n class=\"rs-smart-popup-content\"\r\n [attr.data-opened]=\"opened\"\r\n [attr.data-positioning]=\"positioning\"\r\n>\r\n <div *ngIf=\"loading\" class=\"rs-smart-popup-loading\">\r\n <div class=\"loading-spinner\"></div>\r\n </div>\r\n <div *ngIf=\"!loading\" class=\"rs-smart-popup-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n\r\n",
24834
+ styles: [".rs-smart-popup-trigger{display:inline-block;cursor:pointer}::ng-deep #rs-smart-popup-fixed-container{width:0;height:0;z-index:100000;pointer-events:none}::ng-deep #rs-smart-popup-fixed-container .rs-smart-popup-content{pointer-events:auto;position:fixed;z-index:100001;padding:8px;border-radius:8px;background:#fff;box-shadow:0 0 8px 0 rgba(0,0,0,.25);min-width:200px;max-width:400px;max-height:500px;overflow:auto}::ng-deep #rs-smart-popup-fixed-container .rs-smart-popup-content[data-opened=no]{display:none}::ng-deep #rs-smart-popup-fixed-container .rs-smart-popup-content[data-opened=yes]{display:block}::ng-deep #rs-smart-popup-fixed-container .rs-smart-popup-content[data-opened=yes][data-positioning=yes]{display:none!important}::ng-deep #rs-smart-popup-fixed-container .rs-smart-popup-content[data-opened=yes][data-positioning=no]{display:block;visibility:visible;opacity:1;pointer-events:auto;-webkit-animation:.2s ease-out popup-fade-in;animation:.2s ease-out popup-fade-in}::ng-deep #rs-smart-popup-fixed-container .rs-smart-popup-content .rs-smart-popup-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;min-height:100px}::ng-deep #rs-smart-popup-fixed-container .rs-smart-popup-content .rs-smart-popup-loading .loading-spinner{width:24px;height:24px;border:3px solid #f3f3f3;border-top:3px solid #3498db;border-radius:50%;-webkit-animation:1s linear infinite spin;animation:1s linear infinite spin;margin-bottom:12px}::ng-deep #rs-smart-popup-fixed-container .rs-smart-popup-content .rs-smart-popup-loading .loading-text{color:#666;font-size:14px}@-webkit-keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}::ng-deep #rs-smart-popup-fixed-container .rs-smart-popup-content .rs-smart-popup-body{width:100%}@-webkit-keyframes popup-fade-in{from{opacity:0;transform:translate(var(--translate-x,0),var(--translate-y,0)) scale(.95)}to{opacity:1;transform:translate(var(--translate-x,0),var(--translate-y,0)) scale(1)}}@keyframes popup-fade-in{from{opacity:0;transform:translate(var(--translate-x,0),var(--translate-y,0)) scale(.95)}to{opacity:1;transform:translate(var(--translate-x,0),var(--translate-y,0)) scale(1)}}"]
24835
+ }] }
24836
+ ];
24837
+ /** @nocollapse */
24838
+ SmartPopupComponent.ctorParameters = function () { return [
24839
+ { type: ChangeDetectorRef }
24840
+ ]; };
24841
+ SmartPopupComponent.propDecorators = {
24842
+ _placement: [{ type: Input, args: ["placement",] }],
24843
+ _offset: [{ type: Input, args: ["offset",] }],
24844
+ _autoAdjust: [{ type: Input, args: ["autoAdjust",] }],
24845
+ triggerElementRef: [{ type: Input, args: ["triggerElement",] }],
24846
+ loading: [{ type: Input, args: ["loading",] }],
24847
+ _open: [{ type: Input, args: ["open",] }],
24848
+ _width: [{ type: Input, args: ["width",] }],
24849
+ _height: [{ type: Input, args: ["height",] }],
24850
+ openChange: [{ type: Output, args: ["openChange",] }],
24851
+ contentLoad: [{ type: Output, args: ["contentLoad",] }],
24852
+ internalTriggerElement: [{ type: ViewChild, args: ["trigger", { static: false },] }],
24853
+ popupElement: [{ type: ViewChild, args: ["popup", { static: false },] }],
24854
+ onWindowResize: [{ type: HostListener, args: ["window:resize",] }]
24855
+ };
24856
+ return SmartPopupComponent;
24857
+ }());
24858
+ if (false) {
24859
+ /** @type {?} */
24860
+ SmartPopupComponent.prototype._placement;
24861
+ /** @type {?} */
24862
+ SmartPopupComponent.prototype._offset;
24863
+ /** @type {?} */
24864
+ SmartPopupComponent.prototype._autoAdjust;
24865
+ /** @type {?} */
24866
+ SmartPopupComponent.prototype.triggerElementRef;
24867
+ /** @type {?} */
24868
+ SmartPopupComponent.prototype.loading;
24869
+ /** @type {?} */
24870
+ SmartPopupComponent.prototype._open;
24871
+ /** @type {?} */
24872
+ SmartPopupComponent.prototype._width;
24873
+ /** @type {?} */
24874
+ SmartPopupComponent.prototype._height;
24875
+ /** @type {?} */
24876
+ SmartPopupComponent.prototype.openChange;
24877
+ /** @type {?} */
24878
+ SmartPopupComponent.prototype.contentLoad;
24879
+ /** @type {?} */
24880
+ SmartPopupComponent.prototype.internalTriggerElement;
24881
+ /** @type {?} */
24882
+ SmartPopupComponent.prototype.popupElement;
24883
+ /** @type {?} */
24884
+ SmartPopupComponent.prototype.currentTriggerElement;
24885
+ /** @type {?} */
24886
+ SmartPopupComponent.prototype.FIXED_CONTAINER_ID;
24887
+ /** @type {?} */
24888
+ SmartPopupComponent.prototype.fixedContainerEl;
24889
+ /** @type {?} */
24890
+ SmartPopupComponent.prototype.opened;
24891
+ /** @type {?} */
24892
+ SmartPopupComponent.prototype.positioning;
24893
+ /** @type {?} */
24894
+ SmartPopupComponent.prototype.actualPlacement;
24895
+ /** @type {?} */
24896
+ SmartPopupComponent.prototype.actualPosition;
24897
+ /** @type {?} */
24898
+ SmartPopupComponent.prototype.onClickOutside;
24899
+ /** @type {?} */
24900
+ SmartPopupComponent.prototype.onWindowScroll;
24901
+ /**
24902
+ * @type {?}
24903
+ * @private
24904
+ */
24905
+ SmartPopupComponent.prototype.ref;
24906
+ }
24907
+
23747
24908
  /**
23748
24909
  * @fileoverview added by tsickle
23749
24910
  * Generated from: lib/dashboard/dashboard.service.ts
@@ -51813,6 +52974,7 @@ var RaiseCommonLibModule = /** @class */ (function () {
51813
52974
  RSNavCardGroupComponent,
51814
52975
  RSToolbarComponent,
51815
52976
  TruncatedTextToggleComponent,
52977
+ SmartPopupComponent,
51816
52978
  RSStepperComponent,
51817
52979
  PaneGroupNewComponent,
51818
52980
  SidebarIconlistNewComponent,
@@ -51995,6 +53157,7 @@ var RaiseCommonLibModule = /** @class */ (function () {
51995
53157
  RSNavCardGroupComponent,
51996
53158
  RSToolbarComponent,
51997
53159
  TruncatedTextToggleComponent,
53160
+ SmartPopupComponent,
51998
53161
  CommonDialogComponent,
51999
53162
  RSStepperComponent,
52000
53163
  PaneGroupNewComponent,
@@ -52036,5 +53199,5 @@ var RaiseCommonLibModule = /** @class */ (function () {
52036
53199
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
52037
53200
  */
52038
53201
 
52039
- export { API_SERVICE_TOKEN, CheckboxGroupComponent, CommonDialogComponent, CommonFunctionService, CommonGridComponent, DefaultDrawerConfig, DialogService, DrawerComponent, DrawerFormComponent, DrawerService, EmailPattern, EncryptedInputComponent, FloatBoxComponent, GridActionComponent, GridActionItemComponent, GridBoxComponent, IconLoaderService, KeepAliveService, MainContainerComponent, MessageType, MultiTabComponent, PBF_TOKEN, PaneGroupNewComponent, ROLE_SERVICE_TOKEN, RSAsideComponent, RSFooterComponent, RSHeaderComponent, RSNavCardGroupComponent, RSStepperComponent, RSToolbarComponent, RadioGroupComponent, RaiseCommonLibModule, RsCommentaryComponent, RsPageListComponent, RsPageTabComponent, SearchInputComponent, SwitchInputComponent, TagInputComponent, ToolbarItemComponent, TranslationService, TruncatedTextToggleComponent, filterShowSection, Debounce as ɵa, DashboardService as ɵb, ApiList as ɵc, DashboardPorletsService as ɵd, debounce as ɵe, RichtexteditorComponent as ɵf, ConfirmSelectComponent as ɵg, NewActionNotificationComponent as ɵh, CommonDeleteComponent as ɵi, SidebarIconlistNewComponent as ɵj, EmptyIconPromptComponent as ɵk, GadgetTableComponent as ɵl, GadgetPivotComponent as ɵm, GadgetPivotChartComponent as ɵn, GadgetTransposeComponent as ɵo, PortletTypeNewComponent as ɵp, FieldFilterComponent as ɵq, FieldFormatComponent as ɵr, DataMartNewComponent as ɵs, BarChartsComponent as ɵt, PaneDownloadComponent as ɵu };
53202
+ export { API_SERVICE_TOKEN, CheckboxGroupComponent, CommonDialogComponent, CommonFunctionService, CommonGridComponent, DefaultDrawerConfig, DialogService, DrawerComponent, DrawerFormComponent, DrawerService, EmailPattern, EncryptedInputComponent, FloatBoxComponent, GridActionComponent, GridActionItemComponent, GridBoxComponent, IconLoaderService, KeepAliveService, MainContainerComponent, MessageType, MultiTabComponent, PBF_TOKEN, PaneGroupNewComponent, ROLE_SERVICE_TOKEN, RSAsideComponent, RSFooterComponent, RSHeaderComponent, RSNavCardGroupComponent, RSStepperComponent, RSToolbarComponent, RadioGroupComponent, RaiseCommonLibModule, RsCommentaryComponent, RsPageListComponent, RsPageTabComponent, SearchInputComponent, SmartPopupComponent, SwitchInputComponent, TagInputComponent, ToolbarItemComponent, TranslationService, TruncatedTextToggleComponent, filterShowSection, Debounce as ɵa, DashboardService as ɵb, ApiList as ɵc, DashboardPorletsService as ɵd, debounce as ɵe, RichtexteditorComponent as ɵf, ConfirmSelectComponent as ɵg, NewActionNotificationComponent as ɵh, CommonDeleteComponent as ɵi, SidebarIconlistNewComponent as ɵj, EmptyIconPromptComponent as ɵk, GadgetTableComponent as ɵl, GadgetPivotComponent as ɵm, GadgetPivotChartComponent as ɵn, GadgetTransposeComponent as ɵo, PortletTypeNewComponent as ɵp, FieldFilterComponent as ɵq, FieldFormatComponent as ɵr, DataMartNewComponent as ɵs, BarChartsComponent as ɵt, PaneDownloadComponent as ɵu };
52040
53203
  //# sourceMappingURL=raise-common-lib.js.map