yc-agent-ui 1.2.8 → 1.2.10

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 (243) hide show
  1. package/es/components/data-table/src/data-table.vue.d.ts +2 -2
  2. package/es/components/drawer-form/index.d.ts +6 -6
  3. package/es/components/drawer-form/src/index.vue.d.ts +2 -2
  4. package/es/components/form/index.d.ts +28 -28
  5. package/es/components/form/src/form-content.vue.d.ts +7 -7
  6. package/es/components/form/src/index.vue.d.ts +10 -10
  7. package/es/components/form-item/index.d.ts +31 -31
  8. package/es/components/form-item/src/index.vue.d.ts +10 -10
  9. package/es/components/page/index.d.ts +725 -725
  10. package/es/components/page/src/index.vue.d.ts +242 -242
  11. package/es/components/search/index.d.ts +190 -190
  12. package/es/components/search/src/index.vue.d.ts +64 -64
  13. package/es/components/table/index.d.ts +18 -18
  14. package/es/components/table/src/index.vue.d.ts +2 -2
  15. package/es/components/virtual-table/index.d.ts +10 -10
  16. package/es/components/virtual-table/src/index.vue.d.ts +3 -3
  17. package/es/components/yc-ai-chat/src/bubble.vue.d.ts +1 -1
  18. package/es/components/yc-ai-chat/src/file-card.vue.d.ts +1 -1
  19. package/es/components/yc-ai-chat/src/sender.vue.d.ts +1 -1
  20. package/es/components/yc-ai-chat/src/sidebar.vue.d.ts +1 -1
  21. package/es/components/yc-coss-table/src/coss-table.vue.d.ts +3 -3
  22. package/es/components/yc-coss-table/src/table.vue.d.ts +1 -1
  23. package/es/components/yc-date-picker/src/date-picker.vue.d.ts +1 -1
  24. package/es/components/yc-display-cards/index.d.ts +218 -3
  25. package/es/components/yc-display-cards/src/card-renderer.vue.d.ts +16 -0
  26. package/es/components/yc-display-cards/src/elements/action-bar.vue.d.ts +12 -0
  27. package/es/components/yc-display-cards/src/elements/card-shell.vue.d.ts +24 -0
  28. package/es/components/yc-display-cards/src/elements/choice-group.vue.d.ts +14 -0
  29. package/es/components/yc-display-cards/src/elements/data-table.vue.d.ts +10 -0
  30. package/es/components/yc-display-cards/src/elements/field-control.vue.d.ts +22 -0
  31. package/es/components/yc-display-cards/src/elements/field-utils.d.ts +16 -0
  32. package/es/components/yc-display-cards/src/elements/form-field.vue.d.ts +18 -0
  33. package/es/components/yc-display-cards/src/elements/inline-alert.vue.d.ts +14 -0
  34. package/es/components/yc-display-cards/src/elements/input.vue.d.ts +20 -0
  35. package/es/components/yc-display-cards/src/elements/kv-list.vue.d.ts +8 -0
  36. package/es/components/yc-display-cards/src/elements/metric-grid.vue.d.ts +7 -0
  37. package/es/components/yc-display-cards/src/elements/status-tag.vue.d.ts +6 -0
  38. package/es/components/yc-display-cards/src/elements/switch.vue.d.ts +10 -0
  39. package/es/components/yc-display-cards/src/elements/upload.vue.d.ts +17 -0
  40. package/es/components/yc-display-cards/src/elements/use-card-form.d.ts +23 -0
  41. package/es/components/yc-display-cards/src/form-card.vue.d.ts +5 -2
  42. package/es/components/yc-display-cards/src/table-card.vue.d.ts +1 -2
  43. package/es/components/yc-display-cards/src/types.d.ts +179 -10
  44. package/es/components/yc-feedback/src/banner.vue.d.ts +1 -1
  45. package/es/components/yc-feedback/src/key-value-list.vue.d.ts +1 -1
  46. package/es/components/yc-input/src/input.vue.d.ts +1 -1
  47. package/es/components/yc-input/src/money-input.vue.d.ts +1 -1
  48. package/es/components/yc-input/src/textarea.vue.d.ts +2 -2
  49. package/es/components/yc-plus-page/src/header-filter-cell.vue.d.ts +8 -8
  50. package/es/components/yc-plus-page/src/index.vue.d.ts +741 -741
  51. package/es/components/yc-plus-tree/src/index.vue.d.ts +1 -1
  52. package/es/components/yc-property-table/src/property-table.vue.d.ts +2 -2
  53. package/es/components/yc-questionnaire/src/index.vue.d.ts +1 -1
  54. package/es/hooks/usePlusFormReset.d.ts +18 -18
  55. package/es/index.css +29 -23
  56. package/es/index.mjs +3 -1
  57. package/es/packages/components/index.mjs +3 -1
  58. package/es/packages/components/yc-display-cards/capability.mjs +57 -1
  59. package/es/packages/components/yc-display-cards/index.mjs +31 -1
  60. package/es/packages/components/yc-display-cards/src/card-renderer.vue.mjs +6 -0
  61. package/es/packages/components/yc-display-cards/src/card-renderer2.vue.mjs +295 -0
  62. package/es/packages/components/yc-display-cards/src/detail-card.vue.mjs +1 -1
  63. package/es/packages/components/yc-display-cards/src/detail-card2.vue.mjs +28 -94
  64. package/es/packages/components/yc-display-cards/src/elements/action-bar.vue.mjs +6 -0
  65. package/es/packages/components/yc-display-cards/src/elements/action-bar2.vue.mjs +38 -0
  66. package/es/packages/components/yc-display-cards/src/elements/card-shell.vue.mjs +6 -0
  67. package/es/packages/components/yc-display-cards/src/elements/card-shell2.vue.mjs +85 -0
  68. package/es/packages/components/yc-display-cards/src/elements/choice-group.vue.mjs +6 -0
  69. package/es/packages/components/yc-display-cards/src/elements/choice-group2.vue.mjs +57 -0
  70. package/es/packages/components/yc-display-cards/src/elements/data-table.vue.mjs +6 -0
  71. package/es/packages/components/yc-display-cards/src/elements/data-table2.vue.mjs +184 -0
  72. package/es/packages/components/yc-display-cards/src/elements/field-control.vue.mjs +5 -0
  73. package/es/packages/components/yc-display-cards/src/elements/field-control2.vue.mjs +92 -0
  74. package/es/packages/components/yc-display-cards/src/elements/field-utils.mjs +121 -0
  75. package/es/packages/components/yc-display-cards/src/elements/form-field.vue.mjs +6 -0
  76. package/es/packages/components/yc-display-cards/src/elements/form-field2.vue.mjs +68 -0
  77. package/es/packages/components/yc-display-cards/src/elements/inline-alert.vue.mjs +6 -0
  78. package/es/packages/components/yc-display-cards/src/elements/inline-alert2.vue.mjs +29 -0
  79. package/es/packages/components/yc-display-cards/src/elements/input.vue.mjs +6 -0
  80. package/es/packages/components/yc-display-cards/src/elements/input2.vue.mjs +142 -0
  81. package/es/packages/components/yc-display-cards/src/elements/kv-list.vue.mjs +6 -0
  82. package/es/packages/components/yc-display-cards/src/elements/kv-list2.vue.mjs +63 -0
  83. package/es/packages/components/yc-display-cards/src/elements/metric-grid.vue.mjs +6 -0
  84. package/es/packages/components/yc-display-cards/src/elements/metric-grid2.vue.mjs +97 -0
  85. package/es/packages/components/yc-display-cards/src/elements/status-tag.vue.mjs +6 -0
  86. package/es/packages/components/yc-display-cards/src/elements/status-tag2.vue.mjs +25 -0
  87. package/es/packages/components/yc-display-cards/src/elements/switch.vue.mjs +6 -0
  88. package/es/packages/components/yc-display-cards/src/elements/switch2.vue.mjs +35 -0
  89. package/es/packages/components/yc-display-cards/src/elements/upload.vue.mjs +6 -0
  90. package/es/packages/components/yc-display-cards/src/elements/upload2.vue.mjs +196 -0
  91. package/es/packages/components/yc-display-cards/src/elements/use-card-form.mjs +80 -0
  92. package/es/packages/components/yc-display-cards/src/form-card.vue.mjs +1 -1
  93. package/es/packages/components/yc-display-cards/src/form-card2.vue.mjs +169 -1140
  94. package/es/packages/components/yc-display-cards/src/metrics-card.vue.mjs +1 -1
  95. package/es/packages/components/yc-display-cards/src/metrics-card2.vue.mjs +19 -114
  96. package/es/packages/components/yc-display-cards/src/table-card.vue.mjs +1 -1
  97. package/es/packages/components/yc-display-cards/src/table-card2.vue.mjs +50 -232
  98. package/es/packages/components/yc-status-dialog/src/index.vue.mjs +1 -1
  99. package/es/version.d.ts +1 -1
  100. package/es/version.mjs +1 -1
  101. package/index.css +20 -14
  102. package/index.js +2223 -2378
  103. package/index.min.css +19 -13
  104. package/index.min.js +37 -43
  105. package/index.min.mjs +36 -42
  106. package/index.mjs +2203 -2377
  107. package/lib/components/data-table/src/data-table.vue.d.ts +2 -2
  108. package/lib/components/drawer-form/index.d.ts +6 -6
  109. package/lib/components/drawer-form/src/index.vue.d.ts +2 -2
  110. package/lib/components/form/index.d.ts +28 -28
  111. package/lib/components/form/src/form-content.vue.d.ts +7 -7
  112. package/lib/components/form/src/index.vue.d.ts +10 -10
  113. package/lib/components/form-item/index.d.ts +31 -31
  114. package/lib/components/form-item/src/index.vue.d.ts +10 -10
  115. package/lib/components/page/index.d.ts +725 -725
  116. package/lib/components/page/src/index.vue.d.ts +242 -242
  117. package/lib/components/search/index.d.ts +190 -190
  118. package/lib/components/search/src/index.vue.d.ts +64 -64
  119. package/lib/components/table/index.d.ts +18 -18
  120. package/lib/components/table/src/index.vue.d.ts +2 -2
  121. package/lib/components/virtual-table/index.d.ts +10 -10
  122. package/lib/components/virtual-table/src/index.vue.d.ts +3 -3
  123. package/lib/components/yc-ai-chat/src/bubble.vue.d.ts +1 -1
  124. package/lib/components/yc-ai-chat/src/file-card.vue.d.ts +1 -1
  125. package/lib/components/yc-ai-chat/src/sender.vue.d.ts +1 -1
  126. package/lib/components/yc-ai-chat/src/sidebar.vue.d.ts +1 -1
  127. package/lib/components/yc-coss-table/src/coss-table.vue.d.ts +3 -3
  128. package/lib/components/yc-coss-table/src/table.vue.d.ts +1 -1
  129. package/lib/components/yc-date-picker/src/date-picker.vue.d.ts +1 -1
  130. package/lib/components/yc-display-cards/index.d.ts +218 -3
  131. package/lib/components/yc-display-cards/src/card-renderer.vue.d.ts +16 -0
  132. package/lib/components/yc-display-cards/src/elements/action-bar.vue.d.ts +12 -0
  133. package/lib/components/yc-display-cards/src/elements/card-shell.vue.d.ts +24 -0
  134. package/lib/components/yc-display-cards/src/elements/choice-group.vue.d.ts +14 -0
  135. package/lib/components/yc-display-cards/src/elements/data-table.vue.d.ts +10 -0
  136. package/lib/components/yc-display-cards/src/elements/field-control.vue.d.ts +22 -0
  137. package/lib/components/yc-display-cards/src/elements/field-utils.d.ts +16 -0
  138. package/lib/components/yc-display-cards/src/elements/form-field.vue.d.ts +18 -0
  139. package/lib/components/yc-display-cards/src/elements/inline-alert.vue.d.ts +14 -0
  140. package/lib/components/yc-display-cards/src/elements/input.vue.d.ts +20 -0
  141. package/lib/components/yc-display-cards/src/elements/kv-list.vue.d.ts +8 -0
  142. package/lib/components/yc-display-cards/src/elements/metric-grid.vue.d.ts +7 -0
  143. package/lib/components/yc-display-cards/src/elements/status-tag.vue.d.ts +6 -0
  144. package/lib/components/yc-display-cards/src/elements/switch.vue.d.ts +10 -0
  145. package/lib/components/yc-display-cards/src/elements/upload.vue.d.ts +17 -0
  146. package/lib/components/yc-display-cards/src/elements/use-card-form.d.ts +23 -0
  147. package/lib/components/yc-display-cards/src/form-card.vue.d.ts +5 -2
  148. package/lib/components/yc-display-cards/src/table-card.vue.d.ts +1 -2
  149. package/lib/components/yc-display-cards/src/types.d.ts +179 -10
  150. package/lib/components/yc-feedback/src/banner.vue.d.ts +1 -1
  151. package/lib/components/yc-feedback/src/key-value-list.vue.d.ts +1 -1
  152. package/lib/components/yc-input/src/input.vue.d.ts +1 -1
  153. package/lib/components/yc-input/src/money-input.vue.d.ts +1 -1
  154. package/lib/components/yc-input/src/textarea.vue.d.ts +2 -2
  155. package/lib/components/yc-plus-page/src/header-filter-cell.vue.d.ts +8 -8
  156. package/lib/components/yc-plus-page/src/index.vue.d.ts +741 -741
  157. package/lib/components/yc-plus-tree/src/index.vue.d.ts +1 -1
  158. package/lib/components/yc-property-table/src/property-table.vue.d.ts +2 -2
  159. package/lib/components/yc-questionnaire/src/index.vue.d.ts +1 -1
  160. package/lib/hooks/usePlusFormReset.d.ts +18 -18
  161. package/lib/index.css +30 -24
  162. package/lib/index.js +28 -7
  163. package/lib/packages/components/index.js +28 -7
  164. package/lib/packages/components/yc-display-cards/capability.js +56 -0
  165. package/lib/packages/components/yc-display-cards/index.js +49 -0
  166. package/lib/packages/components/yc-display-cards/src/card-renderer.vue.js +10 -0
  167. package/lib/packages/components/yc-display-cards/src/card-renderer2.vue.js +299 -0
  168. package/lib/packages/components/yc-display-cards/src/detail-card.vue.js +1 -1
  169. package/lib/packages/components/yc-display-cards/src/detail-card2.vue.js +27 -93
  170. package/lib/packages/components/yc-display-cards/src/elements/action-bar.vue.js +10 -0
  171. package/lib/packages/components/yc-display-cards/src/elements/action-bar2.vue.js +42 -0
  172. package/lib/packages/components/yc-display-cards/src/elements/card-shell.vue.js +10 -0
  173. package/lib/packages/components/yc-display-cards/src/elements/card-shell2.vue.js +89 -0
  174. package/lib/packages/components/yc-display-cards/src/elements/choice-group.vue.js +10 -0
  175. package/lib/packages/components/yc-display-cards/src/elements/choice-group2.vue.js +61 -0
  176. package/lib/packages/components/yc-display-cards/src/elements/data-table.vue.js +10 -0
  177. package/lib/packages/components/yc-display-cards/src/elements/data-table2.vue.js +188 -0
  178. package/lib/packages/components/yc-display-cards/src/elements/field-control.vue.js +9 -0
  179. package/lib/packages/components/yc-display-cards/src/elements/field-control2.vue.js +96 -0
  180. package/lib/packages/components/yc-display-cards/src/elements/field-utils.js +134 -0
  181. package/lib/packages/components/yc-display-cards/src/elements/form-field.vue.js +10 -0
  182. package/lib/packages/components/yc-display-cards/src/elements/form-field2.vue.js +72 -0
  183. package/lib/packages/components/yc-display-cards/src/elements/inline-alert.vue.js +10 -0
  184. package/lib/packages/components/yc-display-cards/src/elements/inline-alert2.vue.js +33 -0
  185. package/lib/packages/components/yc-display-cards/src/elements/input.vue.js +10 -0
  186. package/lib/packages/components/yc-display-cards/src/elements/input2.vue.js +146 -0
  187. package/lib/packages/components/yc-display-cards/src/elements/kv-list.vue.js +10 -0
  188. package/lib/packages/components/yc-display-cards/src/elements/kv-list2.vue.js +67 -0
  189. package/lib/packages/components/yc-display-cards/src/elements/metric-grid.vue.js +10 -0
  190. package/lib/packages/components/yc-display-cards/src/elements/metric-grid2.vue.js +101 -0
  191. package/lib/packages/components/yc-display-cards/src/elements/status-tag.vue.js +10 -0
  192. package/lib/packages/components/yc-display-cards/src/elements/status-tag2.vue.js +29 -0
  193. package/lib/packages/components/yc-display-cards/src/elements/switch.vue.js +10 -0
  194. package/lib/packages/components/yc-display-cards/src/elements/switch2.vue.js +39 -0
  195. package/lib/packages/components/yc-display-cards/src/elements/upload.vue.js +10 -0
  196. package/lib/packages/components/yc-display-cards/src/elements/upload2.vue.js +200 -0
  197. package/lib/packages/components/yc-display-cards/src/elements/use-card-form.js +82 -0
  198. package/lib/packages/components/yc-display-cards/src/form-card.vue.js +1 -1
  199. package/lib/packages/components/yc-display-cards/src/form-card2.vue.js +168 -1139
  200. package/lib/packages/components/yc-display-cards/src/metrics-card.vue.js +1 -1
  201. package/lib/packages/components/yc-display-cards/src/metrics-card2.vue.js +18 -113
  202. package/lib/packages/components/yc-display-cards/src/table-card.vue.js +1 -1
  203. package/lib/packages/components/yc-display-cards/src/table-card2.vue.js +49 -231
  204. package/lib/packages/components/yc-status-dialog/src/index.vue.js +1 -1
  205. package/lib/version.d.ts +1 -1
  206. package/lib/version.js +1 -1
  207. package/locale/en.js +1 -1
  208. package/locale/en.min.js +1 -1
  209. package/locale/en.min.mjs +1 -1
  210. package/locale/en.mjs +1 -1
  211. package/locale/ja.js +1 -1
  212. package/locale/ja.min.js +1 -1
  213. package/locale/ja.min.mjs +1 -1
  214. package/locale/ja.mjs +1 -1
  215. package/locale/ko.js +1 -1
  216. package/locale/ko.min.js +1 -1
  217. package/locale/ko.min.mjs +1 -1
  218. package/locale/ko.mjs +1 -1
  219. package/locale/zh-cn.js +1 -1
  220. package/locale/zh-cn.min.js +1 -1
  221. package/locale/zh-cn.min.mjs +1 -1
  222. package/locale/zh-cn.mjs +1 -1
  223. package/locale/zh-tw.js +1 -1
  224. package/locale/zh-tw.min.js +1 -1
  225. package/locale/zh-tw.min.mjs +1 -1
  226. package/locale/zh-tw.mjs +1 -1
  227. package/package.json +1 -2
  228. package/theme-chalk/index.css +20 -14
  229. package/theme-chalk/plus-dialog.css +1 -1
  230. package/theme-chalk/plus-yc-status-dialog.css +1 -1
  231. package/theme-chalk/src/dialog.scss +0 -6
  232. package/theme-chalk/src/index.scss +1 -2
  233. package/theme-chalk/src/yc-status-dialog.scss +2 -2
  234. package/es/_virtual/_commonjsHelpers.mjs +0 -7
  235. package/es/_virtual/toastify.mjs +0 -3
  236. package/es/components/yc-display-cards/src/toast.d.ts +0 -4
  237. package/es/node_modules/.pnpm/toastify-js@1.12.0/node_modules/toastify-js/src/toastify.mjs +0 -456
  238. package/es/packages/components/yc-display-cards/src/toast.mjs +0 -35
  239. package/lib/_virtual/_commonjsHelpers.js +0 -10
  240. package/lib/_virtual/toastify.js +0 -5
  241. package/lib/components/yc-display-cards/src/toast.d.ts +0 -4
  242. package/lib/node_modules/.pnpm/toastify-js@1.12.0/node_modules/toastify-js/src/toastify.js +0 -460
  243. package/lib/packages/components/yc-display-cards/src/toast.js +0 -37
@@ -1,460 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _commonjsHelpers = require('../../../../../../_virtual/_commonjsHelpers.js');
6
- var toastify = require('../../../../../../_virtual/toastify.js');
7
-
8
- /*!
9
- * Toastify js 1.12.0
10
- * https://github.com/apvarun/toastify-js
11
- * @license MIT licensed
12
- *
13
- * Copyright (C) 2018 Varun A P
14
- */
15
-
16
- (function (module) {
17
- (function(root, factory) {
18
- if (module.exports) {
19
- module.exports = factory();
20
- } else {
21
- root.Toastify = factory();
22
- }
23
- })(_commonjsHelpers.commonjsGlobal, function(global) {
24
- // Object initialization
25
- var Toastify = function(options) {
26
- // Returning a new init object
27
- return new Toastify.lib.init(options);
28
- },
29
- // Library version
30
- version = "1.12.0";
31
-
32
- // Set the default global options
33
- Toastify.defaults = {
34
- oldestFirst: true,
35
- text: "Toastify is awesome!",
36
- node: undefined,
37
- duration: 3000,
38
- selector: undefined,
39
- callback: function () {
40
- },
41
- destination: undefined,
42
- newWindow: false,
43
- close: false,
44
- gravity: "toastify-top",
45
- positionLeft: false,
46
- position: '',
47
- backgroundColor: '',
48
- avatar: "",
49
- className: "",
50
- stopOnFocus: true,
51
- onClick: function () {
52
- },
53
- offset: {x: 0, y: 0},
54
- escapeMarkup: true,
55
- ariaLive: 'polite',
56
- style: {background: ''}
57
- };
58
-
59
- // Defining the prototype of the object
60
- Toastify.lib = Toastify.prototype = {
61
- toastify: version,
62
-
63
- constructor: Toastify,
64
-
65
- // Initializing the object with required parameters
66
- init: function(options) {
67
- // Verifying and validating the input object
68
- if (!options) {
69
- options = {};
70
- }
71
-
72
- // Creating the options object
73
- this.options = {};
74
-
75
- this.toastElement = null;
76
-
77
- // Validating the options
78
- this.options.text = options.text || Toastify.defaults.text; // Display message
79
- this.options.node = options.node || Toastify.defaults.node; // Display content as node
80
- this.options.duration = options.duration === 0 ? 0 : options.duration || Toastify.defaults.duration; // Display duration
81
- this.options.selector = options.selector || Toastify.defaults.selector; // Parent selector
82
- this.options.callback = options.callback || Toastify.defaults.callback; // Callback after display
83
- this.options.destination = options.destination || Toastify.defaults.destination; // On-click destination
84
- this.options.newWindow = options.newWindow || Toastify.defaults.newWindow; // Open destination in new window
85
- this.options.close = options.close || Toastify.defaults.close; // Show toast close icon
86
- this.options.gravity = options.gravity === "bottom" ? "toastify-bottom" : Toastify.defaults.gravity; // toast position - top or bottom
87
- this.options.positionLeft = options.positionLeft || Toastify.defaults.positionLeft; // toast position - left or right
88
- this.options.position = options.position || Toastify.defaults.position; // toast position - left or right
89
- this.options.backgroundColor = options.backgroundColor || Toastify.defaults.backgroundColor; // toast background color
90
- this.options.avatar = options.avatar || Toastify.defaults.avatar; // img element src - url or a path
91
- this.options.className = options.className || Toastify.defaults.className; // additional class names for the toast
92
- this.options.stopOnFocus = options.stopOnFocus === undefined ? Toastify.defaults.stopOnFocus : options.stopOnFocus; // stop timeout on focus
93
- this.options.onClick = options.onClick || Toastify.defaults.onClick; // Callback after click
94
- this.options.offset = options.offset || Toastify.defaults.offset; // toast offset
95
- this.options.escapeMarkup = options.escapeMarkup !== undefined ? options.escapeMarkup : Toastify.defaults.escapeMarkup;
96
- this.options.ariaLive = options.ariaLive || Toastify.defaults.ariaLive;
97
- this.options.style = options.style || Toastify.defaults.style;
98
- if(options.backgroundColor) {
99
- this.options.style.background = options.backgroundColor;
100
- }
101
-
102
- // Returning the current object for chaining functions
103
- return this;
104
- },
105
-
106
- // Building the DOM element
107
- buildToast: function() {
108
- // Validating if the options are defined
109
- if (!this.options) {
110
- throw "Toastify is not initialized";
111
- }
112
-
113
- // Creating the DOM object
114
- var divElement = document.createElement("div");
115
- divElement.className = "toastify on " + this.options.className;
116
-
117
- // Positioning toast to left or right or center
118
- if (!!this.options.position) {
119
- divElement.className += " toastify-" + this.options.position;
120
- } else {
121
- // To be depreciated in further versions
122
- if (this.options.positionLeft === true) {
123
- divElement.className += " toastify-left";
124
- console.warn('Property `positionLeft` will be depreciated in further versions. Please use `position` instead.');
125
- } else {
126
- // Default position
127
- divElement.className += " toastify-right";
128
- }
129
- }
130
-
131
- // Assigning gravity of element
132
- divElement.className += " " + this.options.gravity;
133
-
134
- if (this.options.backgroundColor) {
135
- // This is being deprecated in favor of using the style HTML DOM property
136
- console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');
137
- }
138
-
139
- // Loop through our style object and apply styles to divElement
140
- for (var property in this.options.style) {
141
- divElement.style[property] = this.options.style[property];
142
- }
143
-
144
- // Announce the toast to screen readers
145
- if (this.options.ariaLive) {
146
- divElement.setAttribute('aria-live', this.options.ariaLive);
147
- }
148
-
149
- // Adding the toast message/node
150
- if (this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE) {
151
- // If we have a valid node, we insert it
152
- divElement.appendChild(this.options.node);
153
- } else {
154
- if (this.options.escapeMarkup) {
155
- divElement.innerText = this.options.text;
156
- } else {
157
- divElement.innerHTML = this.options.text;
158
- }
159
-
160
- if (this.options.avatar !== "") {
161
- var avatarElement = document.createElement("img");
162
- avatarElement.src = this.options.avatar;
163
-
164
- avatarElement.className = "toastify-avatar";
165
-
166
- if (this.options.position == "left" || this.options.positionLeft === true) {
167
- // Adding close icon on the left of content
168
- divElement.appendChild(avatarElement);
169
- } else {
170
- // Adding close icon on the right of content
171
- divElement.insertAdjacentElement("afterbegin", avatarElement);
172
- }
173
- }
174
- }
175
-
176
- // Adding a close icon to the toast
177
- if (this.options.close === true) {
178
- // Create a span for close element
179
- var closeElement = document.createElement("button");
180
- closeElement.type = "button";
181
- closeElement.setAttribute("aria-label", "Close");
182
- closeElement.className = "toast-close";
183
- closeElement.innerHTML = "✖";
184
-
185
- // Triggering the removal of toast from DOM on close click
186
- closeElement.addEventListener(
187
- "click",
188
- function(event) {
189
- event.stopPropagation();
190
- this.removeElement(this.toastElement);
191
- window.clearTimeout(this.toastElement.timeOutValue);
192
- }.bind(this)
193
- );
194
-
195
- //Calculating screen width
196
- var width = window.innerWidth > 0 ? window.innerWidth : screen.width;
197
-
198
- // Adding the close icon to the toast element
199
- // Display on the right if screen width is less than or equal to 360px
200
- if ((this.options.position == "left" || this.options.positionLeft === true) && width > 360) {
201
- // Adding close icon on the left of content
202
- divElement.insertAdjacentElement("afterbegin", closeElement);
203
- } else {
204
- // Adding close icon on the right of content
205
- divElement.appendChild(closeElement);
206
- }
207
- }
208
-
209
- // Clear timeout while toast is focused
210
- if (this.options.stopOnFocus && this.options.duration > 0) {
211
- var self = this;
212
- // stop countdown
213
- divElement.addEventListener(
214
- "mouseover",
215
- function(event) {
216
- window.clearTimeout(divElement.timeOutValue);
217
- }
218
- );
219
- // add back the timeout
220
- divElement.addEventListener(
221
- "mouseleave",
222
- function() {
223
- divElement.timeOutValue = window.setTimeout(
224
- function() {
225
- // Remove the toast from DOM
226
- self.removeElement(divElement);
227
- },
228
- self.options.duration
229
- );
230
- }
231
- );
232
- }
233
-
234
- // Adding an on-click destination path
235
- if (typeof this.options.destination !== "undefined") {
236
- divElement.addEventListener(
237
- "click",
238
- function(event) {
239
- event.stopPropagation();
240
- if (this.options.newWindow === true) {
241
- window.open(this.options.destination, "_blank");
242
- } else {
243
- window.location = this.options.destination;
244
- }
245
- }.bind(this)
246
- );
247
- }
248
-
249
- if (typeof this.options.onClick === "function" && typeof this.options.destination === "undefined") {
250
- divElement.addEventListener(
251
- "click",
252
- function(event) {
253
- event.stopPropagation();
254
- this.options.onClick();
255
- }.bind(this)
256
- );
257
- }
258
-
259
- // Adding offset
260
- if(typeof this.options.offset === "object") {
261
-
262
- var x = getAxisOffsetAValue("x", this.options);
263
- var y = getAxisOffsetAValue("y", this.options);
264
-
265
- var xOffset = this.options.position == "left" ? x : "-" + x;
266
- var yOffset = this.options.gravity == "toastify-top" ? y : "-" + y;
267
-
268
- divElement.style.transform = "translate(" + xOffset + "," + yOffset + ")";
269
-
270
- }
271
-
272
- // Returning the generated element
273
- return divElement;
274
- },
275
-
276
- // Displaying the toast
277
- showToast: function() {
278
- // Creating the DOM object for the toast
279
- this.toastElement = this.buildToast();
280
-
281
- // Getting the root element to with the toast needs to be added
282
- var rootElement;
283
- if (typeof this.options.selector === "string") {
284
- rootElement = document.getElementById(this.options.selector);
285
- } else if (this.options.selector instanceof HTMLElement || (typeof ShadowRoot !== 'undefined' && this.options.selector instanceof ShadowRoot)) {
286
- rootElement = this.options.selector;
287
- } else {
288
- rootElement = document.body;
289
- }
290
-
291
- // Validating if root element is present in DOM
292
- if (!rootElement) {
293
- throw "Root element is not defined";
294
- }
295
-
296
- // Adding the DOM element
297
- var elementToInsert = Toastify.defaults.oldestFirst ? rootElement.firstChild : rootElement.lastChild;
298
- rootElement.insertBefore(this.toastElement, elementToInsert);
299
-
300
- // Repositioning the toasts in case multiple toasts are present
301
- Toastify.reposition();
302
-
303
- if (this.options.duration > 0) {
304
- this.toastElement.timeOutValue = window.setTimeout(
305
- function() {
306
- // Remove the toast from DOM
307
- this.removeElement(this.toastElement);
308
- }.bind(this),
309
- this.options.duration
310
- ); // Binding `this` for function invocation
311
- }
312
-
313
- // Supporting function chaining
314
- return this;
315
- },
316
-
317
- hideToast: function() {
318
- if (this.toastElement.timeOutValue) {
319
- clearTimeout(this.toastElement.timeOutValue);
320
- }
321
- this.removeElement(this.toastElement);
322
- },
323
-
324
- // Removing the element from the DOM
325
- removeElement: function(toastElement) {
326
- // Hiding the element
327
- // toastElement.classList.remove("on");
328
- toastElement.className = toastElement.className.replace(" on", "");
329
-
330
- // Removing the element from DOM after transition end
331
- window.setTimeout(
332
- function() {
333
- // remove options node if any
334
- if (this.options.node && this.options.node.parentNode) {
335
- this.options.node.parentNode.removeChild(this.options.node);
336
- }
337
-
338
- // Remove the element from the DOM, only when the parent node was not removed before.
339
- if (toastElement.parentNode) {
340
- toastElement.parentNode.removeChild(toastElement);
341
- }
342
-
343
- // Calling the callback function
344
- this.options.callback.call(toastElement);
345
-
346
- // Repositioning the toasts again
347
- Toastify.reposition();
348
- }.bind(this),
349
- 400
350
- ); // Binding `this` for function invocation
351
- },
352
- };
353
-
354
- // Positioning the toasts on the DOM
355
- Toastify.reposition = function() {
356
-
357
- // Top margins with gravity
358
- var topLeftOffsetSize = {
359
- top: 15,
360
- bottom: 15,
361
- };
362
- var topRightOffsetSize = {
363
- top: 15,
364
- bottom: 15,
365
- };
366
- var offsetSize = {
367
- top: 15,
368
- bottom: 15,
369
- };
370
-
371
- // Get all toast messages on the DOM
372
- var allToasts = document.getElementsByClassName("toastify");
373
-
374
- var classUsed;
375
-
376
- // Modifying the position of each toast element
377
- for (var i = 0; i < allToasts.length; i++) {
378
- // Getting the applied gravity
379
- if (containsClass(allToasts[i], "toastify-top") === true) {
380
- classUsed = "toastify-top";
381
- } else {
382
- classUsed = "toastify-bottom";
383
- }
384
-
385
- var height = allToasts[i].offsetHeight;
386
- classUsed = classUsed.substr(9, classUsed.length-1);
387
- // Spacing between toasts
388
- var offset = 15;
389
-
390
- var width = window.innerWidth > 0 ? window.innerWidth : screen.width;
391
-
392
- // Show toast in center if screen with less than or equal to 360px
393
- if (width <= 360) {
394
- // Setting the position
395
- allToasts[i].style[classUsed] = offsetSize[classUsed] + "px";
396
-
397
- offsetSize[classUsed] += height + offset;
398
- } else {
399
- if (containsClass(allToasts[i], "toastify-left") === true) {
400
- // Setting the position
401
- allToasts[i].style[classUsed] = topLeftOffsetSize[classUsed] + "px";
402
-
403
- topLeftOffsetSize[classUsed] += height + offset;
404
- } else {
405
- // Setting the position
406
- allToasts[i].style[classUsed] = topRightOffsetSize[classUsed] + "px";
407
-
408
- topRightOffsetSize[classUsed] += height + offset;
409
- }
410
- }
411
- }
412
-
413
- // Supporting function chaining
414
- return this;
415
- };
416
-
417
- // Helper function to get offset.
418
- function getAxisOffsetAValue(axis, options) {
419
-
420
- if(options.offset[axis]) {
421
- if(isNaN(options.offset[axis])) {
422
- return options.offset[axis];
423
- }
424
- else {
425
- return options.offset[axis] + 'px';
426
- }
427
- }
428
-
429
- return '0px';
430
-
431
- }
432
-
433
- function containsClass(elem, yourClass) {
434
- if (!elem || typeof yourClass !== "string") {
435
- return false;
436
- } else if (
437
- elem.className &&
438
- elem.className
439
- .trim()
440
- .split(/\s+/gi)
441
- .indexOf(yourClass) > -1
442
- ) {
443
- return true;
444
- } else {
445
- return false;
446
- }
447
- }
448
-
449
- // Setting up the prototype for the init object
450
- Toastify.lib.init.prototype = Toastify.lib;
451
-
452
- // Returning the Toastify function to be assigned to the window object/module
453
- return Toastify;
454
- });
455
- } (toastify.__module));
456
-
457
- var toastifyExports = toastify.__module.exports;
458
- var Toastify = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(toastifyExports);
459
-
460
- exports.default = Toastify;
@@ -1,37 +0,0 @@
1
- 'use strict';
2
-
3
- var toastify = require('../../../../node_modules/.pnpm/toastify-js@1.12.0/node_modules/toastify-js/src/toastify.js');
4
-
5
- const TOAST_BG = {
6
- info: "linear-gradient(135deg, #2563eb, #1d4ed8)",
7
- success: "linear-gradient(135deg, #16a34a, #15803d)",
8
- warning: "linear-gradient(135deg, #d97706, #b45309)",
9
- error: "linear-gradient(135deg, #dc2626, #b91c1c)"
10
- };
11
- function showDisplayToast(message, type = "info", duration = 3600) {
12
- if (typeof document === "undefined" || !message.trim()) return;
13
- try {
14
- toastify.default({
15
- text: message.trim(),
16
- duration,
17
- gravity: "top",
18
- position: "center",
19
- close: true,
20
- stopOnFocus: true,
21
- style: {
22
- background: TOAST_BG[type],
23
- color: "#ffffff",
24
- borderRadius: "10px",
25
- fontSize: "13px",
26
- lineHeight: "1.45",
27
- padding: "10px 14px",
28
- maxWidth: "calc(100vw - 32px)",
29
- boxShadow: "0 8px 24px rgba(15, 23, 42, 0.18)",
30
- zIndex: "9999"
31
- }
32
- }).showToast();
33
- } catch (e) {
34
- }
35
- }
36
-
37
- exports.showDisplayToast = showDisplayToast;