Browse Source

Merge pull request #224173 in DEC/fineui from final/11.0 to persist/11.0

* commit 'cd4e269f7a9596543130a11431efb7c6f7e23403': (50 commits)
  auto upgrade version to 2.0.20230202142959
  JSY-26079 update: 去除 multi_select_insert_no_bar_list 的全选配置
  Revert "JSY-26063 fix: 前端搜索支持配置大小写敏感"
  JSY-26079 feat: multi_select_insert_no_bar_list 搜索面板全选按钮支持可选
  JSY-26063 fix: 前端搜索支持配置大小写敏感
  auto upgrade version to 2.0.20230130114621
  auto upgrade version to 2.0.20230130112753
  无jira 去掉grunt
  无jira 去掉grunt
  auto upgrade version to 2.0.20230113121657
  auto upgrade version to 2.0.20230112210841
  JSY-25995 feat: TextValueCombo 支持 EVENT_BEFORE_POPUPVIEW 事件监听
  Update demo/app.js
  auto upgrade version to 2.0.20230109200447
  无jira refact:删除没有用的 less
  auto upgrade version to 2.0.20230109102030
  auto upgrade version to 2.0.20230107203454
  JSY-25808 fix: fineui-复选下拉框bug
  auto upgrade version to 2.0.20230106121528
  auto upgrade version to 2.0.20230106114746
  ...
research/test
superman 2 years ago
parent
commit
56190b3df3
  1. 3
      bi.lessconfig.json
  2. 3
      demo/app.js
  3. 4
      demo/js/core/abstract/combination/demo.combo_group.js
  4. BIN
      dist/font/iconfont.eot
  5. 18
      dist/font/iconfont.svg
  6. BIN
      dist/font/iconfont.ttf
  7. BIN
      dist/font/iconfont.woff
  8. BIN
      dist/font/iconfont.woff2
  9. 9
      lib/postbuild/postbuild.js
  10. 4
      package.json
  11. 2
      src/base/single/editor/editor.js
  12. 2
      src/case/calendar/calendar.js
  13. 4
      src/case/combo/textvaluecombo/combo.textvalue.js
  14. 6
      src/case/combo/textvaluecombo/popup.textvalue.js
  15. 4
      src/case/editor/editor.sign.js
  16. 13
      src/core/2.base.js
  17. 2
      src/core/platform/web/dom.js
  18. 11053
      src/core/platform/web/jquery/_jquery.js
  19. 4
      src/core/utils/chinesePY.js
  20. 5
      src/less/case/calendar/calendar.less
  21. 89
      src/widget/multiselect/multiselect.combo.nobar.js
  22. 90
      src/widget/multiselect/multiselect.insert.combo.js
  23. 87
      src/widget/multiselect/multiselect.insert.combo.nobar.js
  24. 30
      src/widget/multiselect/multiselect.insert.trigger.js
  25. 35
      src/widget/multiselect/multiselect.trigger.js
  26. 6
      src/widget/multiselect/search/multiselect.search.insert.pane.js
  27. 96
      src/widget/multiselect/search/multiselect.search.loader.js
  28. 23
      src/widget/multiselect/trigger/searcher.multiselect.insert.js
  29. 23
      src/widget/multiselect/trigger/searcher.multiselect.js
  30. 3
      src/widget/multiselectlist/multiselectlist.insert.nobar.js
  31. 51
      src/widget/numbereditor/number.editor.js
  32. 120
      src/widget/yearmonth/combo.yearmonth.js
  33. 122
      src/widget/yearquarter/combo.yearquarter.js
  34. 1
      typescript/case/combo/combo.textvalue.ts
  35. 11
      typescript/core/base.ts

3
bi.lessconfig.json

@ -29,7 +29,8 @@
"@color-bi-background-disabled-active-radio-content-theme-dark": "#606479", "@color-bi-background-disabled-active-radio-content-theme-dark": "#606479",
"@color-bi-background-disabled-active-checkbox-content": "#FFFFFF", "@color-bi-background-disabled-active-checkbox-content": "#FFFFFF",
"@color-bi-background-disabled-active-checkbox-content-theme-dark": "#606479", "@color-bi-background-disabled-active-checkbox-content-theme-dark": "#606479",
"@color-bi-background-tooltip-success": "#2E3A4D", "@color-bi-background-tooltip-success": "#3F506A",
"@color-bi-background-tooltip-failure": "#E65251",
"@color-bi-border-tooltip-success": "#2E3A4D", "@color-bi-border-tooltip-success": "#2E3A4D",
"@color-bi-background-toast-success": "#FFFFFF", "@color-bi-background-toast-success": "#FFFFFF",
"@color-bi-background-toast-warning": "#FFFFFF", "@color-bi-background-toast-warning": "#FFFFFF",

3
demo/app.js

@ -1,6 +1,9 @@
Demo = { Demo = {
version: 1.0 version: 1.0
}; };
BI.EVENT_BLUR = false
BI.$(function () { BI.$(function () {
var ref; var ref;

4
demo/js/core/abstract/combination/demo.combo_group.js

@ -12,7 +12,7 @@ Demo.Func = BI.inherit(BI.Widget, {
height: 25, height: 25,
iconCls: "close-ha-font" iconCls: "close-ha-font"
}, },
children: [{ items: [{
type: "bi.single_select_item", type: "bi.single_select_item",
height: 25, height: 25,
text: "一月", text: "一月",
@ -63,7 +63,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}, },
width: 200 width: 200
}); });
childCombo.setValue(BI.deepClone(this.child)[0].children[0].value); childCombo.setValue(BI.deepClone(this.child)[0].items[0].value);
return BI.createWidget({ return BI.createWidget({
type: "bi.left", type: "bi.left",

BIN
dist/font/iconfont.eot vendored

Binary file not shown.

18
dist/font/iconfont.svg vendored

@ -14,6 +14,24 @@
/> />
<missing-glyph /> <missing-glyph />
<glyph glyph-name="piliangjiejue" unicode="&#59867;" d="M800 800a128 128 0 0 0 128-128v-576a128 128 0 0 0-128-128h-576a128 128 0 0 0-128 128v576a128 128 0 0 0 128 128h576z m0-64h-576a64 64 0 0 1-63.552-56.512L160 672v-576a64 64 0 0 1 56.512-63.552l7.488-0.448h576a64 64 0 0 1 63.552 56.512l0.448 7.488v576a64 64 0 0 1-56.512 63.552L800 736z m-49.792-199.488l4.48-3.712a32 32 0 0 0 3.648-40.832l-3.712-4.416-275.84-275.84a32 32 0 0 0-40.832-3.712l-4.48 3.712-152.192 152.192a32 32 0 0 0 40.832 48.96l4.48-3.712L456.064 279.68l253.312 253.184a32 32 0 0 0 40.832 3.712z" horiz-adv-x="1024" />
<glyph glyph-name="shujujieshi1" unicode="&#59868;" d="M809.152 800c65.344 0 118.848-53.504 118.848-118.848v-475.456a119.232 119.232 0 0 0-118.848-118.848H448v-83.2c0-23.744-17.856-35.648-35.648-35.648-5.952 0-11.904 0-17.856 5.952l-124.8 112.896h-54.848A119.232 119.232 0 0 0 96 205.696V681.152c0 65.344 53.504 118.848 118.848 118.848z m0-59.456H214.848c-35.648 0-59.392-23.744-59.392-59.392v-475.456c0-35.648 23.744-59.392 59.392-59.392h54.848c11.904 0 29.76-5.952 41.6-17.856l77.248-71.296v29.696c0 17.856 5.952 29.696 17.856 41.6a53.952 53.952 0 0 0 41.6 17.856h361.152c35.648 0 59.392 23.744 59.392 59.392V681.152c0 35.648-23.744 59.392-59.392 59.392zM512 640a32 32 0 0 0 32-32v-320a32 32 0 0 0-64 0v320A32 32 0 0 0 512 640z m160-192a32 32 0 0 0 32-32v-128a32 32 0 1 0-64 0v128a32 32 0 0 0 32 32z m-320 64a32 32 0 0 0 32-32v-192a32 32 0 0 0-64 0v192a32 32 0 0 0 32 32z" horiz-adv-x="1024" />
<glyph glyph-name="yanqi" unicode="&#59869;" d="M602.816 10.752l15.104-62.144a444.928 444.928 0 0 0-68.032-11.072l-5.376 63.744c19.712 1.664 39.168 4.864 58.24 9.472z m112.448 47.424l33.92-54.272a448.64 448.64 0 0 0-61.12-31.936l-25.152 58.88a384.64 384.64 0 0 1 52.352 27.328z m88.832 76.48l48.64-41.6a449.984 449.984 0 0 0-48.64-48.768l-41.728 48.512c14.976 12.864 28.928 26.88 41.728 41.856z m63.04 103.04l59.2-24.384c-8.768-21.312-19.2-41.92-31.104-61.568l-54.72 33.28c10.24 16.768 19.136 34.368 26.624 52.608zM512 632.96a32 32 0 0 0 31.488-26.24l0.512-5.76-0.064-200.896L723.2 265.408a32 32 0 0 0 9.408-39.872l-3.008-4.928a32 32 0 0 0-39.936-9.408l-4.864 3.072-192 144.128a32 32 0 0 0-12.224 19.648L480 384V600.96a32 32 0 0 0 32 32z m382.72-280.32l63.808-5.312-0.96-9.984a452.544 452.544 0 0 0-9.984-58.176l-62.208 14.912c2.56 10.88 4.736 21.888 6.4 33.024l2.688 22.336 0.256 3.2z m55.04 127.04c4.928-22.4 8.064-45.248 9.472-68.352l-63.872-3.84a381.184 381.184 0 0 1-8.128 58.496l62.528 13.696z m-251.264 240.064l-2.56 1.408-2.368 1.28-3.712 1.984-0.96 0.512 0.384-0.256-2.944 1.536-1.792 0.896-4.16 2.048-16.768 7.68a383.296 383.296 0 0 1-87.104 25.728l2.048-0.384-3.84 0.64-10.24 1.6a391.616 391.616 0 0 1-12.032 1.472h0.064-0.64l-14.08 1.28a384 384 0 0 1-78.464-2.688l-19.008-3.136-14.592-3.072-5.184-1.28a382.08 382.08 0 0 1-59.904-19.968l-16.32-7.552-16.256-8.32a385.408 385.408 0 0 1-16.512-9.6l-1.216-0.768-1.344-0.832-0.448-0.256-0.64-0.448-0.448-0.256-14.848-9.856c-10.752-7.488-21.12-15.488-31.04-24.064l-13.312-11.968a385.472 385.472 0 0 1-72.512-93.44l-0.896-1.664-7.168-13.824-0.96-1.92-0.96-1.984-1.6-3.328-2.816-6.144 1.28 2.688-1.792-3.84-0.32-0.64 0.32 0.64-0.64-1.6V538.24l-3.904-9.28a382.208 382.208 0 0 1-19.392-62.464l-1.92-9.408-1.984-11.392a388.608 388.608 0 0 1-2.88-21.504l-0.512-5.504-0.768-8.832c-1.536-23.168-1.024-46.08 1.472-68.48l2.112-16.128 3.072-17.152 1.344-6.656 0.32-1.472 0.384-1.6 4.48-17.664c5.696-20.096 12.928-39.552 21.568-58.24l6.912-14.08 1.728-3.328 1.536-2.944 1.024-1.856 3.264-5.76 2.112-3.712 4.8-8c1.92-3.2 3.904-6.272 5.952-9.408l6.528-9.6c6.336-8.96 12.992-17.728 20.096-26.176l9.728-11.2 11.968-12.608c4.224-4.288 8.576-8.448 12.992-12.544l0.64-0.64 1.792-1.6 2.432-2.176-2.432 2.176 6.144-5.44c2.88-2.496 5.76-4.928 8.768-7.36l0.832-0.64c16.448-13.376 34.048-25.408 52.672-35.904l12.544-6.848 2.688-1.28 14.272-6.912 6.08-2.688c22.528-9.856 46.208-17.536 70.912-22.976l0.96-0.192 12.928-2.56c4.672-0.832 9.408-1.6 14.08-2.304l6.592-0.832a405.12 405.12 0 0 1 25.28-2.368l-3.84-63.872a455.296 455.296 0 0 0-20.032 1.664l-0.448 0.064h0.064l-13.056 1.6-3.008 0.32a455.232 455.232 0 0 0-8.128 1.28l-7.232 1.152-11.456 2.176a312.96 312.96 0 0 0-5.248 1.152 445.824 445.824 0 0 0-66.368 19.776h0.064l-2.304 0.896a444.48 444.48 0 0 0-17.6 7.296l2.56-1.088-5.824 2.56a441.664 441.664 0 0 0-35.904 18.176l-3.2 1.856a445.76 445.76 0 0 0-40.32 26.24l-19.008 14.656-2.048 1.664-8 6.72-7.744 6.912a449.92 449.92 0 0 0-72.128 83.648l-8.704 13.696 6.976-11.008-7.04 11.008-1.6 2.56 0.832-1.28-1.024 1.6-0.128 0.192-0.192 0.32-4.544 7.808a445.056 445.056 0 0 0-43.968 105.088l-0.64 2.368-2.944 11.84-1.216 5.12-0.768 3.392 0.512-2.24-1.28 5.696a431.552 431.552 0 0 0-6.592 40.96l-0.32 3.008a446.72 446.72 0 0 0-2.432 59.904l0.704 15.808 0.384 5.76a455.68 455.68 0 0 0 1.28 13.76v0.96l0.32 2.56 0.64 5.12 0.384 3.072 0.064 0.704 0.32 2.432 0.128 0.448 1.408 9.472a445.12 445.12 0 0 0 29.12 101.952l0.192 0.448c2.56 6.208 5.568 12.8 8.704 19.328l1.024 2.176c13.248 27.392 29.248 53.12 47.488 76.992l4.672 5.888 0.64 0.704 4.992 6.208 2.432 3.008 6.4 7.424a449.024 449.024 0 0 0 82.24 73.024l2.816 1.92A449.92 449.92 0 0 0 381.696 812.8l3.968 1.216 1.408 0.384c13.696 4.032 27.712 7.36 41.856 9.984l3.776 0.704c24.64 4.48 49.92 6.848 75.584 7.04l19.328-0.32a453.76 453.76 0 0 0 31.232-2.176h0.128l10.816-1.28 1.472-0.192 1.28-0.192 8.064-1.152-3.392 0.448 7.168-1.088a458.752 458.752 0 0 0 86.4-23.104l21.312-8.704 3.2-1.408 4.416-1.984 3.712-1.792 2.56-1.152a444.992 444.992 0 0 0 24.64-12.8l5.632-3.2a464.64 464.64 0 0 0 16.64-10.176c33.024-21.056 63.232-46.4 89.728-75.392l1.6-1.92c6.528-7.04 12.8-14.464 18.816-22.08l10.688 101.888a32 32 0 0 0 29.44 28.544l5.76-0.064a32 32 0 0 0 28.544-29.44l-0.064-5.76-20.096-190.912a32 32 0 0 0-29.44-28.608l-5.76 0.128-190.912 20.032a32 32 0 0 0 0.896 63.744l5.76-0.064 125.504-13.12a385.664 385.664 0 0 1-6.656 8.96l-7.68 9.664-12.736 14.72-13.44 14.08-2.56 2.56 0.64-0.512-1.216 1.024-1.024 0.96-2.176 2.176a385.6 385.6 0 0 1-6.528 6.08l6.848-6.528-11.072 10.304a383.04 383.04 0 0 1-67.2 47.488z" horiz-adv-x="1024" />
<glyph glyph-name="moxingshitu" unicode="&#59864;" d="M379.184 708C363.404 765.64 310.648 808 248 808c-75.112 0-136-60.888-136-136s60.888-136 136-136c62.648 0 115.4 42.36 131.184 100h354.524c58.904 0 106.652-47.988 106.652-107.188 0-59.196-47.748-107.188-106.652-107.188h-90.98C626.408 478.436 574.056 520 512 520c-62.056 0-114.408-41.564-130.728-98.376H297.9C197.44 421.624 116 339.776 116 238.812 116 137.848 197.44 56 297.9 56h345.888c14.388-59.668 68.124-104 132.212-104 75.112 0 136 60.888 136 136s-60.888 136-136 136c-61.188 0-112.94-40.412-130.024-96h-348.08c-60.892 0-110.256 49.612-110.256 110.812 0 61.2 49.364 110.812 110.26 110.812h82.48C395.608 291.156 448.764 248 512 248c63.236 0 116.392 43.156 131.62 101.624h90.088c98.468 0 178.292 80.224 178.292 179.188C912 627.772 832.176 708 733.708 708h-354.52zM248 736c35.348 0 64-28.652 64-64s-28.652-64-64-64-64 28.652-64 64 28.652 64 64 64z m528-584c35.348 0 64-28.652 64-64s-28.652-64-64-64-64 28.652-64 64 28.652 64 64 64z m-328 232c0 35.348 28.652 64 64 64s64-28.652 64-64-28.652-64-64-64-64 28.652-64 64z" horiz-adv-x="1024" />
<glyph glyph-name="fenxishitu" unicode="&#59865;" d="M896 532V752a16 16 0 0 1-16 16h-161.716c-13 35.036-46.728 60-86.284 60H392c-39.56 0-73.28-24.964-86.28-60H144a16 16 0 0 1-16-16v-752a16 16 0 0 1 16-16h256v64H200a8 8 0 0 0-8 8V696a8 8 0 0 0 8 8h105.72C318.72 668.964 352.44 644 392 644h240c39.556 0 73.284 24.964 86.284 60H824a8 8 0 0 0 8-8v-164h64zM392 708a28 28 0 1 0 0 56h240a28 28 0 1 0 0-56H392zM531.608 148.596a16 16 0 0 1-4.672-11.3v-135.776a16 16 0 0 1 16-16h135.752a16.016 16.016 0 0 1 11.332 4.7l295.248 296.092a16.004 16.004 0 0 1-0.016 22.612l-135.764 135.764a16 16 0 0 1-22.644-0.016l-295.236-296.076z m59.328-31.14l247.284 247.988 67.884-67.884-247.34-248.04h-67.828v67.936zM779.256 503.432a8 8 0 0 1 0 11.312l-39.6 39.6a8 8 0 0 1-11.312 0l-150.888-150.888-148.344 148.344a8 8 0 0 1-11.312 0l-172.144-172.144a8 8 0 0 1 0-11.312l39.6-39.6a8 8 0 0 1 11.312 0l126.888 126.888 148.344-148.344a8 8 0 0 1 11.312 0l196.144 196.144z" horiz-adv-x="1024" />
<glyph glyph-name="zhutixieyuan" unicode="&#59866;" d="M336 552h360.66c-1.348-33.18-6.908-56.656-14.484-73.496-8.528-18.964-20.592-31.728-36.12-40.676-33.324-19.212-79.596-19.828-134.056-19.828h-3.412c-50 0.016-107.364 0.028-151.952-25.672-23.936-13.8-48.76-35.16-63.256-67.388-13.104-29.132-20.16-65.196-21.236-108.94H96a16 16 0 0 1-16-16v-232a16 16 0 0 1 16-16h592a16 16 0 0 1 16 16v232a16 16 0 0 1-16 16H327.2c1.052 35.304 6.748 59.984 14.624 77.496 8.528 18.964 20.592 31.728 36.12 40.676 33.324 19.212 79.596 19.828 134.056 19.828h3.412c50-0.016 107.364-0.028 151.952 25.672 23.936 13.8 48.764 35.16 63.256 67.388 12.7 28.24 19.72 62.992 21.12 104.94H928a16 16 0 0 1 16 16V800a16 16 0 0 1-16 16H336a16 16 0 0 1-16-16v-232a16 16 0 0 1 16-16z m48 64V752h496v-136H384z m256-600H144v136h496v-136z" horiz-adv-x="1024" />
<glyph glyph-name="quanbuzhankai" unicode="&#59863;" d="M152 752a16 16 0 0 0 16 16h688a16 16 0 0 0 16-16v-264a16 16 0 0 0-16-16H168a16 16 0 0 0-16 16V752z m64-48v-168h592V704H216zM218.628 375.312a15.992 15.992 0 0 0 22.628 0l272.224-272.224 271.836 271.836a16 16 0 0 0 22.628 0l33.94-33.944a16 16 0 0 0 0-22.628l-316.784-316.78a15.992 15.992 0 0 0-17.636-3.388 15.916 15.916 0 0 0-5.992 3.776l-316.784 316.784a16 16 0 0 0 0 22.628l33.94 33.94z" horiz-adv-x="1024" />
<glyph glyph-name="quanbuzhedie" unicode="&#59862;" d="M168 672a16 16 0 0 1-16-16v-48a16 16 0 0 1 16-16h688a16 16 0 0 1 16 16V656a16 16 0 0 1-16 16H168zM806.276 101.444a15.996 15.996 0 0 0-22.628 0l-273.456 273.456-272.936-272.94a16 16 0 0 0-22.628 0l-33.94 33.944a15.996 15.996 0 0 0 0 22.624l316.784 316.784a15.984 15.984 0 0 0 15.44 4.148c3.824-0.188 7.6-1.744 10.52-4.664l316.784-316.784a16 16 0 0 0 0-22.628l-33.94-33.94z" horiz-adv-x="1024" />
<glyph glyph-name="shujubidui" unicode="&#59861;" d="M96-48a16 16 0 0 0-16 16V800a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-832a16 16 0 0 0-16-16H96z m116 144h56a8 8 0 0 1 8 8v56a8 8 0 0 1-8 8H212a8 8 0 0 1-8-8v-56a8 8 0 0 1 8-8z m-8 152a8 8 0 0 1 8-8h56a8 8 0 0 1 8 8v56a8 8 0 0 1-8 8H212a8 8 0 0 1-8-8v-56z m492-224V744h176v-720h-176z m-72-56a16 16 0 0 1 16-16h288a16 16 0 0 1 16 16V800a16 16 0 0 1-16 16h-288a16 16 0 0 1-16-16v-832z m124 192a8 8 0 0 0 8 8h56a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8h-56a8 8 0 0 0-8 8v56z m8 152a8 8 0 0 1-8-8v-56a8 8 0 0 1 8-8h56a8 8 0 0 1 8 8v56a8 8 0 0 1-8 8h-56z m-280 392a8 8 0 0 1 8-8h56a8 8 0 0 1 8 8V808a8 8 0 0 1-8 8h-56a8 8 0 0 1-8-8v-104z m0-184a8 8 0 0 1 8-8h56a8 8 0 0 1 8 8V620a8 8 0 0 1-8 8h-56a8 8 0 0 1-8-8v-100z m8-196a8 8 0 0 0-8 8v104a8 8 0 0 0 8 8h56a8 8 0 0 0 8-8v-104a8 8 0 0 0-8-8h-56z m-8-176a8 8 0 0 1 8-8h56a8 8 0 0 1 8 8v100a8 8 0 0 1-8 8h-56a8 8 0 0 1-8-8v-100z m8-196a8 8 0 0 0-8 8v104a8 8 0 0 0 8 8h56a8 8 0 0 0 8-8v-104a8 8 0 0 0-8-8h-56z" horiz-adv-x="1024" />
<glyph glyph-name="qitaziduanleixing" unicode="&#59860;" d="M168 704a8 8 0 0 1-8-8v-64a8 8 0 0 1 8-8h688a8 8 0 0 1 8 8V696a8 8 0 0 1-8 8H168z m-8-288a8 8 0 0 0 8 8h688a8 8 0 0 0 8-8v-64a8 8 0 0 0-8-8H168a8 8 0 0 0-8 8v64z m0-280a8 8 0 0 0 8 8h688a8 8 0 0 0 8-8v-64a8 8 0 0 0-8-8H168a8 8 0 0 0-8 8v64z" horiz-adv-x="1024" /> <glyph glyph-name="qitaziduanleixing" unicode="&#59860;" d="M168 704a8 8 0 0 1-8-8v-64a8 8 0 0 1 8-8h688a8 8 0 0 1 8 8V696a8 8 0 0 1-8 8H168z m-8-288a8 8 0 0 0 8 8h688a8 8 0 0 0 8-8v-64a8 8 0 0 0-8-8H168a8 8 0 0 0-8 8v64z m0-280a8 8 0 0 0 8 8h688a8 8 0 0 0 8-8v-64a8 8 0 0 0-8-8H168a8 8 0 0 0-8 8v64z" horiz-adv-x="1024" />
<glyph glyph-name="ziyuankongzhi" unicode="&#59859;" d="M450.328 754.728A16.008 16.008 0 0 1 438.46 760H128a16 16 0 0 1-16-16v-720a16 16 0 0 1 16-16h766.952a16 16 0 0 1 16 16V615.88a16 16 0 0 1-16 16H800.48l-71.752 75.168A16 16 0 0 1 717.152 712h-228.196l-38.628 42.728z m-273.76-67.136h244.58l116.408-123.936h308.828V318h-105.62a8.008 8.008 0 0 0-6.544 3.396l-121.548 172.728a8 8 0 0 1-13.056 0.04l-159.992-224.36a8 8 0 0 0-13.172 0.208l-93.216 139.824a8 8 0 0 1-12.676 0.828l-78.688-89.932a8 8 0 0 0-6.024-2.732h-59.28V687.592z m0-433.592h88.32a8 8 0 0 1 6.024 2.732l42.768 48.88a8 8 0 0 0 12.676-0.832l98.324-147.484a8 8 0 0 1 13.168-0.208l161.42 226.36a8 8 0 0 0 13.056-0.04l88.676-126.012a8 8 0 0 1 6.544-3.396h138.84v-173.592H176.564V254z" horiz-adv-x="1024" /> <glyph glyph-name="ziyuankongzhi" unicode="&#59859;" d="M450.328 754.728A16.008 16.008 0 0 1 438.46 760H128a16 16 0 0 1-16-16v-720a16 16 0 0 1 16-16h766.952a16 16 0 0 1 16 16V615.88a16 16 0 0 1-16 16H800.48l-71.752 75.168A16 16 0 0 1 717.152 712h-228.196l-38.628 42.728z m-273.76-67.136h244.58l116.408-123.936h308.828V318h-105.62a8.008 8.008 0 0 0-6.544 3.396l-121.548 172.728a8 8 0 0 1-13.056 0.04l-159.992-224.36a8 8 0 0 0-13.172 0.208l-93.216 139.824a8 8 0 0 1-12.676 0.828l-78.688-89.932a8 8 0 0 0-6.024-2.732h-59.28V687.592z m0-433.592h88.32a8 8 0 0 1 6.024 2.732l42.768 48.88a8 8 0 0 0 12.676-0.832l98.324-147.484a8 8 0 0 1 13.168-0.208l161.42 226.36a8 8 0 0 0 13.056-0.04l88.676-126.012a8 8 0 0 1 6.544-3.396h138.84v-173.592H176.564V254z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 819 KiB

After

Width:  |  Height:  |  Size: 830 KiB

BIN
dist/font/iconfont.ttf vendored

Binary file not shown.

BIN
dist/font/iconfont.woff vendored

Binary file not shown.

BIN
dist/font/iconfont.woff2 vendored

Binary file not shown.

9
lib/postbuild/postbuild.js

@ -1,9 +1,9 @@
const { resolve } = require("path"); const { resolve } = require("path");
const { existsSync, mkdirSync, readFileSync, writeFileSync } = require("fs"); const { existsSync, mkdirSync, readFileSync, writeFileSync } = require("fs");
const rimraf = require("rimraf"); const rimraf = require("rimraf");
const grunt = require("grunt");
const concat = require("concat"); const concat = require("concat");
const { config } = require("../../webpack/attachments") const glob = require("glob");
const { config } = require("../../webpack/attachments");
const dest = resolve(__dirname, '../../dist'); const dest = resolve(__dirname, '../../dist');
@ -25,10 +25,7 @@ const deleteList = [
"2.0/fineui_without_normalize.min.js.map", "2.0/fineui_without_normalize.min.js.map",
"fineui_without_normalize.min.js", "fineui_without_normalize.min.js",
"fineui_without_normalize.min.js.map", "fineui_without_normalize.min.js.map",
].concat(grunt.file.expand({}, [ ].concat(glob.sync("dist/**/*.css.map").map(name => name.replace("dist/", "")));
"dist/*.css.map",
"dist/**/*.css.map",
]).map(name => name.replace("dist/", "")));
deleteList.forEach(filename => { deleteList.forEach(filename => {
const sourcefile = resolve(dest, `./${filename}`); const sourcefile = resolve(dest, `./${filename}`);

4
package.json

@ -1,6 +1,6 @@
{ {
"name": "fineui", "name": "fineui",
"version": "2.0.20221218194544", "version": "2.0.20230202142959",
"description": "fineui", "description": "fineui",
"main": "dist/fineui_without_conflict.min.js", "main": "dist/fineui_without_conflict.min.js",
"types": "dist/lib/index.d.ts", "types": "dist/lib/index.d.ts",
@ -29,7 +29,6 @@
"express": "4.15.2", "express": "4.15.2",
"fork-ts-checker-webpack-plugin": "1.4.3", "fork-ts-checker-webpack-plugin": "1.4.3",
"glob": "^7.2.0", "glob": "^7.2.0",
"grunt": "^1.0.1",
"html-webpack-plugin": "3.2.0", "html-webpack-plugin": "3.2.0",
"husky": "^3.1.0", "husky": "^3.1.0",
"karma": "3.1.4", "karma": "3.1.4",
@ -89,6 +88,7 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@types/yargs": "17.0.13", "@types/yargs": "17.0.13",
"jquery": "3.6.3",
"yargs": "17.6.2" "yargs": "17.6.2"
} }
} }

2
src/base/single/editor/editor.js

@ -109,6 +109,7 @@ BI.Editor = BI.inherit(BI.Single, {
if (e.keyCode !== BI.KeyCode.TAB && self.watermark) { if (e.keyCode !== BI.KeyCode.TAB && self.watermark) {
self.watermark.invisible(); self.watermark.invisible();
} }
self.fireEvent(BI.Editor.EVENT_QUICK_DOWN, arguments);
}); });
this.editor.on(BI.Input.EVENT_VALID, function () { this.editor.on(BI.Input.EVENT_VALID, function () {
@ -360,6 +361,7 @@ BI.Editor.EVENT_FOCUS = "EVENT_FOCUS";
BI.Editor.EVENT_BLUR = "EVENT_BLUR"; BI.Editor.EVENT_BLUR = "EVENT_BLUR";
BI.Editor.EVENT_CLICK = "EVENT_CLICK"; BI.Editor.EVENT_CLICK = "EVENT_CLICK";
BI.Editor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.Editor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.Editor.EVENT_QUICK_DOWN = "EVENT_QUICK_DOWN";
BI.Editor.EVENT_SPACE = "EVENT_SPACE"; BI.Editor.EVENT_SPACE = "EVENT_SPACE";
BI.Editor.EVENT_BACKSPACE = "EVENT_BACKSPACE"; BI.Editor.EVENT_BACKSPACE = "EVENT_BACKSPACE";

2
src/case/calendar/calendar.js

@ -170,7 +170,7 @@ BI.Calendar = BI.inherit(BI.Widget, {
forceSelected: true, forceSelected: true,
value: year + "-" + month + "-" + td.text, value: year + "-" + month + "-" + td.text,
disabled: td.disabled, disabled: td.disabled,
cls: td.lastMonth || td.nextMonth ? "not-current-month-day" : "", cls: td.lastMonth || td.nextMonth ? "bi-tips" : "",
lgap: 2, lgap: 2,
rgap: 2, rgap: 2,
tgap: 4, tgap: 4,

4
src/case/combo/textvaluecombo/combo.textvalue.js

@ -130,6 +130,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW, eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,
action: () => { action: () => {
changeTag = false; changeTag = false;
this.fireEvent(BI.TextValueCombo.EVENT_BEFORE_POPUPVIEW);
} }
}, { }, {
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW, eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,
@ -144,7 +145,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
el: popup, el: popup,
value: o.value, value: o.value,
maxHeight: 240, maxHeight: 240,
minHeight: 25 minHeight: (o.chooseType === BI.ButtonGroup.CHOOSE_TYPE_MULTI && o.allowSelectAll) ? 55 : 25
} }
}; };
}, },
@ -209,5 +210,6 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
this.combo.populate(items); this.combo.populate(items);
} }
}); });
BI.TextValueCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.text_value_combo", BI.TextValueCombo); BI.shortcut("bi.text_value_combo", BI.TextValueCombo);

6
src/case/combo/textvaluecombo/popup.textvalue.js

@ -131,8 +131,10 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, {
}; };
}, },
mounted: function () { beforeMount: function () {
this.check(); if (this.options.chooseType !== BI.ButtonGroup.CHOOSE_TYPE_MULTI) {
this.check();
}
}, },
_formatItems: function (items) { _formatItems: function (items) {

4
src/case/editor/editor.sign.js

@ -87,6 +87,9 @@ BI.SignEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {
self.fireEvent(BI.SignEditor.EVENT_KEY_DOWN, arguments); self.fireEvent(BI.SignEditor.EVENT_KEY_DOWN, arguments);
}); });
this.editor.on(BI.Editor.EVENT_QUICK_DOWN, function () {
self.fireEvent(BI.SignEditor.EVENT_QUICK_DOWN, arguments);
});
this.editor.on(BI.Editor.EVENT_VALID, function () { this.editor.on(BI.Editor.EVENT_VALID, function () {
self.fireEvent(BI.SignEditor.EVENT_VALID, arguments); self.fireEvent(BI.SignEditor.EVENT_VALID, arguments);
@ -265,6 +268,7 @@ BI.SignEditor.EVENT_FOCUS = "EVENT_FOCUS";
BI.SignEditor.EVENT_BLUR = "EVENT_BLUR"; BI.SignEditor.EVENT_BLUR = "EVENT_BLUR";
BI.SignEditor.EVENT_CLICK = "EVENT_CLICK"; BI.SignEditor.EVENT_CLICK = "EVENT_CLICK";
BI.SignEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.SignEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.SignEditor.EVENT_QUICK_DOWN = "EVENT_QUICK_DOWN";
BI.SignEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; BI.SignEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL";
BI.SignEditor.EVENT_START = "EVENT_START"; BI.SignEditor.EVENT_START = "EVENT_START";

13
src/core/2.base.js

@ -1037,11 +1037,18 @@
return MM >= 1 && MM <= 12 && DD <= MD[MM - 1]; return MM >= 1 && MM <= 12 && DD <= MD[MM - 1];
}, },
/**
*
* @param str
* @param fmt
* @returns {Date|Date}
* 年月日缺省值为当前日期, 时分秒缺省值为0
*/
parseDateTime: function (str, fmt) { parseDateTime: function (str, fmt) {
var today = BI.getDate(); var today = BI.getDate();
var y = 0; var y;
var m = 0; var m;
var d = 1; var d;
// wei : 对于fmt为‘YYYYMM’或者‘YYYYMMdd’的格式,str的值为类似'201111'的形式,因为年月之间没有分隔符,所以正则表达式分割无效,导致bug7376。 // wei : 对于fmt为‘YYYYMM’或者‘YYYYMMdd’的格式,str的值为类似'201111'的形式,因为年月之间没有分隔符,所以正则表达式分割无效,导致bug7376。
var a = str.split(/\W+/); var a = str.split(/\W+/);
if (fmt.toLowerCase() == "%y%x" || fmt.toLowerCase() == "%y%x%d") { if (fmt.toLowerCase() == "%y%x" || fmt.toLowerCase() == "%y%x%d") {

2
src/core/platform/web/dom.js

@ -710,7 +710,7 @@
break; break;
} }
if (needAdaptHeight === true) { if (needAdaptHeight === true) {
popup.resetHeight && popup.resetHeight(Math.min(viewportBounds.height - position.top + (positionRelativeElement ? positionRelativeElement.getBoundingClientRect().top : 0), maxHeight)); popup.resetHeight && popup.resetHeight(Math.min(viewportBounds.height - position.top - (positionRelativeElement ? positionRelativeElement.getBoundingClientRect().top : 0), maxHeight));
} }
return position; return position;
}, },

11053
src/core/platform/web/jquery/_jquery.js vendored

File diff suppressed because it is too large Load Diff

4
src/core/utils/chinesePY.js

@ -425,6 +425,10 @@
BI._.extend(BI, { BI._.extend(BI, {
makeFirstPY: function (str, options) { makeFirstPY: function (str, options) {
options = options || {}; options = options || {};
// BI-119441 长字段搜索分叉后数量达百万级,这里控制下字段过长的话不进行多音字分叉
if (str.length > 100 && BI.isNull(options.ignoreMulti)) {
options.ignoreMulti = true;
}
if (typeof (str) !== "string") {return "" + str;} if (typeof (str) !== "string") {return "" + str;}
var arrResult = []; // 保存中间结果的数组 var arrResult = []; // 保存中间结果的数组
for (var i = 0, len = str.length; i < len; i++) { for (var i = 0, len = str.length; i < len; i++) {

5
src/less/case/calendar/calendar.less

@ -1,5 +0,0 @@
@import "../../index.less";
.bi-calendar-date-item.not-current-month-day {
color: @color-bi-text-disabled-button !important;
}

89
src/widget/multiselect/multiselect.combo.nobar.js

@ -54,6 +54,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
}, },
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: BI.bind(this._itemsCreator4Trigger, this), itemsCreator: BI.bind(this._itemsCreator4Trigger, this),
itemFormatter: o.itemFormatter,
itemHeight: o.itemHeight, itemHeight: o.itemHeight,
value: { value: {
type: BI.Selection.Multi, type: BI.Selection.Multi,
@ -134,29 +135,31 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
self.trigger.setAdapter(this); self.trigger.setAdapter(this);
self.numberCounter.setAdapter(this); self.numberCounter.setAdapter(this);
}, },
listeners: [{ listeners: [
eventName: BI.MultiSelectPopupView.EVENT_CHANGE, {
action: function () { eventName: BI.MultiSelectPopupView.EVENT_CHANGE,
self._dataChange = true; action: function () {
self.storeValue = this.getValue(); self._dataChange = true;
self._adjust(function () { self.storeValue = this.getValue();
assertShowValue(); self._adjust(function () {
}); assertShowValue();
self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM); });
self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM);
}
}, {
eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,
action: function () {
self._defaultState();
}
}, {
eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,
action: function () {
self._dataChange = true;
self.setValue();
self._defaultState();
}
} }
}, { ],
eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,
action: function () {
self._defaultState();
}
}, {
eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,
action: function () {
self._dataChange = true;
self.setValue();
self._defaultState();
}
}],
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
itemHeight: o.itemHeight, itemHeight: o.itemHeight,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
@ -262,26 +265,28 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
BI.createWidget({ BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
element: this, element: this,
items: [{ items: [
el: this.combo, {
left: 0, el: this.combo,
right: 0, left: 0,
top: 0, right: 0,
bottom: 0 top: 0,
}, { bottom: 0
el: triggerBtn, }, {
right: 0, el: triggerBtn,
top: 0, right: 0,
bottom: 0 top: 0,
}, { bottom: 0
el: { }, {
type: "bi.vertical_adapt", el: {
items: [this.numberCounter] type: "bi.vertical_adapt",
}, items: [this.numberCounter]
right: o.height, },
top: 0, right: o.height,
height: o.height top: 0,
}] height: o.height
}
]
}); });
}, },

90
src/widget/multiselect/multiselect.insert.combo.js

@ -55,6 +55,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
}, },
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: BI.bind(this._itemsCreator4Trigger, this), itemsCreator: BI.bind(this._itemsCreator4Trigger, this),
itemFormatter: o.itemFormatter,
itemHeight: o.itemHeight, itemHeight: o.itemHeight,
value: this.storeValue, value: this.storeValue,
}); });
@ -138,31 +139,34 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
self.trigger.setAdapter(this); self.trigger.setAdapter(this);
self.numberCounter.setAdapter(this); self.numberCounter.setAdapter(this);
}, },
listeners: [{ listeners: [
eventName: BI.MultiSelectPopupView.EVENT_CHANGE, {
action: function () { eventName: BI.MultiSelectPopupView.EVENT_CHANGE,
self._dataChange = true; action: function () {
self.storeValue = this.getValue(); self._dataChange = true;
self._adjust(function () { self.storeValue = this.getValue();
assertShowValue(); self._adjust(function () {
}); assertShowValue();
self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM); });
self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM);
}
}, {
eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,
action: function () {
self._defaultState();
}
}, {
eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,
action: function () {
self._dataChange = true;
self.setValue();
self._defaultState();
}
} }
}, { ],
eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,
action: function () {
self._defaultState();
}
}, {
eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,
action: function () {
self._dataChange = true;
self.setValue();
self._defaultState();
}
}],
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemFormatter: o.itemFormatter,
itemHeight: o.itemHeight, itemHeight: o.itemHeight,
onLoaded: function () { onLoaded: function () {
BI.nextTick(function () { BI.nextTick(function () {
@ -260,26 +264,28 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
BI.createWidget({ BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
element: this, element: this,
items: [{ items: [
el: this.combo, {
left: 0, el: this.combo,
right: 0, left: 0,
top: 0, right: 0,
bottom: 0 top: 0,
}, { bottom: 0
el: triggerBtn, }, {
right: 0, el: triggerBtn,
top: 0, right: 0,
bottom: 0 top: 0,
}, { bottom: 0
el: { }, {
type: "bi.vertical_adapt", el: {
items: [this.numberCounter] type: "bi.vertical_adapt",
}, items: [this.numberCounter]
right: o.height, },
top: 0, right: o.height,
height: o.height, top: 0,
}] height: o.height,
}
]
}); });
}, },

87
src/widget/multiselect/multiselect.insert.combo.nobar.js

@ -54,6 +54,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
}, },
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemsCreator: BI.bind(this._itemsCreator4Trigger, this), itemsCreator: BI.bind(this._itemsCreator4Trigger, this),
itemFormatter: o.itemFormatter,
itemHeight: o.itemHeight, itemHeight: o.itemHeight,
value: { value: {
type: BI.Selection.Multi, type: BI.Selection.Multi,
@ -129,28 +130,30 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
self.trigger.setAdapter(this); self.trigger.setAdapter(this);
self.numberCounter.setAdapter(this); self.numberCounter.setAdapter(this);
}, },
listeners: [{ listeners: [
eventName: BI.MultiSelectPopupView.EVENT_CHANGE, {
action: function () { eventName: BI.MultiSelectPopupView.EVENT_CHANGE,
self._dataChange = true; action: function () {
self.storeValue = this.getValue(); self._dataChange = true;
self._adjust(function () { self.storeValue = this.getValue();
assertShowValue(); self._adjust(function () {
}); assertShowValue();
});
}
}, {
eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,
action: function () {
self._defaultState();
}
}, {
eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,
action: function () {
self._dataChange = true;
self.setValue();
self._defaultState();
}
} }
}, { ],
eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,
action: function () {
self._defaultState();
}
}, {
eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,
action: function () {
self._dataChange = true;
self.setValue();
self._defaultState();
}
}],
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
itemHeight: o.itemHeight, itemHeight: o.itemHeight,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
@ -256,26 +259,28 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
BI.createWidget({ BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
element: this, element: this,
items: [{ items: [
el: this.combo, {
left: 0, el: this.combo,
right: 0, left: 0,
top: 0, right: 0,
bottom: 0 top: 0,
}, { bottom: 0
el: triggerBtn, }, {
right: 0, el: triggerBtn,
top: 0, right: 0,
bottom: 0 top: 0,
}, { bottom: 0
el: { }, {
type: "bi.vertical_adapt", el: {
items: [this.numberCounter] type: "bi.vertical_adapt",
}, items: [this.numberCounter]
right: o.height, },
top: 0, right: o.height,
height: o.height top: 0,
}] height: o.height
}
]
}); });
}, },

30
src/widget/multiselect/multiselect.insert.trigger.js

@ -40,6 +40,7 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
defaultText: o.defaultText, defaultText: o.defaultText,
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemFormatter: o.itemFormatter,
itemHeight: o.itemHeight, itemHeight: o.itemHeight,
watermark: o.watermark, watermark: o.watermark,
popup: {}, popup: {},
@ -86,24 +87,27 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
}, { }, {
el: BI.createWidget(), el: BI.createWidget(),
width: 24 width: 24
}] }
]
}); });
!o.allowEdit && BI.createWidget({ !o.allowEdit && BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
element: this, element: this,
items: [{ items: [
el: { {
type: "bi.text", el: {
title: function () { type: "bi.text",
return self.searcher.getState(); title: function () {
} return self.searcher.getState();
}, }
left: 0, },
right: 24, left: 0,
top: 0, right: 24,
bottom: 0 top: 0,
}] bottom: 0
}
]
}); });
}, },

35
src/widget/multiselect/multiselect.trigger.js

@ -41,6 +41,7 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
itemsCreator: o.itemsCreator, itemsCreator: o.itemsCreator,
itemHeight: o.itemHeight, itemHeight: o.itemHeight,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemFormatter: o.itemFormatter,
watermark: o.watermark, watermark: o.watermark,
popup: {}, popup: {},
adapter: o.adapter, adapter: o.adapter,
@ -88,23 +89,25 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
!o.allowEdit && BI.createWidget({ !o.allowEdit && BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
element: this, element: this,
items: [{ items: [
el: { {
type: "bi.text", el: {
title: function () { type: "bi.text",
/** 修正REPORT-73699引入,需要考虑到传递过来的值是方法的情况 */ title: function () {
var state = self.searcher.getState(); /** 修正REPORT-73699引入,需要考虑到传递过来的值是方法的情况 */
if (BI.isFunction(state)) { var state = self.searcher.getState();
return state(); if (BI.isFunction(state)) {
return state();
}
return state;
} }
return state; },
} left: 0,
}, right: 24,
left: 0, top: 0,
right: 24, bottom: 0
top: 0, }
bottom: 0 ]
}]
}); });
}, },

6
src/widget/multiselect/search/multiselect.search.insert.pane.js

@ -19,7 +19,8 @@ BI.MultiSelectSearchInsertPane = BI.inherit(BI.Widget, {
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
keywordGetter: BI.emptyFn, keywordGetter: BI.emptyFn,
itemHeight: 24 allowSelectAll: true,
itemHeight: 24,
}); });
}, },
@ -47,7 +48,8 @@ BI.MultiSelectSearchInsertPane = BI.inherit(BI.Widget, {
}]); }]);
}, },
itemHeight: o.itemHeight, itemHeight: o.itemHeight,
value: o.value value: o.value,
allowSelectAll: o.allowSelectAll,
}); });
this.loader.on(BI.Controller.EVENT_CHANGE, function () { this.loader.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);

96
src/widget/multiselect/search/multiselect.search.loader.js

@ -13,6 +13,7 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
keywordGetter: BI.emptyFn, keywordGetter: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemFormatter: BI.emptyFn, itemFormatter: BI.emptyFn,
allowSelectAll: true,
itemHeight: 24 itemHeight: 24
}); });
}, },
@ -23,7 +24,7 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
var self = this, opts = this.options; var self = this, opts = this.options;
var hasNext = false; var hasNext = false;
this.storeValue = BI.deepClone(opts.value); this.storeValue = BI.deepClone(opts.value);
this.button_group = BI.createWidget({ this.button_group = BI.createWidget(opts.allowSelectAll ? {
type: "bi.select_list", type: "bi.select_list",
toolbar: { toolbar: {
type: "bi.multi_select_bar", type: "bi.multi_select_bar",
@ -51,9 +52,11 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
return true; return true;
} }
}, },
layouts: [{ layouts: [
type: "bi.vertical" {
}] type: "bi.vertical"
}
]
} }
} }
}, },
@ -81,31 +84,90 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
hasNext: function () { hasNext: function () {
return hasNext; return hasNext;
} }
} : {
type: "bi.list_pane",
logic: {
dynamic: true,
innerVgap: 5,
rowSize: ["", "fill"],
verticalAlign: BI.VerticalAlign.Stretch
},
element: this,
el: {
chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,
behaviors: {
redmark: function () {
return true;
}
},
layouts: [
{
type: "bi.vertical"
}
]
},
itemsCreator: function (op, callback) {
self.storeValue && (op = BI.extend(op || {}, {
selectedValues: self.storeValue.value
}));
opts.itemsCreator(op, function (ob) {
var keyword = ob.keyword = opts.keywordGetter();
hasNext = ob.hasNext;
var firstItems = [];
if (op.times === 1 && self.storeValue) {
var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json);
}
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword, context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
}
});
},
value: opts.value,
height: "fill",
}); });
this.button_group.on(BI.Controller.EVENT_CHANGE, function () { this.button_group.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
}); });
this.button_group.on(BI.SelectList.EVENT_CHANGE, function () { if (opts.allowSelectAll) {
self.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE, arguments); this.button_group.on(BI.SelectList.EVENT_CHANGE, function () {
}); self.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE, arguments);
});
} else {
this.button_group.on(BI.ListPane.EVENT_CHANGE, function (val) {
self.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE, val);
});
}
}, },
_createItems: function (items) { _createItems: function (items) {
var allSelected = this.isAllSelected(); var allSelected = this.isAllSelected();
return BI.createItems(items, { var itemFormatter = this.options.itemFormatter;
type: "bi.multi_select_item",
logic: { return BI.map(items, (index, item) => {
dynamic: false return {
}, type: "bi.multi_select_item",
height: this.options.itemHeight || BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, logic: {
selected: allSelected, dynamic: false
cls: "bi-list-item-active", },
iconWrapperWidth: 36 height: this.options.itemHeight || BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
selected: allSelected,
cls: "bi-list-item-active",
iconWrapperWidth: 36,
...item,
...itemFormatter(item)
};
}); });
}, },
isAllSelected: function () { isAllSelected: function () {
return this.button_group.isAllSelected(); var o = this.options;
return o.allowSelectAll ? this.button_group.isAllSelected() : false;
}, },
_filterValues: function (src) { _filterValues: function (src) {

23
src/widget/multiselect/trigger/searcher.multiselect.insert.js

@ -29,17 +29,19 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
height: o.height, height: o.height,
text: o.text, text: o.text,
defaultText: o.defaultText, defaultText: o.defaultText,
listeners: [{ listeners: [
eventName: BI.MultiSelectEditor.EVENT_FOCUS, {
action: function () { eventName: BI.MultiSelectEditor.EVENT_FOCUS,
self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_FOCUS); action: function () {
} self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_FOCUS);
}, { }
eventName: BI.MultiSelectEditor.EVENT_BLUR, }, {
action: function () { eventName: BI.MultiSelectEditor.EVENT_BLUR,
self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_BLUR); action: function () {
self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_BLUR);
}
} }
}] ]
}); });
this.searcher = BI.createWidget({ this.searcher = BI.createWidget({
@ -56,6 +58,7 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
popup: BI.extend({ popup: BI.extend({
type: "bi.multi_select_search_insert_pane", type: "bi.multi_select_search_insert_pane",
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemFormatter: o.itemFormatter,
keywordGetter: function () { keywordGetter: function () {
return self.editor.getKeyword(); return self.editor.getKeyword();
}, },

23
src/widget/multiselect/trigger/searcher.multiselect.js

@ -29,17 +29,19 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
text: o.text, text: o.text,
defaultText: o.defaultText, defaultText: o.defaultText,
watermark: o.watermark, watermark: o.watermark,
listeners: [{ listeners: [
eventName: BI.MultiSelectEditor.EVENT_FOCUS, {
action: function () { eventName: BI.MultiSelectEditor.EVENT_FOCUS,
self.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS); action: function () {
} self.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS);
}, { }
eventName: BI.MultiSelectEditor.EVENT_BLUR, }, {
action: function () { eventName: BI.MultiSelectEditor.EVENT_BLUR,
self.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR); action: function () {
self.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR);
}
} }
}] ]
}); });
this.searcher = BI.createWidget({ this.searcher = BI.createWidget({
@ -55,6 +57,7 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
popup: BI.extend({ popup: BI.extend({
type: "bi.multi_select_search_pane", type: "bi.multi_select_search_pane",
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
itemFormatter: o.itemFormatter,
keywordGetter: function () { keywordGetter: function () {
return self.editor.getValue(); return self.editor.getValue();
}, },

3
src/widget/multiselectlist/multiselectlist.insert.nobar.js

@ -61,6 +61,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
o.itemsCreator(op, callback); o.itemsCreator(op, callback);
} }
}, },
allowSelectAll: false,
}); });
this.searcherPane.setVisible(false); this.searcherPane.setVisible(false);
@ -244,7 +245,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
// 和复选下拉框同步,allData做缓存是会爆炸的 // 和复选下拉框同步,allData做缓存是会爆炸的
digest(); digest();
function digest (items) { function digest(items) {
BI.each(keywords, function (i, val) { BI.each(keywords, function (i, val) {
self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val); self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);
}); });

51
src/widget/numbereditor/number.editor.js

@ -39,9 +39,33 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
if (o.validationChecker === BI.emptyFn && !self._checkValueInRange(parsedValue)) { if (o.validationChecker === BI.emptyFn && !self._checkValueInRange(parsedValue)) {
return false; return false;
} }
return o.validationChecker(parsedValue); return o.validationChecker(parsedValue);
}, },
errorText: o.errorText errorText: o.errorText,
listeners: [
{
eventName: BI.SignEditor.EVENT_QUICK_DOWN,
action: e => {
if ([BI.KeyCode.UP, BI.KeyCode.DOWN].includes(e.keyCode)) {
e.preventDefault();
}
},
},
{
eventName: BI.SignEditor.EVENT_KEY_DOWN,
action: (keycode) => {
if (keycode === BI.KeyCode.UP) {
this._finetuning(o.step);
return;
}
if (keycode === BI.KeyCode.DOWN) {
this._finetuning(-o.step);
}
},
}
],
}); });
this.editor.on(BI.TextEditor.EVENT_CHANGE, function () { this.editor.on(BI.TextEditor.EVENT_CHANGE, function () {
// 大多数时候valueFormatter往往需要配合valueParser一起使用 // 大多数时候valueFormatter往往需要配合valueParser一起使用
@ -68,7 +92,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
forceNotSelected: true, forceNotSelected: true,
trigger: "lclick,", trigger: "lclick,",
debounce: false, debounce: false,
cls: (o.simple ? "solid-triangle-top-font " : "add-up-font bi-border-left ") + "top-button bi-list-item-active2 icon-size-12" cls: (o.simple ? "solid-triangle-top-font " : "add-up-font bi-border-left ") + "top-button bi-list-item-active2 icon-size-12",
}); });
this.topBtn.on(BI.IconButton.EVENT_CHANGE, function () { this.topBtn.on(BI.IconButton.EVENT_CHANGE, function () {
self._finetuning(o.step); self._finetuning(o.step);
@ -80,7 +104,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
trigger: "lclick,", trigger: "lclick,",
forceNotSelected: true, forceNotSelected: true,
debounce: false, debounce: false,
cls: (o.simple ? "solid-triangle-bottom-font " : "minus-down-font bi-border-left ") + "bottom-button bi-list-item-active2 icon-size-12" cls: (o.simple ? "solid-triangle-bottom-font " : "minus-down-font bi-border-left ") + "bottom-button bi-list-item-active2 icon-size-12",
}); });
this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function () { this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function () {
self._finetuning(-o.step); self._finetuning(-o.step);
@ -101,17 +125,17 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
{ {
column: 0, column: 0,
row: 0, row: 0,
el: this.topBtn el: this.topBtn,
}, { }, {
column: 0, column: 0,
row: 1, row: 1,
el: this.bottomBtn el: this.bottomBtn,
} }
] ],
}, },
width: 23 width: 23,
} }
] ],
}); });
}, },
@ -125,6 +149,7 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
_checkValueInRange: function (v) { _checkValueInRange: function (v) {
var o = this.options; var o = this.options;
return !!(BI.isNumeric(v) && BI.parseFloat(v) >= o.min && BI.parseFloat(v) <= o.max); return !!(BI.isNumeric(v) && BI.parseFloat(v) >= o.min && BI.parseFloat(v) <= o.max);
}, },
@ -137,8 +162,11 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
// 微调 // 微调
_finetuning: function (add) { _finetuning: function (add) {
var v = BI.parseFloat(this.getValue()); const { max, min } = this.options;
this.setValue(BI.add(v, add)); let v = BI.parseFloat(this.getValue());
v = BI.add(v, add);
v = BI.clamp(v, min, max);
this.setValue(v);
}, },
setUpEnable: function (v) { setUpEnable: function (v) {
@ -165,7 +193,8 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
var o = this.options; var o = this.options;
o.value = v; o.value = v;
this.editor.setValue(o.valueFormatter(v)); this.editor.setValue(o.valueFormatter(v));
} this._checkAdjustDisabled(o.value);
},
}); });
BI.NumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.NumberEditor.EVENT_CONFIRM = "EVENT_CONFIRM";

120
src/widget/yearmonth/combo.yearmonth.js

@ -80,39 +80,45 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
ref: function () { ref: function () {
self.popup = this; self.popup = this;
}, },
listeners: [{ listeners: [
eventName: BI.DynamicYearMonthPopup.EVENT_CHANGE, {
action: function () { eventName: BI.DynamicYearMonthPopup.EVENT_CHANGE,
self.setValue(self.popup.getValue()); action: function () {
self.combo.hideView(); self.setValue(self.popup.getValue());
self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM); self.combo.hideView();
} self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM);
}, { }
eventName: BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE, }, {
action: function () { eventName: BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE,
self.setValue(); action: function () {
self.combo.hideView(); self.setValue();
self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM); self.comboWrapper.element.removeClass("error");
} self.combo.hideView();
}, { self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM);
eventName: BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE, }
action: function () { }, {
var date = BI.getDate(); eventName: BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,
self.setValue({ type: BI.DynamicYearMonthCombo.Static, value: { year: date.getFullYear(), month: date.getMonth() + 1 } }); action: function () {
self.combo.hideView(); var date = BI.getDate();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM); self.setValue({
} type: BI.DynamicYearMonthCombo.Static,
}, { value: { year: date.getFullYear(), month: date.getMonth() + 1 }
eventName: BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE, });
action: function () { self.combo.hideView();
var value = self.popup.getValue(); self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
if (self._checkValue(value)) { }
self.setValue(value); }, {
eventName: BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE,
action: function () {
var value = self.popup.getValue();
if (self._checkValue(value)) {
self.setValue(value);
}
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
} }
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
} }
}], ],
behaviors: o.behaviors, behaviors: o.behaviors,
min: o.minDate, min: o.minDate,
max: o.maxDate max: o.maxDate
@ -130,31 +136,35 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
BI.createWidget({ BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
element: this, element: this,
items: [{ items: [
el: { {
type: "bi.horizontal_fill", el: {
columnSize: ["", "fill"], type: "bi.horizontal_fill",
cls: (o.simple ? "bi-border-bottom" : "bi-border bi-border-radius") + " bi-focus-shadow", columnSize: ["", "fill"],
ref: function () { cls: (o.simple ? "bi-border-bottom" : "bi-border bi-border-radius") + " bi-focus-shadow",
self.comboWrapper = this; ref: function () {
self.comboWrapper = this;
},
items: [
{
el: {
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-change-h-font",
width: BI.toPix(o.height, border),
height: BI.toPix(o.height, border),
ref: function () {
self.changeIcon = this;
}
}
}, this.combo
]
}, },
items: [{ top: 0,
el: { left: 0,
type: "bi.icon_button", right: 0,
cls: "bi-trigger-icon-button date-change-h-font", bottom: 0
width: BI.toPix(o.height, border), }
height: BI.toPix(o.height, border), ]
ref: function () {
self.changeIcon = this;
}
}
}, this.combo]
},
top: 0,
left: 0,
right: 0,
bottom: 0
}]
}); });
this._checkDynamicValue(o.value); this._checkDynamicValue(o.value);
}, },

122
src/widget/yearquarter/combo.yearquarter.js

@ -1,6 +1,6 @@
BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, { BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
_consts:{ _consts: {
iconWidth: 24 iconWidth: 24
}, },
props: { props: {
@ -83,39 +83,45 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
ref: function () { ref: function () {
self.popup = this; self.popup = this;
}, },
listeners: [{ listeners: [
eventName: BI.DynamicYearQuarterPopup.EVENT_CHANGE, {
action: function () { eventName: BI.DynamicYearQuarterPopup.EVENT_CHANGE,
self.setValue(self.popup.getValue()); action: function () {
self.combo.hideView(); self.setValue(self.popup.getValue());
self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM); self.combo.hideView();
} self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM);
}, { }
eventName: BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE, }, {
action: function () { eventName: BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE,
self.setValue(); action: function () {
self.combo.hideView(); self.setValue();
self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM); self.comboWrapper.element.removeClass("error");
} self.combo.hideView();
}, { self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM);
eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE, }
action: function () { }, {
var date = BI.getDate(); eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,
self.setValue({ type: BI.DynamicYearMonthCombo.Static, value: { year: date.getFullYear(), quarter: BI.getQuarter(date) } }); action: function () {
self.combo.hideView(); var date = BI.getDate();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM); self.setValue({
} type: BI.DynamicYearMonthCombo.Static,
}, { value: { year: date.getFullYear(), quarter: BI.getQuarter(date) }
eventName: BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE, });
action: function () { self.combo.hideView();
var value = self.popup.getValue(); self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
if (self._checkValue(value)) { }
self.setValue(value); }, {
eventName: BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE,
action: function () {
var value = self.popup.getValue();
if (self._checkValue(value)) {
self.setValue(value);
}
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
} }
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
} }
}], ],
behaviors: o.behaviors, behaviors: o.behaviors,
min: o.minDate, min: o.minDate,
max: o.maxDate max: o.maxDate
@ -133,31 +139,35 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
BI.createWidget({ BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
element: this, element: this,
items: [{ items: [
el: { {
type: "bi.horizontal_fill", el: {
columnSize: ["", "fill"], type: "bi.horizontal_fill",
cls: (o.simple ? "bi-border-bottom" : "bi-border bi-border-radius") + " bi-focus-shadow", columnSize: ["", "fill"],
ref: function () { cls: (o.simple ? "bi-border-bottom" : "bi-border bi-border-radius") + " bi-focus-shadow",
self.comboWrapper = this; ref: function () {
self.comboWrapper = this;
},
items: [
{
el: {
type: "bi.icon_button",
cls: "bi-trigger-icon-button date-change-h-font",
width: this._consts.iconWidth,
height: BI.toPix(o.height, border),
ref: function () {
self.changeIcon = this;
}
}
}, this.combo
]
}, },
items: [{ top: 0,
el: { left: 0,
type: "bi.icon_button", right: 0,
cls: "bi-trigger-icon-button date-change-h-font", bottom: 0
width: this._consts.iconWidth, }
height: BI.toPix(o.height, border), ]
ref: function () {
self.changeIcon = this;
}
}
}, this.combo]
},
top: 0,
left: 0,
right: 0,
bottom: 0
}]
}); });
this._checkDynamicValue(o.value); this._checkDynamicValue(o.value);
}, },

1
typescript/case/combo/combo.textvalue.ts

@ -4,6 +4,7 @@ export declare class TextValueCombo extends Widget {
static xtype: string; static xtype: string;
static EVENT_CHANGE: string; static EVENT_CHANGE: string;
static EVENT_BEFORE_POPUPVIEW: string;
clear(): void; clear(): void;
setText(text: string): void; setText(text: string): void;

11
typescript/core/base.ts

@ -177,7 +177,8 @@ export interface _base {
functions: (object: object) => string[]; functions: (object: object) => string[];
extend: (object: object, ...sources: any[]) => object; extend<T extends object>(object: T): T;
extend<T extends object, U extends unknown[]>(object: T, ...sources: U): T & UnionToIntersection<NonNullable<U[number]>>;
defaults: (object: object, ...sources: any[]) => object; defaults: (object: object, ...sources: any[]) => object;
@ -399,3 +400,11 @@ type merge = {
deepExtend(object: any, ...otherArgs: any[]): any; deepExtend(object: any, ...otherArgs: any[]): any;
} }
type UnionToIntersection<Union> = (
Union extends unknown
? (x: Union) => void
: never
) extends ((x: infer Intersection) => void)
? Intersection
: never;

Loading…
Cancel
Save