@ibiz-template/vue3-components 0.7.26-alpha.2 → 0.7.26

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 (177) hide show
  1. package/dist/index-28jZm-aB.js +4 -0
  2. package/dist/{index-8tGeBxpc.js → index-RwYoggQd.js} +1 -1
  3. package/dist/{index-CDgQJyai.js → index-s7g1-ymW.js} +1 -1
  4. package/dist/index.min.css +1 -1
  5. package/dist/index.system.min.js +1 -1
  6. package/dist/{xlsx-util-Ux1_tuw5.js → xlsx-util-Rf5FMxyR.js} +1 -1
  7. package/es/common/emoji-select/components/categories/categories.css +1 -0
  8. package/es/common/emoji-select/components/categories/categories.d.ts +30 -0
  9. package/es/common/emoji-select/components/categories/categories.mjs +48 -0
  10. package/es/common/emoji-select/components/categories/index.d.ts +1 -0
  11. package/es/common/emoji-select/components/categories/index.mjs +3 -0
  12. package/es/common/emoji-select/components/category-label/category-label.css +1 -0
  13. package/es/common/emoji-select/components/category-label/category-label.d.ts +18 -0
  14. package/es/common/emoji-select/components/category-label/category-label.mjs +28 -0
  15. package/es/common/emoji-select/components/category-label/index.d.ts +1 -0
  16. package/es/common/emoji-select/components/category-label/index.mjs +3 -0
  17. package/es/common/emoji-select/components/emoji-item/emoji-item.css +1 -0
  18. package/es/common/emoji-select/components/emoji-item/emoji-item.d.ts +44 -0
  19. package/es/common/emoji-select/components/emoji-item/emoji-item.mjs +56 -0
  20. package/es/common/emoji-select/components/emoji-item/index.d.ts +1 -0
  21. package/es/common/emoji-select/components/emoji-item/index.mjs +3 -0
  22. package/es/common/emoji-select/components/emoji-list/emoji-list.css +1 -0
  23. package/es/common/emoji-select/components/emoji-list/emoji-list.d.ts +92 -0
  24. package/es/common/emoji-select/components/emoji-list/emoji-list.mjs +165 -0
  25. package/es/common/emoji-select/components/emoji-list/index.d.ts +1 -0
  26. package/es/common/emoji-select/components/emoji-list/index.mjs +3 -0
  27. package/es/common/emoji-select/components/index.d.ts +5 -0
  28. package/es/common/emoji-select/components/index.mjs +12 -0
  29. package/es/common/emoji-select/components/input-search/index.d.ts +1 -0
  30. package/es/common/emoji-select/components/input-search/index.mjs +3 -0
  31. package/es/common/emoji-select/components/input-search/input-search.css +1 -0
  32. package/es/common/emoji-select/components/input-search/input-search.d.ts +9 -0
  33. package/es/common/emoji-select/components/input-search/input-search.mjs +49 -0
  34. package/es/common/emoji-select/emoji-select.css +1 -0
  35. package/es/common/emoji-select/emoji-select.d.ts +142 -0
  36. package/es/common/emoji-select/emoji-select.mjs +234 -0
  37. package/es/common/emoji-select/icons/categories.d.ts +2 -0
  38. package/es/common/emoji-select/icons/categories.mjs +64 -0
  39. package/es/common/emoji-select/icons/emoji.d.ts +2 -0
  40. package/es/common/emoji-select/icons/emoji.mjs +1444 -0
  41. package/es/common/emoji-select/icons/index.d.ts +3 -0
  42. package/es/common/emoji-select/icons/index.mjs +5 -0
  43. package/es/common/emoji-select/icons/search.d.ts +1 -0
  44. package/es/common/emoji-select/icons/search.mjs +16 -0
  45. package/es/common/emoji-select/interface/category.d.ts +44 -0
  46. package/es/common/emoji-select/interface/category.mjs +22 -0
  47. package/es/common/emoji-select/interface/emoji.d.ts +37 -0
  48. package/es/common/emoji-select/interface/emoji.mjs +19 -0
  49. package/es/common/emoji-select/interface/index.d.ts +3 -0
  50. package/es/common/emoji-select/interface/index.mjs +5 -0
  51. package/es/common/emoji-select/interface/map-emojis.d.ts +17 -0
  52. package/es/common/emoji-select/interface/map-emojis.mjs +1 -0
  53. package/es/common/index.mjs +2 -0
  54. package/es/common/view-message/view-message.d.ts +1 -0
  55. package/es/control/calendar/calendar.css +1 -1
  56. package/es/control/calendar/calendar.d.ts +3 -2
  57. package/es/control/calendar/calendar.mjs +203 -86
  58. package/es/control/calendar/components/calendar-daily/calendar-daily.d.ts +1 -1
  59. package/es/control/calendar/components/calendar-daily/index.d.ts +1 -1
  60. package/es/control/calendar/components/calendar-week/calendar-week.d.ts +1 -1
  61. package/es/control/calendar/components/calendar-week/calendar-week.mjs +15 -12
  62. package/es/control/calendar/components/calendar-week/index.d.ts +1 -1
  63. package/es/control/calendar/components/calendar-week/use-calendar-week.mjs +1 -0
  64. package/es/control/calendar/components/custom-calendar/custom-calendar.mjs +4 -114
  65. package/es/control/calendar/components/interface/calendar-daily.mjs +0 -3
  66. package/es/control/calendar/components/interface/calendar-week.mjs +3 -2
  67. package/es/control/calendar/components/interface/custom-calendar.mjs +8 -3
  68. package/es/control/calendar/components/interface/index.d.ts +0 -1
  69. package/es/control/calendar/components/interface/index.mjs +0 -1
  70. package/es/control/calendar/index.d.ts +2 -1
  71. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +36 -2
  72. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.mjs +17 -7
  73. package/es/control/dashboard/dashboard-design/dashboard-design.d.ts +10 -32
  74. package/es/control/dashboard/dashboard-design/dashboard-design.mjs +93 -56
  75. package/es/control/drtab/drtab-control.util.mjs +1 -1
  76. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +25 -0
  77. package/es/control/form/form-detail/form-mdctrl/mdctrl-container2/mdctrl-container2.mjs +1 -0
  78. package/es/control/grid/grid/grid-control.util.d.ts +8 -0
  79. package/es/control/grid/grid/grid-control.util.mjs +151 -1
  80. package/es/control/grid/grid/grid.css +1 -1
  81. package/es/control/grid/grid/grid.d.ts +8 -0
  82. package/es/control/grid/grid/grid.mjs +12 -2
  83. package/es/control/grid/grid/index.d.ts +8 -0
  84. package/es/control/grid/grid-column/grid-field-column/grid-field-column.d.ts +1 -0
  85. package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +21 -1
  86. package/es/control/grid/grid-column/grid-field-column/index.d.ts +1 -0
  87. package/es/control/tree/tree.css +1 -1
  88. package/es/editor/dropdown-list/dropdown-list-editor.provider.d.ts +1 -0
  89. package/es/editor/dropdown-list/dropdown-list-editor.provider.mjs +10 -1
  90. package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.css +1 -0
  91. package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.d.ts +72 -0
  92. package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.mjs +123 -0
  93. package/es/editor/dropdown-list/index.d.ts +1 -0
  94. package/es/editor/dropdown-list/index.mjs +1 -0
  95. package/es/editor/index.mjs +6 -0
  96. package/es/editor/text-box/input/input.d.ts +1 -1
  97. package/es/locale/en/index.d.ts +14 -0
  98. package/es/locale/en/index.mjs +14 -0
  99. package/es/locale/zh-CN/index.d.ts +14 -0
  100. package/es/locale/zh-CN/index.mjs +14 -0
  101. package/es/panel-component/nav-tabs/nav-tabs.controller.d.ts +7 -0
  102. package/es/panel-component/nav-tabs/nav-tabs.controller.mjs +19 -0
  103. package/lib/common/emoji-select/components/categories/categories.cjs +50 -0
  104. package/lib/common/emoji-select/components/categories/categories.css +1 -0
  105. package/lib/common/emoji-select/components/categories/index.cjs +7 -0
  106. package/lib/common/emoji-select/components/category-label/category-label.cjs +30 -0
  107. package/lib/common/emoji-select/components/category-label/category-label.css +1 -0
  108. package/lib/common/emoji-select/components/category-label/index.cjs +7 -0
  109. package/lib/common/emoji-select/components/emoji-item/emoji-item.cjs +58 -0
  110. package/lib/common/emoji-select/components/emoji-item/emoji-item.css +1 -0
  111. package/lib/common/emoji-select/components/emoji-item/index.cjs +7 -0
  112. package/lib/common/emoji-select/components/emoji-list/emoji-list.cjs +167 -0
  113. package/lib/common/emoji-select/components/emoji-list/emoji-list.css +1 -0
  114. package/lib/common/emoji-select/components/emoji-list/index.cjs +7 -0
  115. package/lib/common/emoji-select/components/index.cjs +20 -0
  116. package/lib/common/emoji-select/components/input-search/index.cjs +7 -0
  117. package/lib/common/emoji-select/components/input-search/input-search.cjs +51 -0
  118. package/lib/common/emoji-select/components/input-search/input-search.css +1 -0
  119. package/lib/common/emoji-select/emoji-select.cjs +236 -0
  120. package/lib/common/emoji-select/emoji-select.css +1 -0
  121. package/lib/common/emoji-select/icons/categories.cjs +66 -0
  122. package/lib/common/emoji-select/icons/emoji.cjs +1446 -0
  123. package/lib/common/emoji-select/icons/index.cjs +11 -0
  124. package/lib/common/emoji-select/icons/search.cjs +18 -0
  125. package/lib/common/emoji-select/interface/category.cjs +24 -0
  126. package/lib/common/emoji-select/interface/emoji.cjs +21 -0
  127. package/lib/common/emoji-select/interface/index.cjs +10 -0
  128. package/lib/common/emoji-select/interface/map-emojis.cjs +3 -0
  129. package/lib/common/index.cjs +2 -0
  130. package/lib/control/calendar/calendar.cjs +203 -86
  131. package/lib/control/calendar/calendar.css +1 -1
  132. package/lib/control/calendar/components/calendar-week/calendar-week.cjs +15 -12
  133. package/lib/control/calendar/components/calendar-week/use-calendar-week.cjs +1 -0
  134. package/lib/control/calendar/components/custom-calendar/custom-calendar.cjs +7 -117
  135. package/lib/control/calendar/components/interface/calendar-daily.cjs +0 -3
  136. package/lib/control/calendar/components/interface/calendar-week.cjs +3 -2
  137. package/lib/control/calendar/components/interface/custom-calendar.cjs +8 -3
  138. package/lib/control/calendar/components/interface/index.cjs +0 -3
  139. package/lib/control/dashboard/custom-dashboard-container/custom-dashboard-container.cjs +17 -7
  140. package/lib/control/dashboard/dashboard-design/dashboard-design.cjs +93 -56
  141. package/lib/control/drtab/drtab-control.util.cjs +1 -1
  142. package/lib/control/form/form-detail/form-mdctrl/mdctrl-container2/mdctrl-container2.cjs +1 -0
  143. package/lib/control/grid/grid/grid-control.util.cjs +151 -1
  144. package/lib/control/grid/grid/grid.cjs +12 -2
  145. package/lib/control/grid/grid/grid.css +1 -1
  146. package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +21 -1
  147. package/lib/control/tree/tree.css +1 -1
  148. package/lib/editor/dropdown-list/dropdown-list-editor.provider.cjs +10 -1
  149. package/lib/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.cjs +125 -0
  150. package/lib/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.css +1 -0
  151. package/lib/editor/dropdown-list/index.cjs +2 -0
  152. package/lib/editor/index.cjs +6 -0
  153. package/lib/locale/en/index.cjs +14 -0
  154. package/lib/locale/zh-CN/index.cjs +14 -0
  155. package/lib/panel-component/nav-tabs/nav-tabs.controller.cjs +19 -0
  156. package/package.json +8 -8
  157. package/dist/index-o58Mv9D4.js +0 -4
  158. package/es/_virtual/localeData.mjs +0 -3
  159. package/es/control/calendar/components/calendar-month/calendar-month.css +0 -1
  160. package/es/control/calendar/components/calendar-month/calendar-month.d.ts +0 -18
  161. package/es/control/calendar/components/calendar-month/calendar-month.mjs +0 -242
  162. package/es/control/calendar/components/calendar-month/index.d.ts +0 -18
  163. package/es/control/calendar/components/calendar-month/index.mjs +0 -9
  164. package/es/control/calendar/components/calendar-month/use-calendar-month.d.ts +0 -3
  165. package/es/control/calendar/components/calendar-month/use-calendar-month.mjs +0 -384
  166. package/es/control/calendar/components/interface/calendar-month.d.ts +0 -20
  167. package/es/control/calendar/components/interface/calendar-month.mjs +0 -43
  168. package/es/node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/plugin/localeData.mjs +0 -13
  169. package/lib/_virtual/localeData.cjs +0 -5
  170. package/lib/control/calendar/components/calendar-month/calendar-month.cjs +0 -244
  171. package/lib/control/calendar/components/calendar-month/calendar-month.css +0 -1
  172. package/lib/control/calendar/components/calendar-month/index.cjs +0 -14
  173. package/lib/control/calendar/components/calendar-month/use-calendar-month.cjs +0 -386
  174. package/lib/control/calendar/components/interface/calendar-month.cjs +0 -46
  175. package/lib/node_modules/.pnpm/dayjs@1.11.10/node_modules/dayjs/plugin/localeData.cjs +0 -17
  176. /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.25_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.26_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
  177. /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.25_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.26_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
@@ -1129,6 +1129,17 @@ declare const _default: {
1129
1129
  actionToolbar: {
1130
1130
  more: string;
1131
1131
  };
1132
+ emojiSelect: {
1133
+ frequently: string;
1134
+ peoples: string;
1135
+ nature: string;
1136
+ foods: string;
1137
+ activity: string;
1138
+ objects: string;
1139
+ places: string;
1140
+ symbols: string;
1141
+ flags: string;
1142
+ };
1132
1143
  };
1133
1144
  editor: {
1134
1145
  common: {
@@ -1176,6 +1187,9 @@ declare const _default: {
1176
1187
  uploadJsonFormatErr: string;
1177
1188
  exportJsonFormatErr: string;
1178
1189
  };
1190
+ emojiPicker: {
1191
+ addEmoji: string;
1192
+ };
1179
1193
  };
1180
1194
  panelComponent: {
1181
1195
  authUserinfo: {
@@ -463,6 +463,17 @@ var index = {
463
463
  },
464
464
  actionToolbar: {
465
465
  more: "More"
466
+ },
467
+ emojiSelect: {
468
+ frequently: "Frequently",
469
+ peoples: "Peoples",
470
+ nature: "Nature",
471
+ foods: "Foods",
472
+ activity: "Activity",
473
+ objects: "Objects",
474
+ places: "Places",
475
+ symbols: "Symbols",
476
+ flags: "Flags"
466
477
  }
467
478
  },
468
479
  // 编辑器
@@ -511,6 +522,9 @@ var index = {
511
522
  fileSizeErr: "The file size cannot exceed",
512
523
  uploadJsonFormatErr: "The configuration of uploadparams did not follow the standard JSON format",
513
524
  exportJsonFormatErr: "The configuration of exportparams did not follow the standard JSON format"
525
+ },
526
+ emojiPicker: {
527
+ addEmoji: "Add emoji"
514
528
  }
515
529
  },
516
530
  panelComponent: {
@@ -1123,6 +1123,17 @@ declare const _default: {
1123
1123
  actionToolbar: {
1124
1124
  more: string;
1125
1125
  };
1126
+ emojiSelect: {
1127
+ frequently: string;
1128
+ peoples: string;
1129
+ nature: string;
1130
+ foods: string;
1131
+ activity: string;
1132
+ objects: string;
1133
+ places: string;
1134
+ symbols: string;
1135
+ flags: string;
1136
+ };
1126
1137
  };
1127
1138
  editor: {
1128
1139
  common: {
@@ -1170,6 +1181,9 @@ declare const _default: {
1170
1181
  uploadJsonFormatErr: string;
1171
1182
  exportJsonFormatErr: string;
1172
1183
  };
1184
+ emojiPicker: {
1185
+ addEmoji: string;
1186
+ };
1173
1187
  };
1174
1188
  panelComponent: {
1175
1189
  authUserinfo: {
@@ -459,6 +459,17 @@ var index = {
459
459
  },
460
460
  actionToolbar: {
461
461
  more: "\u66F4\u591A"
462
+ },
463
+ emojiSelect: {
464
+ frequently: "\u5E38\u7528",
465
+ peoples: "\u60C5\u7EEA",
466
+ nature: "\u81EA\u7136",
467
+ foods: "\u98DF\u7269\u4E0E\u996E\u6599",
468
+ activity: "\u6D3B\u52A8",
469
+ objects: "\u5BF9\u8C61",
470
+ places: "\u65C5\u884C\u4E0E\u5730\u65B9",
471
+ symbols: "\u7B26\u53F7",
472
+ flags: "\u65D7\u5E1C"
462
473
  }
463
474
  },
464
475
  // 编辑器
@@ -507,6 +518,9 @@ var index = {
507
518
  fileSizeErr: "\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7",
508
519
  uploadJsonFormatErr: "\u914D\u7F6Euploadparams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F",
509
520
  exportJsonFormatErr: "\u914D\u7F6Eexportparams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F"
521
+ },
522
+ emojiPicker: {
523
+ addEmoji: "\u6DFB\u52A0\u8868\u60C5"
510
524
  }
511
525
  },
512
526
  panelComponent: {
@@ -80,4 +80,11 @@ export declare class NavTabsController extends PanelItemController<IPanelRawItem
80
80
  * @date 2023-05-09 02:50:01
81
81
  */
82
82
  removeAll(): void;
83
+ /**
84
+ * 刷新项(解决主信息更新之后界面ui未刷新)
85
+ *
86
+ * @author tony001
87
+ * @date 2024-06-28 08:06:11
88
+ */
89
+ refreshItemUI(): void;
83
90
  }
@@ -58,6 +58,7 @@ class NavTabsController extends PanelItemController {
58
58
  const findItem = this.findTabItem(key);
59
59
  if (findItem) {
60
60
  Object.assign(findItem, reject(isNil, info));
61
+ this.refreshItemUI();
61
62
  } else {
62
63
  this.state.tabItems.push({ key, ...info });
63
64
  this.state.activeTab = this.state.currentKey;
@@ -116,6 +117,24 @@ class NavTabsController extends PanelItemController {
116
117
  (_a = this.navPos) == null ? void 0 : _a.closeViewByKeys(removeKeys);
117
118
  }
118
119
  }
120
+ /**
121
+ * 刷新项(解决主信息更新之后界面ui未刷新)
122
+ *
123
+ * @author tony001
124
+ * @date 2024-06-28 08:06:11
125
+ */
126
+ refreshItemUI() {
127
+ const tempItem = {
128
+ key: "exampleItem",
129
+ caption: ""
130
+ };
131
+ this.state.tabItems.push(tempItem);
132
+ this.state.activeTab = tempItem.key;
133
+ setTimeout(() => {
134
+ this.state.tabItems.pop();
135
+ this.state.activeTab = this.state.tabItems[this.state.tabItems.length - 1].key;
136
+ }, 100);
137
+ }
119
138
  }
120
139
 
121
140
  export { NavTabsController };
@@ -0,0 +1,50 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var vue3Util = require('@ibiz-template/vue3-util');
5
+ require('./categories.css');
6
+
7
+ "use strict";
8
+ const Categories = /* @__PURE__ */ vue.defineComponent({
9
+ name: "IBizCategories",
10
+ props: {
11
+ categories: {
12
+ type: Array,
13
+ required: true,
14
+ default: () => []
15
+ },
16
+ current: {
17
+ type: String,
18
+ required: true
19
+ }
20
+ },
21
+ emits: ["select"],
22
+ setup(props, {
23
+ emit
24
+ }) {
25
+ const ns = vue3Util.useNamespace("emoji-categories");
26
+ const onSelect = (category) => {
27
+ emit("select", category);
28
+ };
29
+ return {
30
+ ns,
31
+ onSelect
32
+ };
33
+ },
34
+ render() {
35
+ return vue.createVNode("div", {
36
+ "class": this.ns.b()
37
+ }, [this.categories.map((category) => {
38
+ return vue.createVNode("div", {
39
+ "class": [this.ns.e("category"), this.ns.is("active", category.name === this.current)],
40
+ "onClick": () => this.onSelect(category)
41
+ }, [vue.createVNode("span", {
42
+ "class": this.ns.em("category", "svg"),
43
+ "title": category.label,
44
+ "innerHTML": category.icon
45
+ }, null)]);
46
+ })]);
47
+ }
48
+ });
49
+
50
+ exports.Categories = Categories;
@@ -0,0 +1 @@
1
+ .ibiz-emoji-categories{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;height:var(--ibiz-height-control-default);padding:0 var(--ibiz-spacing-base-loose);overflow-x:auto;background-color:var(--ibiz-color-bg-0)}.ibiz-emoji-categories__category{display:flex;align-items:center;min-width:var(--ibiz-font-size-header-6);height:100%;font-size:var(--ibiz-font-size-header-6);cursor:pointer}.ibiz-emoji-categories__category--svg{line-height:var(--ibiz-font-size-header-6)}.ibiz-emoji-categories__category--svg svg{fill:var(--ibiz-color-text-3)}.ibiz-emoji-categories__category.is-active,.ibiz-emoji-categories__category:hover{position:relative}.ibiz-emoji-categories__category.is-active::after,.ibiz-emoji-categories__category:hover::after{position:absolute;bottom:0;display:block;width:100%;content:"";border-top:.125rem solid var(--ibiz-color-primary)}.ibiz-emoji-categories__category:hover{color:var(--ibiz-color-primary)}.ibiz-emoji-categories__category:hover svg{fill:var(--ibiz-color-primary)}
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var categories = require('./categories.cjs');
4
+
5
+ "use strict";
6
+
7
+ exports.Categories = categories.Categories;
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var vue3Util = require('@ibiz-template/vue3-util');
5
+ require('./category-label.css');
6
+
7
+ "use strict";
8
+ const CategoryLabel = /* @__PURE__ */ vue.defineComponent({
9
+ name: "IBizCategoryLabel",
10
+ props: {
11
+ name: {
12
+ type: String,
13
+ default: ""
14
+ }
15
+ },
16
+ emits: ["select"],
17
+ setup() {
18
+ const ns = vue3Util.useNamespace("emoji-category-label");
19
+ return {
20
+ ns
21
+ };
22
+ },
23
+ render() {
24
+ return vue.createVNode("div", {
25
+ "class": this.ns.b()
26
+ }, [this.name]);
27
+ }
28
+ });
29
+
30
+ exports.CategoryLabel = CategoryLabel;
@@ -0,0 +1 @@
1
+ .ibiz-emoji-category-label{padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-extra-tight);font-size:var(--ibiz-font-size-regular);color:var(--ibiz-color-text-3);text-transform:uppercase}
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var categoryLabel = require('./category-label.cjs');
4
+
5
+ "use strict";
6
+
7
+ exports.CategoryLabel = categoryLabel.CategoryLabel;
@@ -0,0 +1,58 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var vue3Util = require('@ibiz-template/vue3-util');
5
+ require('./emoji-item.css');
6
+
7
+ "use strict";
8
+ const EmojiItem = /* @__PURE__ */ vue.defineComponent({
9
+ name: "IBizEmojiItem",
10
+ props: {
11
+ emoji: {
12
+ type: Object,
13
+ required: true,
14
+ default: () => {
15
+ }
16
+ },
17
+ size: {
18
+ type: Number,
19
+ required: true
20
+ },
21
+ withBorder: {
22
+ type: Boolean,
23
+ required: true
24
+ }
25
+ },
26
+ emits: ["click"],
27
+ setup(props, {
28
+ emit
29
+ }) {
30
+ const ns = vue3Util.useNamespace("emoji-item");
31
+ const styleSize = vue.computed(() => {
32
+ return {
33
+ fontSize: "".concat(props.size - 5, "px"),
34
+ lineHeight: "".concat(props.size, "px"),
35
+ height: "".concat(props.size, "px"),
36
+ width: "".concat(props.size, "px")
37
+ };
38
+ });
39
+ const onClick = () => {
40
+ emit("click", props.emoji);
41
+ };
42
+ return {
43
+ ns,
44
+ styleSize,
45
+ onClick
46
+ };
47
+ },
48
+ render() {
49
+ return vue.createVNode("span", {
50
+ "class": [this.ns.b(), this.ns.is("border", this.withBorder)],
51
+ "style": this.styleSize,
52
+ "onClick": this.onClick,
53
+ "innerHTML": this.emoji.data
54
+ }, null);
55
+ }
56
+ });
57
+
58
+ exports.EmojiItem = EmojiItem;
@@ -0,0 +1 @@
1
+ .ibiz-emoji-item{box-sizing:content-box;display:flex;align-items:center;justify-self:center;padding:var(--ibiz-spacing-tight);overflow:hidden;cursor:pointer}.ibiz-emoji-item.is-border:hover{background:var(--ibiz-color-bg-0);border-radius:var(--ibiz-border-radius-small)}
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var emojiItem = require('./emoji-item.cjs');
4
+
5
+ "use strict";
6
+
7
+ exports.EmojiItem = emojiItem.EmojiItem;
@@ -0,0 +1,167 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var vue3Util = require('@ibiz-template/vue3-util');
5
+ require('../category-label/index.cjs');
6
+ require('../emoji-item/index.cjs');
7
+ require('./emoji-list.css');
8
+ var emojiItem = require('../emoji-item/emoji-item.cjs');
9
+ var categoryLabel = require('../category-label/category-label.cjs');
10
+
11
+ "use strict";
12
+ const searchByAlias = (term, emoji) => {
13
+ const isRelevant = (alias) => alias.toLowerCase().includes(term);
14
+ return emoji.aliases.some((alias) => isRelevant(alias));
15
+ };
16
+ const EmojiList = /* @__PURE__ */ vue.defineComponent({
17
+ name: "IBizEmojiList",
18
+ props: {
19
+ data: {
20
+ type: Object,
21
+ required: true
22
+ },
23
+ emojisByRow: {
24
+ type: Number,
25
+ required: true
26
+ },
27
+ emojiWithBorder: {
28
+ type: Boolean
29
+ },
30
+ emojiSize: {
31
+ type: Number
32
+ },
33
+ filter: {
34
+ type: String,
35
+ default: ""
36
+ },
37
+ continuousList: {
38
+ type: Boolean
39
+ },
40
+ category: {
41
+ type: String,
42
+ default: ""
43
+ },
44
+ categories: {
45
+ type: Object,
46
+ required: true,
47
+ default: () => {
48
+ }
49
+ },
50
+ hasSearch: {
51
+ type: Boolean
52
+ }
53
+ },
54
+ emits: ["select", "data"],
55
+ setup(props, {
56
+ emit
57
+ }) {
58
+ const ns = vue3Util.useNamespace("emoji-list");
59
+ const emojisRef = vue.ref({});
60
+ const categoryRefs = vue.ref({});
61
+ const dataFiltered = vue.computed(() => {
62
+ let data = props.data[props.category];
63
+ const searchValue = props.filter.trim().toLowerCase();
64
+ if (searchValue) {
65
+ data = data.filter((emoji) => searchByAlias(searchValue, emoji));
66
+ }
67
+ return data;
68
+ });
69
+ const categories = vue.computed(() => {
70
+ return Object.keys(props.data);
71
+ });
72
+ const setCategoryRef = (categoryName, el) => {
73
+ if (el) {
74
+ categoryRefs.value[categoryName] = el;
75
+ }
76
+ };
77
+ const calcScrollTop = () => {
78
+ return props.hasSearch ? 88 : 44;
79
+ };
80
+ const gridDynamic = vue.computed(() => {
81
+ const percent = 100 / props.emojisByRow;
82
+ return {
83
+ gridTemplateColumns: "repeat(".concat(props.emojisByRow, ", ").concat(percent, "%)")
84
+ };
85
+ });
86
+ const dataFilteredByCategory = vue.computed(() => {
87
+ const _data = {};
88
+ Object.assign(_data, props.data);
89
+ const searchValue = props.filter.trim().toLowerCase();
90
+ if (searchValue) {
91
+ categories.value.forEach((category) => {
92
+ _data[category] = props.data[category].filter((item) => searchByAlias(searchValue, item));
93
+ });
94
+ }
95
+ return _data;
96
+ });
97
+ const onSelect = (emoji) => {
98
+ emit("select", emoji);
99
+ };
100
+ vue.watch(() => props.data, () => {
101
+ emojisRef.value.$el.scrollTop = 0;
102
+ });
103
+ vue.watch(() => props.category, (newValue) => {
104
+ if (props.continuousList) {
105
+ const categoryEl = categoryRefs.value[newValue].$el;
106
+ emojisRef.value.scrollTop = categoryEl.offsetTop - calcScrollTop();
107
+ }
108
+ });
109
+ const renderGridEmojis = (params) => {
110
+ const {
111
+ emojis,
112
+ style,
113
+ size,
114
+ withBorder
115
+ } = params;
116
+ return emojis && emojis.length > 0 ? vue.createVNode("div", {
117
+ "class": [ns.m("grid-emojis")],
118
+ "style": style
119
+ }, [emojis.map((emoji) => {
120
+ return vue.createVNode(emojiItem.EmojiItem, {
121
+ "emoji": emoji,
122
+ "size": size,
123
+ "withBorder": withBorder,
124
+ "onClick": () => onSelect(emoji)
125
+ }, null);
126
+ })]) : "";
127
+ };
128
+ return {
129
+ ns,
130
+ emojisRef,
131
+ gridDynamic,
132
+ dataFiltered,
133
+ dataFilteredByCategory,
134
+ onSelect,
135
+ setCategoryRef,
136
+ renderGridEmojis
137
+ };
138
+ },
139
+ render() {
140
+ return vue.createVNode("div", {
141
+ "class": [this.ns.b()]
142
+ }, [vue.createVNode("div", {
143
+ "ref": "emojisRef",
144
+ "class": [this.ns.e("container")]
145
+ }, [this.continuousList ? Object.keys(this.dataFilteredByCategory).map((categoryName) => {
146
+ const category = this.dataFilteredByCategory[categoryName];
147
+ const categoriesItem = this.categories[categoryName];
148
+ const labelName = categoriesItem ? categoriesItem.text : categoryName;
149
+ return vue.createVNode("div", null, [category.length ? vue.createVNode(categoryLabel.CategoryLabel, {
150
+ "name": labelName,
151
+ "ref": (el) => this.setCategoryRef(categoryName, el)
152
+ }, null) : "", this.renderGridEmojis({
153
+ emojis: category,
154
+ style: this.gridDynamic,
155
+ size: this.emojiSize,
156
+ withBorder: this.emojiWithBorder
157
+ })]);
158
+ }) : this.renderGridEmojis({
159
+ emojis: this.dataFiltered || [],
160
+ style: this.gridDynamic,
161
+ size: this.emojiSize,
162
+ withBorder: this.emojiWithBorder
163
+ })])]);
164
+ }
165
+ });
166
+
167
+ exports.EmojiList = EmojiList;
@@ -0,0 +1 @@
1
+ .ibiz-emoji-list{display:block;width:100%;max-width:100%;padding:0 var(--ibiz-spacing-tight);padding-bottom:var(--ibiz-spacing-tight)}.ibiz-emoji-list ::-webkit-scrollbar{width:.25rem;margin-right:-4px;overflow:hidden;border-radius:.25rem}.ibiz-emoji-list__container{height:100%;max-height:24vh;padding:0 var(--ibiz-spacing-extra-tight);overflow-y:scroll}.ibiz-emoji-list--grid-emojis{display:grid;justify-items:center}
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var emojiList = require('./emoji-list.cjs');
4
+
5
+ "use strict";
6
+
7
+ exports.EmojiList = emojiList.EmojiList;
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ require('./categories/index.cjs');
4
+ require('./category-label/index.cjs');
5
+ require('./emoji-item/index.cjs');
6
+ require('./emoji-list/index.cjs');
7
+ require('./input-search/index.cjs');
8
+ var categories = require('./categories/categories.cjs');
9
+ var categoryLabel = require('./category-label/category-label.cjs');
10
+ var emojiItem = require('./emoji-item/emoji-item.cjs');
11
+ var emojiList = require('./emoji-list/emoji-list.cjs');
12
+ var inputSearch = require('./input-search/input-search.cjs');
13
+
14
+ "use strict";
15
+
16
+ exports.Categories = categories.Categories;
17
+ exports.CategoryLabel = categoryLabel.CategoryLabel;
18
+ exports.EmojiItem = emojiItem.EmojiItem;
19
+ exports.EmojiList = emojiList.EmojiList;
20
+ exports.InputSearch = inputSearch.InputSearch;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var inputSearch = require('./input-search.cjs');
4
+
5
+ "use strict";
6
+
7
+ exports.InputSearch = inputSearch.InputSearch;
@@ -0,0 +1,51 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var vue3Util = require('@ibiz-template/vue3-util');
5
+ require('../../icons/index.cjs');
6
+ require('./input-search.css');
7
+ var search = require('../../icons/search.cjs');
8
+
9
+ "use strict";
10
+ const InputSearch = /* @__PURE__ */ vue.defineComponent({
11
+ name: "IBizInputSearch",
12
+ emits: ["update"],
13
+ setup(props, {
14
+ emit
15
+ }) {
16
+ const ns = vue3Util.useNamespace("emoji-input-search");
17
+ const inputSearch = vue.ref("");
18
+ const onSearch = () => {
19
+ emit("update", inputSearch.value);
20
+ };
21
+ const handleKeyUp = (e) => {
22
+ if (e && e.code === "Enter") {
23
+ onSearch();
24
+ }
25
+ };
26
+ return {
27
+ ns,
28
+ inputSearch,
29
+ onSearch,
30
+ handleKeyUp
31
+ };
32
+ },
33
+ render() {
34
+ return vue.createVNode("div", {
35
+ "class": [this.ns.b()]
36
+ }, [vue.createVNode("div", {
37
+ "class": this.ns.e("container"),
38
+ "onKeyup": this.handleKeyUp
39
+ }, [vue.createVNode("div", {
40
+ "class": this.ns.em("container", "search"),
41
+ "onClick": this.onSearch
42
+ }, [search.SearchSvg()]), vue.withDirectives(vue.createVNode("input", {
43
+ "class": this.ns.em("container", "input"),
44
+ "type": "text",
45
+ "onUpdate:modelValue": ($event) => this.inputSearch = $event,
46
+ "placeholder": ibiz.i18n.t("app.search")
47
+ }, null), [[vue.vModelText, this.inputSearch]])])]);
48
+ }
49
+ });
50
+
51
+ exports.InputSearch = InputSearch;
@@ -0,0 +1 @@
1
+ .ibiz-emoji-input-search{display:block;width:100%;max-width:100%}.ibiz-emoji-input-search__container{position:relative;box-sizing:border-box;display:flex;justify-content:center;width:100%;padding:0 var(--ibiz-spacing-base-loose);margin:var(--ibiz-spacing-base) 0 var(--ibiz-spacing-tight) 0}.ibiz-emoji-input-search__container--input{box-sizing:border-box;width:100%;height:var(--ibiz-height-control-default);padding:0 var(--ibiz-spacing-tight);padding-right:calc(var(--ibiz-spacing-tight) * 2 + var(--ibiz-font-size-regular));border:none;border-radius:var(--ibiz-border-radius-small);box-shadow:0 0 0 1px var(--ibiz-color-border) inset}.ibiz-emoji-input-search__container--input:focus{outline:0;box-shadow:0 0 0 1px var(--ibiz-color-primary) inset}.ibiz-emoji-input-search__container--search{position:absolute;top:50%;right:var(--ibiz-spacing-base-loose);padding:0 var(--ibiz-spacing-tight);cursor:pointer;transform:translate(0,-50%)}.ibiz-emoji-input-search__container--search::after{position:absolute;top:50%;right:calc(var(--ibiz-spacing-tight) * 2 + var(--ibiz-font-size-regular));display:block;width:1px;height:var(--ibiz-font-size-regular);content:"";border-left:1px solid var(--ibiz-color-border);transform:translate(0,-50%)}.ibiz-emoji-input-search__container--search svg{fill:var(--ibiz-color-text-3)}.ibiz-emoji-input-search__container:hover input{box-shadow:0 0 0 1px var(--ibiz-color-primary) inset}