selective-ui 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/selective-ui.css +1 -0
- package/dist/selective-ui.css.map +1 -1
- package/dist/selective-ui.esm.js +124 -84
- package/dist/selective-ui.esm.js.map +1 -1
- package/dist/selective-ui.esm.min.js +2 -2
- package/dist/selective-ui.esm.min.js.br +0 -0
- package/dist/selective-ui.min.css +1 -1
- package/dist/selective-ui.min.css.br +0 -0
- package/dist/selective-ui.min.js +2 -2
- package/dist/selective-ui.min.js.br +0 -0
- package/dist/selective-ui.umd.js +93 -37
- package/dist/selective-ui.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/css/components/option.css +1 -0
- package/src/ts/components/popup.ts +5 -2
- package/src/ts/components/selectbox.ts +89 -27
- package/src/ts/core/search-controller.ts +8 -3
- package/src/ts/global.ts +183 -0
- package/src/ts/index.ts +35 -58
- package/src/ts/types/components/searchbox.type.ts +24 -2
- package/src/ts/types/core/base/mixed-adapter.type.ts +4 -4
- package/src/ts/utils/selective.ts +4 -3
package/dist/selective-ui.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.css","selectbox.css","placeholder.css","directive.css","empty-state.css","loading-state.css","optgroup.css","popup.css","searchbox.css","option-handle.css","option.css","accessorybox.css"],"names":[],"mappings":"AAAA;IACI,mCAAmC;;IAEnC,+BAA+B;IAC/B,kCAAkC;IAClC,oDAAoD;IACpD,2BAA2B;IAC3B,kCAAkC;IAClC,qCAAqC;IACrC,0CAA0C;IAC1C,8CAA8C;IAC9C,iCAAiC;IACjC,oCAAoC;IACpC,4BAA4B;IAC5B,+BAA+B;IAC/B,8BAA8B;;IAE9B,+BAA+B;IAC/B,kCAAkC;;IAElC,sCAAsC;IACtC,4CAA4C;IAC5C,4CAA4C;IAC5C,wCAAwC;IACxC,kCAAkC;;IAElC,0BAA0B;IAC1B,gCAAgC;;IAEhC,gCAAg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vB,gBAAgB;IAChB,qDAAqD;IACrD,qDAAqD;IACrD,qDAAqD;IACrD,uDAAuD;;IAEvD,iDAAiD;IACjD,+CAA+C;IAC/C,2CAA2C;IAC3C,mCAAmC;AACvC;;AAEA;IACI,kBAAkB;IAClB,eAAe;IACf,8CAA8C;IAC9C,iBAAiB;;IAEjB,4DAA4D;IAC5D,4DAA4D;IAC5D,4DAA4D;IAC5D,8DAA8D;;IAE9D,8CAA8C;IAC9C,kDAAkD;IAClD,gDAAgD;IAChD,oDAAoD;AACxD;;AAEA;IACI,8fAA8f;IAC9f,cAAc;IACd,WAAW;IACX,kBAAkB;IAClB,4BAA4B;IAC5B,kCAAkC;IAClC,WAAW;IACX,YAAY;AAChB;;AAEA;IACI,+CAA+C;IAC/C,uDAAuD;IACvD,mDAAmD;IACnD,gBAAgB;IAChB,uBAAuB;IACvB,mBAAmB;AACvB","file":"selective-ui.css","sourcesContent":[":root {\n --seui-transparent-color: #00000000;\n\n --seui-view-text-color: #121212;\n --seui-view-ro-text-color: #a3a3a3;\n --seui-view-text-style: Arial, Helvetica, sans-serif;\n --seui-view-text-size: 13px;\n --seui-view-mobile-text-size: 16px;\n --seui-view-background-color: #ffffff;\n --seui-view-ro-background-color: #00000029;\n --seui-view-optgroup-background-color: #a3c6e9;\n --seui-view-border-color: #a3a3a3;\n --seui-view-ro-border-color: #bdbdbd;\n --seui-view-border-size: 1px;\n --seui-view-border-style: solid;\n --seui-view-border-radius: 5px;\n\n --seui-directive-color: #000000;\n --seui-directive-ro-color: #a3a3a3;\n\n --seui-option-crtl-text-color: #307ecc;\n --seui-option-crtl-text-color-hover: #ff0000;\n --seui-option-crtl-background-color: #f3f3f3;\n --seui-option-crtl-border-color: #cccccc;\n --seui-option-crtl-text-size: 13px;\n\n --seui-option-padding: 5px;\n --seui-option-border-radius: 5px;\n\n --seui-accessory-max-width: 100%;\n --seui-accessory-max-height: 50px;\n --seui-accessory-padding: 2px 0;\n --seui-accessory-item-border-color: #a3a3a3;\n --seui-accessory-item-border-style: solid;\n --seui-accessory-item-border-width: 1px;\n --seui-accessory-item-border-radius: 3px;\n --seui-accessory-item-background: #f7f7f9;\n --seui-accessory-item-font-size: 11px;\n --seui-accessory-item-padding: 2px;\n --seui-accessory-item-gap: 3px;\n --seui-accessory-item-button-color: #757575;\n --seui-accessory-item-button-width: 16px;\n --seui-accessory-item-button-height: 16px;\n --seui-accessory-item-button-border-color: #a3a3a3;\n --seui-accessory-item-button-border-style: solid;\n --seui-accessory-item-button-border-width: 1px;\n --seui-accessory-item-button-border-radius: 2px;\n --seui-accessory-item-content-color: #307ecc;\n --seui-accessory-item-content-font-size: 11px;\n --seui-accessory-item-content-padding: 0 4px 0 2px;\n\n --seui-popup-background-color: #fbfbfb;\n --seui-popup-border-color: #a3a3a3;\n --seui-popup-border-style: solid;\n --seui-popup-border-width: 1px;\n --seui-popup-border-radius: 6px;\n\n --seui-chkbox-background-color: #ffffff;\n --seui-chkbox-border-color: #8f9194;\n\n --seui-chkbox-hover-background-color: #dbdbdb;\n --seui-chkbox-hover-border-color: #b7b7b7;\n\n --seui-chkbox-checked-background-color: #9dcff8;\n --seui-chkbox-checked-border-color: #9dcff8;\n\n --seui-chkbox-checked-hover-background-color: #9dcff8;\n --seui-chkbox-checked-hover-border-color: #007eff;\n\n --seui-chkbox-checked-color: #0075FF;\n\n --seui-empty-state-color: #999999;\n --seui-empty-state-background: #f9f9f9;\n --seui-empty-state-padding: 10px 5px;\n}",".selective-ui-MAIN {\n display: inline-block;\n max-width: min-content;\n}\n.selective-ui-MAIN, .selective-ui-MAIN * {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n\n margin: 0;\n padding: 0;\n\n line-height: normal;\n}\n.selective-ui-MAIN > select.init {\n display: none;\n}\n.selective-ui-MAIN > .selective-ui-view {\n position: relative;\n width: 100%;\n height: 100%;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n\n background-color: var(--seui-view-background-color);\n border: var(--seui-view-border-style) var(--seui-view-border-size) var(--seui-view-border-color);\n border-radius: var(--seui-view-border-radius);\n}\n\n.selective-ui-MAIN.invisible {\n display: none;\n}\n\n.selective-ui-MAIN.disabled {\n --seui-view-background-color: var(--seui-view-ro-background-color);\n --seui-view-border-color: var(--seui-view-ro-border-color);\n --seui-view-text-color: var(--seui-view-ro-text-color);\n --seui-directive-color: var(--seui-directive-ro-color);\n}\n\n.selective-ui-MAIN .hide {\n display: none;\n}\n\n@supports (-webkit-touch-callout: none) {\n :root {\n --seui-view-text-size: var(--seui-view-mobile-text-size);\n }\n}",".selective-ui-placeholder {\n display: flex;\n align-items: center;\n \n margin-left: 10px;\n max-width: calc(100% - 30px);\n height: calc(100% - 10px);\n text-overflow: ellipsis;\n white-space: nowrap;\n pointer-events: none;\n font-family: var(--seui-view-text-style);\n font-size: var(--seui-view-text-size) !important;\n overflow: hidden;\n color: var(--seui-view-text-color);\n}",".selective-ui-directive {\n content: \" \";\n position: absolute;\n display: inline-block;\n vertical-align: middle;\n transition: all linear 200ms;\n border-top: 4px solid var(--seui-directive-color);\n border-right: 4px solid transparent;\n border-left: 4px solid transparent;\n width: 0;\n height: 0;\n right: 10px;\n top: 50%;\n transform: translateY(-50%) rotate(0deg);\n z-index: 1;\n pointer-events: none;\n}\n.selective-ui-directive.drop-down {\n transform: translateY(-50%) rotate(180deg);\n}",".selective-ui-empty-state {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--seui-empty-state-padding, 20px);\n text-align: center;\n font-family: var(--seui-view-text-style);\n font-size: var(--seui-view-text-size);\n color: var(--seui-empty-state-color, #999);\n background-color: var(--seui-empty-state-background, transparent);\n border-radius: var(--seui-option-border-radius);\n min-height: 60px;\n\n position: sticky;\n bottom: 0;\n}\n\n.selective-ui-empty-state.small {\n text-align: left;\n justify-content: flex-start;\n min-height: 30px;\n}\n\n.selective-ui-empty-state.hide {\n display: none;\n}",".selective-ui-loading-state {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--seui-empty-state-padding, 20px);\n text-align: center;\n font-family: var(--seui-view-text-style);\n font-size: var(--seui-view-text-size);\n color: var(--seui-empty-state-color, #999);\n background-color: var(--seui-empty-state-background, transparent);\n border-radius: var(--seui-option-border-radius);\n min-height: 60px;\n\n position: sticky;\n bottom: 0;\n}\n\n.selective-ui-loading-state.small {\n text-align: left;\n justify-content: flex-start;\n min-height: 30px;\n}\n\n.selective-ui-loading-state.hide {\n display: none;\n}",".selective-ui-group {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.selective-ui-group.hide {\n display: none;\n}\n\n.selective-ui-group-header {\n font-family: var(--seui-view-text-style);\n font-size: var(--seui-view-text-size);\n font-weight: 600;\n color: var(--seui-view-text-color);\n padding: 8px 12px;\n background-color: var(--seui-view-optgroup-background-color);\n border-radius: var(--seui-option-border-radius);\n /* position: sticky; */\n /* top: 0; */\n z-index: 1;\n cursor: pointer;\n user-select: none;\n \n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.selective-ui-group-header::before {\n content: \"\";\n display: inline-block;\n width: 0;\n height: 0;\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n border-left: 7px solid currentColor;\n transition: transform 200ms ease;\n transform: rotate(90deg);\n}\n\n.selective-ui-group.collapsed .selective-ui-group-header::before {\n transform: rotate(0deg);\n}\n\n.selective-ui-group-items {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding-left: 16px;\n}\n\n.selective-ui-group.collapsed .selective-ui-group-items {\n display: none;\n}\n\n/* Option trong group có indent nhẹ hơn */\n.selective-ui-group-items .selective-ui-option-view {\n padding-left: 12px;\n border-left: 2px solid #e0e0e0;\n margin-left: 4px;\n}",".selective-ui-popup, .selective-ui-popup * {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n\n line-height: normal;\n}\n\n.selective-ui-popup {\n display: none;\n position: fixed;\n z-index: 9999;\n overflow: none;\n flex-direction: column;\n \n height: 0px;\n padding: 2px;\n gap: 2px;\n\n background-color: var(--seui-popup-background-color);\n border-color: var(--seui-popup-border-color);\n border-style: var(--seui-popup-border-style);\n border-width: var(--seui-popup-border-width);\n border-radius: var(--seui-popup-border-radius);\n}\n\n.selective-ui-options-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n gap: 2px;\n\n -webkit-overflow-scrolling: touch;\n touch-action: pan-y;\n}\n\n.selective-ui-options-container.hide {\n display: none;\n}",".selective-ui-searchbox {\n display: flex;\n flex-direction: row;\n align-items: center;\n position: absolute;\n \n background-color: var(--seui-view-background-color);\n border-radius: 5px;\n z-index: 2;\n width: calc(100% - 30px);\n height: 100%;\n}\n\n.selective-ui-searchbox-input {\n width: 100%;\n height: calc(100% - 10px);\n border: 0;\n outline: none !important;\n background: var(--seui-transparent-color);\n color: var(--seui-view-text-color);\n padding: 0 !important;\n margin-left: 10px;\n text-indent: 0px;\n font-family: var(--seui-view-text-style);\n font-size: var(--seui-view-text-size) !important;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}",".selective-ui-option-handle {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n \n font-size: var(--seui-option-crtl-text-size);\n font-family: var(--seui-view-text-style);\n width: unset;\n position: sticky;\n top: 0px;\n padding: var(--seui-option-padding);\n z-index: 2;\n background-color: var(--seui-option-crtl-background-color);\n border: 1px solid var(--seui-option-crtl-border-color);\n border-radius: var(--seui-option-border-radius);\n}\n\n.selective-ui-option-handle.hide {\n display: none;\n}\n\n.selective-ui-option-handle-item {\n text-decoration: none;\n cursor: pointer;\n color: var(--seui-option-crtl-text-color);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.selective-ui-option-handle-item:hover {\n color: var(--seui-option-crtl-text-color-hover);\n}",".selective-ui-option-view {\n display: flex;\n width: auto;\n flex-direction: row;\n align-items: center !important;\n position: relative;\n border-radius: 4px;\n line-height: normal;\n padding: 5px;\n gap: 7px;\n transition: all 180ms;\n\n background-color: var(--seui-transparent-color);\n border: solid 1px var(--seui-transparent-color);\n}\n\n.selective-ui-option-view.checked {\n background-color: var(--seui-chkbox-checked-background-color);\n border-color: var(--seui-chkbox-checked-border-color);\n}\n\n.selective-ui-option-view > input {\n display: none;\n}\n\n.selective-ui-option-view > label {\n width: 100%;\n height: 100%;\n display: flex;\n gap: 7px;\n font-family: var(--seui-view-text-style);\n font-size: var(--seui-view-text-size);\n color: var(--seui-view-text-color);\n align-items: center;\n}\n\n.selective-ui-option-view.multiple > label::before {\n content: \"\";\n display: block;\n width: 17px;\n min-width: 17px;\n height: 17px;\n min-height: 17px;\n background: var(--seui-chkbox-background-color);\n border: 1px solid var(--seui-chkbox-border-color);\n border-radius: 0.2em;\n -webkit-transition: all 200ms, background 200ms ease-in-out;\n transition: all 200ms, background 200ms ease-in-out;\n}\n\n.selective-ui-option-view.multiple.checked > label::before {\n color: var(--seui-view-background-color);\n background: var(--seui-chkbox-checked-color) url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNyAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04LjE2ODQ3IDEyLjM4MDhDNy43Nzc3OCAxMi43NzIyIDcuMTQzNTMgMTIuNzcyMiA2Ljc1Mjg0IDEyLjM4MDhMMi43NDQ5OCA4LjM2NDlDMi4zNTU0IDcuOTc0NTQgMi4zNTU0IDcuMzQyNDcgMi43NDQ5OCA2Ljk1MjFMMy4xNjQ1MiA2LjUzMTczQzMuNTU1MiA2LjE0MDI3IDQuMTg5NDYgNi4xNDAyNyA0LjU4MDE0IDYuNTMxNzNMNi43NTI4NCA4LjcwODc4QzcuMTQzNTIgOS4xMDAyNCA3Ljc3Nzc4IDkuMTAwMjQgOC4xNjg0NiA4LjcwODc4TDEyLjI0OTggNC42MTkyM0MxMi42NDA1IDQuMjI3NzcgMTMuMjc0OCA0LjIyNzc3IDEzLjY2NTUgNC42MTkyM0wxNC4wODUgNS4wMzk2QzE0LjQ3NDYgNS40Mjk5NyAxNC40NzQ2IDYuMDYyMDQgMTQuMDg1IDYuNDUyNEw4LjE2ODQ3IDEyLjM4MDhaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K) 50% 40% no-repeat;\n border: 1px solid var(--seui-chkbox-checked-color);\n}\n\n.selective-ui-option-view > label > div {\n width: 100%;\n height: 100%;\n\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.selective-ui-option-view > label.align-horizontal-left > div {\n justify-content: flex-start;\n}\n\n.selective-ui-option-view > label.align-horizontal-center > div {\n justify-content: center;\n}\n\n.selective-ui-option-view > label.align-horizontal-right > div {\n justify-content: flex-end;\n}\n\n.selective-ui-option-view > label.align-vertical-left > div {\n align-items: flex-start;\n}\n\n.selective-ui-option-view > label.align-vertical-center > div {\n align-items: center;\n}\n\n.selective-ui-option-view > label.align-vertical-right > div {\n align-items: flex-end;\n}\n\n.selective-ui-option-view.hide {\n display: none;\n}\n\n.selective-ui-option-view.highlight {\n background-color: var(--seui-chkbox-hover-background-color);\n border-color: var(--seui-chkbox-hover-border-color);\n}\n\n.selective-ui-option-view.highlight.checked {\n background-color: var(--seui-chkbox-checked-hover-background-color);\n border-color: var(--seui-chkbox-checked-hover-border-color);\n}\n\n.selective-ui-option-view.has-image {\n gap: 10px;\n}\n\n.selective-ui-option-view.has-image.image-top {\n flex-direction: column;\n align-items: center;\n text-align: center;\n}\n\n.selective-ui-option-view.has-image.image-right {\n flex-direction: row-reverse;\n}\n\n.selective-ui-option-view.has-image.image-bottom {\n flex-direction: column-reverse;\n}\n\n.selective-ui-option-view .option-image {\n object-fit: cover;\n flex-shrink: 0;\n}\n\n.selective-ui-option-view.multiple.has-image > label::before {\n order: -1;\n}",".selective-ui-accessorybox {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n\n gap: 2px;\n padding: var(--seui-accessory-padding);\n max-width: var(--seui-accessory-max-width);\n max-height: var(--seui-accessory-max-height);\n overflow-y: scroll;\n}\n\n.accessory-item {\n display: flex;\n align-items: center;\n\n overflow: hidden;\n border-color: var(--seui-accessory-item-border-color);\n border-style: var(--seui-accessory-item-border-style);\n border-width: var(--seui-accessory-item-border-width);\n border-radius: var(--seui-accessory-item-border-radius);\n\n background: var(--seui-accessory-item-background);\n font-size: var(--seui-accessory-item-font-size);\n padding: var(--seui-accessory-item-padding);\n gap: var(--seui-accessory-item-gap);\n}\n\n.accessory-item > .accessory-item-button {\n position: relative;\n cursor: pointer;\n color: var(--seui-accessory-item-button-color);\n font-weight: bold;\n\n border-color: var(--seui-accessory-item-button-border-color);\n border-style: var(--seui-accessory-item-button-border-style);\n border-width: var(--seui-accessory-item-button-border-width);\n border-radius: var(--seui-accessory-item-button-border-radius);\n\n width: var(--seui-accessory-item-button-width);\n min-width: var(--seui-accessory-item-button-width);\n height: var(--seui-accessory-item-button-height);\n min-height: var(--seui-accessory-item-button-height);\n}\n\n.accessory-item > .accessory-item-button::after {\n background: url('data:image/svg+xml,<svg width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\"><g><title>Layer 1</title><g transform=\"rotate(45 8 8)\" stroke=\"null\" id=\"svg_28\"><rect stroke=\"%23000\" rx=\"1\" id=\"svg_20\" height=\"1.41129\" width=\"7.76211\" y=\"7.29435\" x=\"4.11895\" stroke-width=\"0\" fill=\"%234c4c4c\"/><rect stroke=\"%23000\" transform=\"matrix(0 0.705646 -0.705646 0 12.0262 3.97378)\" rx=\"1\" id=\"svg_27\" height=\"2\" width=\"11\" y=\"4.70572\" x=\"0.20572\" stroke-width=\"0\" fill=\"%234c4c4c\"/></g></g></svg>');\n display: block;\n content: \"\";\n position: absolute;\n background-repeat: no-repeat;\n background-position: center center;\n width: 100%;\n height: 100%;\n}\n\n.accessory-item > .accessory-item-content {\n color: var(--seui-accessory-item-content-color);\n font-size: var(--seui-accessory-item-content-font-size);\n padding: var(--seui-accessory-item-content-padding);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}"]}
|
|
1
|
+
{"version":3,"sources":["index.css","selectbox.css","placeholder.css","directive.css","empty-state.css","loading-state.css","optgroup.css","popup.css","searchbox.css","option-handle.css","option.css","accessorybox.css"],"names":[],"mappings":"AAAA;IACI,mCAAmC;;IAEnC,+BAA+B;IAC/B,kCAAkC;IAClC,oDAAoD;IACpD,2BAA2B;IAC3B,kCAAkC;IAClC,qCAAqC;IACrC,0CAA0C;IAC1C,8CAA8C;IAC9C,iCAAiC;IACjC,oCAAoC;IACpC,4BAA4B;IAC5B,+BAA+B;IAC/B,8BAA8B;;IAE9B,+BAA+B;IAC/B,kCAAkC;;IAElC,sCAAsC;IACtC,4CAA4C;IAC5C,4CAA4C;IAC5C,wCAAwC;IACxC,kCAAkC;;IAElC,0BAA0B;IAC1B,gCAAgC;;IAEhC,gCAAgC;IAChC,iCAAiC;IACjC,+BAA+B;IAC/B,2CAA2C;IAC3C,yCAAyC;IACzC,uCAAuC;IACvC,wCAAwC;IACxC,yCAAyC;IACzC,qCAAqC;IACrC,kCAAkC;IAClC,8BAA8B;IAC9B,2CAA2C;IAC3C,wCAAwC;IACxC,yCAAyC;IACzC,kDAAkD;IAClD,gDAAgD;IAChD,8CAA8C;IAC9C,+CAA+C;IAC/C,4CAA4C;IAC5C,6CAA6C;IAC7C,kDAAkD;;IAElD,sCAAsC;IACtC,kCAAkC;IAClC,gCAAgC;IAChC,8BAA8B;IAC9B,+BAA+B;;IAE/B,uCAAuC;IACvC,mCAAmC;;IAEnC,6CAA6C;IAC7C,yCAAyC;;IAEzC,+CAA+C;IAC/C,2CAA2C;;IAE3C,qDAAqD;IACrD,iDAAiD;;IAEjD,oCAAoC;;IAEpC,iCAAiC;IACjC,sCAAsC;IACtC,oCAAoC;AAC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.css","sourcesContent":[":root {\n --seui-transparent-color: #00000000;\n\n --seui-view-text-color: #121212;\n --seui-view-ro-text-color: #a3a3a3;\n --seui-view-text-style: Arial, Helvetica, sans-serif;\n --seui-view-text-size: 13px;\n --seui-view-mobile-text-size: 16px;\n --seui-view-background-color: #ffffff;\n --seui-view-ro-background-color: #00000029;\n --seui-view-optgroup-background-color: #a3c6e9;\n --seui-view-border-color: #a3a3a3;\n --seui-view-ro-border-color: #bdbdbd;\n --seui-view-border-size: 1px;\n --seui-view-border-style: solid;\n --seui-view-border-radius: 5px;\n\n --seui-directive-color: #000000;\n --seui-directive-ro-color: #a3a3a3;\n\n --seui-option-crtl-text-color: #307ecc;\n --seui-option-crtl-text-color-hover: #ff0000;\n --seui-option-crtl-background-color: #f3f3f3;\n --seui-option-crtl-border-color: #cccccc;\n --seui-option-crtl-text-size: 13px;\n\n --seui-option-padding: 5px;\n --seui-option-border-radius: 5px;\n\n --seui-accessory-max-width: 100%;\n --seui-accessory-max-height: 50px;\n --seui-accessory-padding: 2px 0;\n --seui-accessory-item-border-color: #a3a3a3;\n --seui-accessory-item-border-style: solid;\n --seui-accessory-item-border-width: 1px;\n --seui-accessory-item-border-radius: 3px;\n --seui-accessory-item-background: #f7f7f9;\n --seui-accessory-item-font-size: 11px;\n --seui-accessory-item-padding: 2px;\n --seui-accessory-item-gap: 3px;\n --seui-accessory-item-button-color: #757575;\n --seui-accessory-item-button-width: 16px;\n --seui-accessory-item-button-height: 16px;\n --seui-accessory-item-button-border-color: #a3a3a3;\n --seui-accessory-item-button-border-style: solid;\n --seui-accessory-item-button-border-width: 1px;\n --seui-accessory-item-button-border-radius: 2px;\n --seui-accessory-item-content-color: #307ecc;\n --seui-accessory-item-content-font-size: 11px;\n --seui-accessory-item-content-padding: 0 4px 0 2px;\n\n --seui-popup-background-color: #fbfbfb;\n --seui-popup-border-color: #a3a3a3;\n --seui-popup-border-style: solid;\n --seui-popup-border-width: 1px;\n --seui-popup-border-radius: 6px;\n\n --seui-chkbox-background-color: #ffffff;\n --seui-chkbox-border-color: #8f9194;\n\n --seui-chkbox-hover-background-color: #dbdbdb;\n --seui-chkbox-hover-border-color: #b7b7b7;\n\n --seui-chkbox-checked-background-color: #9dcff8;\n --seui-chkbox-checked-border-color: #9dcff8;\n\n --seui-chkbox-checked-hover-background-color: #9dcff8;\n --seui-chkbox-checked-hover-border-color: #007eff;\n\n --seui-chkbox-checked-color: #0075FF;\n\n --seui-empty-state-color: #999999;\n --seui-empty-state-background: #f9f9f9;\n --seui-empty-state-padding: 10px 5px;\n}",".selective-ui-MAIN {\n display: inline-block;\n max-width: min-content;\n}\n.selective-ui-MAIN, .selective-ui-MAIN * {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n\n margin: 0;\n padding: 0;\n\n line-height: normal;\n}\n.selective-ui-MAIN > select.init {\n display: none;\n}\n.selective-ui-MAIN > .selective-ui-view {\n position: relative;\n width: 100%;\n height: 100%;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n\n background-color: var(--seui-view-background-color);\n border: var(--seui-view-border-style) var(--seui-view-border-size) var(--seui-view-border-color);\n border-radius: var(--seui-view-border-radius);\n}\n\n.selective-ui-MAIN.invisible {\n display: none;\n}\n\n.selective-ui-MAIN.disabled {\n --seui-view-background-color: var(--seui-view-ro-background-color);\n --seui-view-border-color: var(--seui-view-ro-border-color);\n --seui-view-text-color: var(--seui-view-ro-text-color);\n --seui-directive-color: var(--seui-directive-ro-color);\n}\n\n.selective-ui-MAIN .hide {\n display: none;\n}\n\n@supports (-webkit-touch-callout: none) {\n :root {\n --seui-view-text-size: var(--seui-view-mobile-text-size);\n }\n}",".selective-ui-placeholder {\n display: flex;\n align-items: center;\n \n margin-left: 10px;\n max-width: calc(100% - 30px);\n height: calc(100% - 10px);\n text-overflow: ellipsis;\n white-space: nowrap;\n pointer-events: none;\n font-family: var(--seui-view-text-style);\n font-size: var(--seui-view-text-size) !important;\n overflow: hidden;\n color: var(--seui-view-text-color);\n}",".selective-ui-directive {\n content: \" \";\n position: absolute;\n display: inline-block;\n vertical-align: middle;\n transition: all linear 200ms;\n border-top: 4px solid var(--seui-directive-color);\n border-right: 4px solid transparent;\n border-left: 4px solid transparent;\n width: 0;\n height: 0;\n right: 10px;\n top: 50%;\n transform: translateY(-50%) rotate(0deg);\n z-index: 1;\n pointer-events: none;\n}\n.selective-ui-directive.drop-down {\n transform: translateY(-50%) rotate(180deg);\n}",".selective-ui-empty-state {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--seui-empty-state-padding, 20px);\n text-align: center;\n font-family: var(--seui-view-text-style);\n font-size: var(--seui-view-text-size);\n color: var(--seui-empty-state-color, #999);\n background-color: var(--seui-empty-state-background, transparent);\n border-radius: var(--seui-option-border-radius);\n min-height: 60px;\n\n position: sticky;\n bottom: 0;\n}\n\n.selective-ui-empty-state.small {\n text-align: left;\n justify-content: flex-start;\n min-height: 30px;\n}\n\n.selective-ui-empty-state.hide {\n display: none;\n}",".selective-ui-loading-state {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--seui-empty-state-padding, 20px);\n text-align: center;\n font-family: var(--seui-view-text-style);\n font-size: var(--seui-view-text-size);\n color: var(--seui-empty-state-color, #999);\n background-color: var(--seui-empty-state-background, transparent);\n border-radius: var(--seui-option-border-radius);\n min-height: 60px;\n\n position: sticky;\n bottom: 0;\n}\n\n.selective-ui-loading-state.small {\n text-align: left;\n justify-content: flex-start;\n min-height: 30px;\n}\n\n.selective-ui-loading-state.hide {\n display: none;\n}",".selective-ui-group {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.selective-ui-group.hide {\n display: none;\n}\n\n.selective-ui-group-header {\n font-family: var(--seui-view-text-style);\n font-size: var(--seui-view-text-size);\n font-weight: 600;\n color: var(--seui-view-text-color);\n padding: 8px 12px;\n background-color: var(--seui-view-optgroup-background-color);\n border-radius: var(--seui-option-border-radius);\n /* position: sticky; */\n /* top: 0; */\n z-index: 1;\n cursor: pointer;\n user-select: none;\n \n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.selective-ui-group-header::before {\n content: \"\";\n display: inline-block;\n width: 0;\n height: 0;\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n border-left: 7px solid currentColor;\n transition: transform 200ms ease;\n transform: rotate(90deg);\n}\n\n.selective-ui-group.collapsed .selective-ui-group-header::before {\n transform: rotate(0deg);\n}\n\n.selective-ui-group-items {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding-left: 16px;\n}\n\n.selective-ui-group.collapsed .selective-ui-group-items {\n display: none;\n}\n\n/* Option trong group có indent nhẹ hơn */\n.selective-ui-group-items .selective-ui-option-view {\n padding-left: 12px;\n border-left: 2px solid #e0e0e0;\n margin-left: 4px;\n}",".selective-ui-popup, .selective-ui-popup * {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n\n line-height: normal;\n}\n\n.selective-ui-popup {\n display: none;\n position: fixed;\n z-index: 9999;\n overflow: none;\n flex-direction: column;\n \n height: 0px;\n padding: 2px;\n gap: 2px;\n\n background-color: var(--seui-popup-background-color);\n border-color: var(--seui-popup-border-color);\n border-style: var(--seui-popup-border-style);\n border-width: var(--seui-popup-border-width);\n border-radius: var(--seui-popup-border-radius);\n}\n\n.selective-ui-options-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n gap: 2px;\n\n -webkit-overflow-scrolling: touch;\n touch-action: pan-y;\n}\n\n.selective-ui-options-container.hide {\n display: none;\n}",".selective-ui-searchbox {\n display: flex;\n flex-direction: row;\n align-items: center;\n position: absolute;\n \n background-color: var(--seui-view-background-color);\n border-radius: 5px;\n z-index: 2;\n width: calc(100% - 30px);\n height: 100%;\n}\n\n.selective-ui-searchbox-input {\n width: 100%;\n height: calc(100% - 10px);\n border: 0;\n outline: none !important;\n background: var(--seui-transparent-color);\n color: var(--seui-view-text-color);\n padding: 0 !important;\n margin-left: 10px;\n text-indent: 0px;\n font-family: var(--seui-view-text-style);\n font-size: var(--seui-view-text-size) !important;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}",".selective-ui-option-handle {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n \n font-size: var(--seui-option-crtl-text-size);\n font-family: var(--seui-view-text-style);\n width: unset;\n position: sticky;\n top: 0px;\n padding: var(--seui-option-padding);\n z-index: 2;\n background-color: var(--seui-option-crtl-background-color);\n border: 1px solid var(--seui-option-crtl-border-color);\n border-radius: var(--seui-option-border-radius);\n}\n\n.selective-ui-option-handle.hide {\n display: none;\n}\n\n.selective-ui-option-handle-item {\n text-decoration: none;\n cursor: pointer;\n color: var(--seui-option-crtl-text-color);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.selective-ui-option-handle-item:hover {\n color: var(--seui-option-crtl-text-color-hover);\n}",".selective-ui-option-view {\n display: flex;\n width: auto;\n flex-direction: row;\n align-items: center !important;\n position: relative;\n border-radius: 4px;\n line-height: normal;\n padding: 5px;\n gap: 7px;\n transition: all 180ms;\n\n background-color: var(--seui-transparent-color);\n border: solid 1px var(--seui-transparent-color);\n}\n\n.selective-ui-option-view.checked {\n background-color: var(--seui-chkbox-checked-background-color);\n border-color: var(--seui-chkbox-checked-border-color);\n}\n\n.selective-ui-option-view > input {\n display: none;\n}\n\n.selective-ui-option-view > label {\n width: 100%;\n height: 100%;\n display: flex;\n gap: 7px;\n font-family: var(--seui-view-text-style);\n font-size: var(--seui-view-text-size);\n color: var(--seui-view-text-color);\n align-items: center;\n}\n\n.selective-ui-option-view.multiple > label::before {\n content: \"\";\n display: block;\n width: 17px;\n min-width: 17px;\n height: 17px;\n min-height: 17px;\n background: var(--seui-chkbox-background-color);\n border: 1px solid var(--seui-chkbox-border-color);\n border-radius: 0.2em;\n -webkit-transition: all 200ms, background 200ms ease-in-out;\n transition: all 200ms, background 200ms ease-in-out;\n}\n\n.selective-ui-option-view.multiple.checked > label::before {\n color: var(--seui-view-background-color);\n background: var(--seui-chkbox-checked-color) url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNyAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04LjE2ODQ3IDEyLjM4MDhDNy43Nzc3OCAxMi43NzIyIDcuMTQzNTMgMTIuNzcyMiA2Ljc1Mjg0IDEyLjM4MDhMMi43NDQ5OCA4LjM2NDlDMi4zNTU0IDcuOTc0NTQgMi4zNTU0IDcuMzQyNDcgMi43NDQ5OCA2Ljk1MjFMMy4xNjQ1MiA2LjUzMTczQzMuNTU1MiA2LjE0MDI3IDQuMTg5NDYgNi4xNDAyNyA0LjU4MDE0IDYuNTMxNzNMNi43NTI4NCA4LjcwODc4QzcuMTQzNTIgOS4xMDAyNCA3Ljc3Nzc4IDkuMTAwMjQgOC4xNjg0NiA4LjcwODc4TDEyLjI0OTggNC42MTkyM0MxMi42NDA1IDQuMjI3NzcgMTMuMjc0OCA0LjIyNzc3IDEzLjY2NTUgNC42MTkyM0wxNC4wODUgNS4wMzk2QzE0LjQ3NDYgNS40Mjk5NyAxNC40NzQ2IDYuMDYyMDQgMTQuMDg1IDYuNDUyNEw4LjE2ODQ3IDEyLjM4MDhaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K) 50% 40% no-repeat;\n border: 1px solid var(--seui-chkbox-checked-color);\n}\n\n.selective-ui-option-view > label > div {\n width: 100%;\n height: 100%;\n\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.selective-ui-option-view > label.align-horizontal-left > div {\n justify-content: flex-start;\n}\n\n.selective-ui-option-view > label.align-horizontal-center > div {\n justify-content: center;\n}\n\n.selective-ui-option-view > label.align-horizontal-right > div {\n justify-content: flex-end;\n}\n\n.selective-ui-option-view > label.align-vertical-left > div {\n align-items: flex-start;\n}\n\n.selective-ui-option-view > label.align-vertical-center > div {\n align-items: center;\n}\n\n.selective-ui-option-view > label.align-vertical-right > div {\n align-items: flex-end;\n}\n\n.selective-ui-option-view.hide {\n display: none;\n}\n\n.selective-ui-option-view.highlight {\n background-color: var(--seui-chkbox-hover-background-color);\n border-color: var(--seui-chkbox-hover-border-color);\n}\n\n.selective-ui-option-view.highlight.checked {\n background-color: var(--seui-chkbox-checked-hover-background-color);\n border-color: var(--seui-chkbox-checked-hover-border-color);\n}\n\n.selective-ui-option-view.has-image {\n gap: 10px;\n}\n\n.selective-ui-option-view.has-image.image-top {\n flex-direction: column;\n align-items: center;\n text-align: center;\n}\n\n.selective-ui-option-view.has-image.image-right {\n flex-direction: row-reverse;\n}\n\n.selective-ui-option-view.has-image.image-bottom {\n flex-direction: column-reverse;\n}\n\n.selective-ui-option-view .option-image {\n object-fit: cover;\n flex-shrink: 0;\n}\n\n.selective-ui-option-view.multiple.has-image > label::before {\n order: -1;\n display: none;\n}",".selective-ui-accessorybox {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n\n gap: 2px;\n padding: var(--seui-accessory-padding);\n max-width: var(--seui-accessory-max-width);\n max-height: var(--seui-accessory-max-height);\n overflow-y: scroll;\n}\n\n.accessory-item {\n display: flex;\n align-items: center;\n\n overflow: hidden;\n border-color: var(--seui-accessory-item-border-color);\n border-style: var(--seui-accessory-item-border-style);\n border-width: var(--seui-accessory-item-border-width);\n border-radius: var(--seui-accessory-item-border-radius);\n\n background: var(--seui-accessory-item-background);\n font-size: var(--seui-accessory-item-font-size);\n padding: var(--seui-accessory-item-padding);\n gap: var(--seui-accessory-item-gap);\n}\n\n.accessory-item > .accessory-item-button {\n position: relative;\n cursor: pointer;\n color: var(--seui-accessory-item-button-color);\n font-weight: bold;\n\n border-color: var(--seui-accessory-item-button-border-color);\n border-style: var(--seui-accessory-item-button-border-style);\n border-width: var(--seui-accessory-item-button-border-width);\n border-radius: var(--seui-accessory-item-button-border-radius);\n\n width: var(--seui-accessory-item-button-width);\n min-width: var(--seui-accessory-item-button-width);\n height: var(--seui-accessory-item-button-height);\n min-height: var(--seui-accessory-item-button-height);\n}\n\n.accessory-item > .accessory-item-button::after {\n background: url('data:image/svg+xml,<svg width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\"><g><title>Layer 1</title><g transform=\"rotate(45 8 8)\" stroke=\"null\" id=\"svg_28\"><rect stroke=\"%23000\" rx=\"1\" id=\"svg_20\" height=\"1.41129\" width=\"7.76211\" y=\"7.29435\" x=\"4.11895\" stroke-width=\"0\" fill=\"%234c4c4c\"/><rect stroke=\"%23000\" transform=\"matrix(0 0.705646 -0.705646 0 12.0262 3.97378)\" rx=\"1\" id=\"svg_27\" height=\"2\" width=\"11\" y=\"4.70572\" x=\"0.20572\" stroke-width=\"0\" fill=\"%234c4c4c\"/></g></g></svg>');\n display: block;\n content: \"\";\n position: absolute;\n background-repeat: no-repeat;\n background-position: center center;\n width: 100%;\n height: 100%;\n}\n\n.accessory-item > .accessory-item-content {\n color: var(--seui-accessory-item-content-color);\n font-size: var(--seui-accessory-item-content-font-size);\n padding: var(--seui-accessory-item-content-padding);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}"]}
|
package/dist/selective-ui.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Selective UI v1.1.
|
|
1
|
+
/*! Selective UI v1.1.5 | MIT License */
|
|
2
2
|
/**
|
|
3
3
|
* @class
|
|
4
4
|
*/
|
|
@@ -1338,6 +1338,7 @@ class Popup {
|
|
|
1338
1338
|
this._modelManager.skipEvent(true);
|
|
1339
1339
|
if (Libs.string2Boolean(this.options.loadingfield) === false)
|
|
1340
1340
|
return;
|
|
1341
|
+
this._updateEmptyState({ isEmpty: false, hasVisible: true });
|
|
1341
1342
|
this.loadingState.show(this.optionAdapter.getVisibilityStats().hasVisible);
|
|
1342
1343
|
this.optionHandle.hide();
|
|
1343
1344
|
this.triggerResize();
|
|
@@ -1423,7 +1424,7 @@ class Popup {
|
|
|
1423
1424
|
* Opens the popup: creates and attaches DOM if needed, initializes observers and effector,
|
|
1424
1425
|
* computes position and dimensions, and runs expand animation. Invokes callback on completion.
|
|
1425
1426
|
*/
|
|
1426
|
-
open(callback = null) {
|
|
1427
|
+
open(callback = null, isShowEmptyState) {
|
|
1427
1428
|
if (!this.node || !this.options || !this.optionHandle || !this._parent || !this._effSvc)
|
|
1428
1429
|
return;
|
|
1429
1430
|
if (!this.isCreated) {
|
|
@@ -1437,7 +1438,9 @@ class Popup {
|
|
|
1437
1438
|
});
|
|
1438
1439
|
}
|
|
1439
1440
|
this.optionHandle.refresh();
|
|
1440
|
-
|
|
1441
|
+
if (isShowEmptyState) {
|
|
1442
|
+
this._updateEmptyState();
|
|
1443
|
+
}
|
|
1441
1444
|
const location = this._getParentLocation();
|
|
1442
1445
|
const { position, top, maxHeight, realHeight } = this._calculatePosition(location);
|
|
1443
1446
|
this._effSvc.expand({
|
|
@@ -2975,11 +2978,13 @@ class SearchController {
|
|
|
2975
2978
|
*
|
|
2976
2979
|
* @param {HTMLSelectElement} selectElement - The native select element that provides context and data source.
|
|
2977
2980
|
* @param {ModelManager<MixedItem, any>} modelManager - Manager responsible for models and rendering updates.
|
|
2981
|
+
* @param {SelectBox} selectBox - SelectBox handle.
|
|
2978
2982
|
*/
|
|
2979
|
-
constructor(selectElement, modelManager) {
|
|
2983
|
+
constructor(selectElement, modelManager, selectBox) {
|
|
2980
2984
|
this._ajaxConfig = null;
|
|
2981
2985
|
this._abortController = null;
|
|
2982
2986
|
this._popup = null;
|
|
2987
|
+
this._selectBox = null;
|
|
2983
2988
|
this._paginationState = {
|
|
2984
2989
|
currentPage: 0,
|
|
2985
2990
|
totalPages: 1,
|
|
@@ -2990,6 +2995,7 @@ class SearchController {
|
|
|
2990
2995
|
};
|
|
2991
2996
|
this._select = selectElement;
|
|
2992
2997
|
this._modelManager = modelManager;
|
|
2998
|
+
this._selectBox = selectBox;
|
|
2993
2999
|
}
|
|
2994
3000
|
/**
|
|
2995
3001
|
* Indicates whether AJAX-based search is configured.
|
|
@@ -3021,7 +3027,7 @@ class SearchController {
|
|
|
3021
3027
|
payload = {
|
|
3022
3028
|
values: valuesArray.join(","),
|
|
3023
3029
|
load_by_values: "1",
|
|
3024
|
-
...(typeof cfg.data === "function" ? cfg.data("", 0) : cfg.data ?? {}),
|
|
3030
|
+
...(typeof cfg.data === "function" ? cfg.data.bind(this._selectBox.Selective.find(this._selectBox.container.targetElement))("", 0) : cfg.data ?? {}),
|
|
3025
3031
|
};
|
|
3026
3032
|
}
|
|
3027
3033
|
let response;
|
|
@@ -3196,7 +3202,7 @@ class SearchController {
|
|
|
3196
3202
|
.join(",");
|
|
3197
3203
|
let payload;
|
|
3198
3204
|
if (typeof cfg.data === "function") {
|
|
3199
|
-
payload = cfg.data(keyword, page);
|
|
3205
|
+
payload = cfg.data.bind(this._selectBox.Selective.find(this._selectBox.container.targetElement))(keyword, page);
|
|
3200
3206
|
if (payload && typeof payload.selectedValue === "undefined")
|
|
3201
3207
|
payload.selectedValue = selectedValues;
|
|
3202
3208
|
}
|
|
@@ -4559,7 +4565,7 @@ class SelectBox {
|
|
|
4559
4565
|
const effector = Effector();
|
|
4560
4566
|
const optionModelManager = new ModelManager(options);
|
|
4561
4567
|
const accessoryBox = new AccessoryBox(options);
|
|
4562
|
-
const searchController = new SearchController(select, optionModelManager);
|
|
4568
|
+
const searchController = new SearchController(select, optionModelManager, this);
|
|
4563
4569
|
const selectObserver = new SelectObserver(select);
|
|
4564
4570
|
const datasetObserver = new DatasetObserver(select);
|
|
4565
4571
|
this.Selective = Selective;
|
|
@@ -4744,11 +4750,17 @@ class SelectBox {
|
|
|
4744
4750
|
getAction() {
|
|
4745
4751
|
const container = this.container;
|
|
4746
4752
|
const superThis = this;
|
|
4753
|
+
const getInstance = () => {
|
|
4754
|
+
return this.Selective.find(container.targetElement);
|
|
4755
|
+
};
|
|
4747
4756
|
const bindedMap = Libs.getBinderMap(container.targetElement);
|
|
4748
4757
|
if (!bindedMap)
|
|
4749
4758
|
return null;
|
|
4750
4759
|
const bindedOptions = bindedMap.options;
|
|
4751
4760
|
const resp = {
|
|
4761
|
+
get targetElement() {
|
|
4762
|
+
return container.targetElement;
|
|
4763
|
+
},
|
|
4752
4764
|
get placeholder() {
|
|
4753
4765
|
return container.placeholder.get();
|
|
4754
4766
|
},
|
|
@@ -4782,25 +4794,22 @@ class SelectBox {
|
|
|
4782
4794
|
},
|
|
4783
4795
|
get valueOptions() {
|
|
4784
4796
|
const item_list = [];
|
|
4785
|
-
superThis.getModelOption().forEach((m) => {
|
|
4786
|
-
|
|
4787
|
-
item_list.push(m);
|
|
4797
|
+
superThis.getModelOption(true).forEach((m) => {
|
|
4798
|
+
item_list.push(m);
|
|
4788
4799
|
});
|
|
4789
4800
|
return item_list;
|
|
4790
4801
|
},
|
|
4791
4802
|
get mask() {
|
|
4792
4803
|
const item_list = [];
|
|
4793
|
-
superThis.getModelOption().forEach((m) => {
|
|
4794
|
-
|
|
4795
|
-
item_list.push(m.text);
|
|
4804
|
+
superThis.getModelOption(true).forEach((m) => {
|
|
4805
|
+
item_list.push(m.text);
|
|
4796
4806
|
});
|
|
4797
4807
|
return item_list;
|
|
4798
4808
|
},
|
|
4799
4809
|
get valueText() {
|
|
4800
4810
|
const item_list = [];
|
|
4801
|
-
superThis.getModelOption().forEach((m) => {
|
|
4802
|
-
|
|
4803
|
-
item_list.push(m.text);
|
|
4811
|
+
superThis.getModelOption(true).forEach((m) => {
|
|
4812
|
+
item_list.push(m.text);
|
|
4804
4813
|
});
|
|
4805
4814
|
const valLength = item_list.length;
|
|
4806
4815
|
return valLength > 1 ? item_list : valLength === 0 ? "" : item_list[0];
|
|
@@ -4808,6 +4817,24 @@ class SelectBox {
|
|
|
4808
4817
|
get isOpen() {
|
|
4809
4818
|
return superThis.isOpen;
|
|
4810
4819
|
},
|
|
4820
|
+
getParent(_evtToken) {
|
|
4821
|
+
return container.view.parentElement;
|
|
4822
|
+
},
|
|
4823
|
+
valueDataset(_evtToken, strDataset = null, isArray = false) {
|
|
4824
|
+
var item_list = [];
|
|
4825
|
+
superThis.getModelOption(true).forEach(m => {
|
|
4826
|
+
item_list.push(strDataset ? m.dataset[strDataset] : m.dataset);
|
|
4827
|
+
});
|
|
4828
|
+
if (!isArray) {
|
|
4829
|
+
if (item_list.length == 0) {
|
|
4830
|
+
return "";
|
|
4831
|
+
}
|
|
4832
|
+
else if (item_list.length == 1) {
|
|
4833
|
+
return item_list[0];
|
|
4834
|
+
}
|
|
4835
|
+
}
|
|
4836
|
+
return item_list;
|
|
4837
|
+
},
|
|
4811
4838
|
selectAll(_evtToken, trigger = true) {
|
|
4812
4839
|
if (bindedOptions.multiple && bindedOptions.maxSelected > 0) {
|
|
4813
4840
|
if (superThis.getModelOption().length > bindedOptions.maxSelected)
|
|
@@ -4816,7 +4843,7 @@ class SelectBox {
|
|
|
4816
4843
|
if (this.disabled || this.readonly || !bindedOptions.multiple)
|
|
4817
4844
|
return;
|
|
4818
4845
|
if (trigger) {
|
|
4819
|
-
const beforeChangeToken = iEvents.callEvent([
|
|
4846
|
+
const beforeChangeToken = iEvents.callEvent([getInstance()], ...bindedOptions.on.beforeChange);
|
|
4820
4847
|
if (beforeChangeToken.isCancel)
|
|
4821
4848
|
return;
|
|
4822
4849
|
superThis.oldValue = this.value;
|
|
@@ -4830,7 +4857,7 @@ class SelectBox {
|
|
|
4830
4857
|
if (this.disabled || this.readonly || !bindedOptions.multiple)
|
|
4831
4858
|
return;
|
|
4832
4859
|
if (trigger) {
|
|
4833
|
-
const beforeChangeToken = iEvents.callEvent([
|
|
4860
|
+
const beforeChangeToken = iEvents.callEvent([getInstance()], ...bindedOptions.on.beforeChange);
|
|
4834
4861
|
if (beforeChangeToken.isCancel)
|
|
4835
4862
|
return;
|
|
4836
4863
|
superThis.oldValue = this.value;
|
|
@@ -4865,6 +4892,7 @@ class SelectBox {
|
|
|
4865
4892
|
if (bindedOptions.loadingfield)
|
|
4866
4893
|
container.popup?.showLoading?.();
|
|
4867
4894
|
try {
|
|
4895
|
+
container.searchController.resetPagination();
|
|
4868
4896
|
const result = await container.searchController.loadByValues(missing);
|
|
4869
4897
|
if (result.success && result.items.length > 0) {
|
|
4870
4898
|
result.items.forEach((it) => {
|
|
@@ -4896,7 +4924,7 @@ class SelectBox {
|
|
|
4896
4924
|
}
|
|
4897
4925
|
}
|
|
4898
4926
|
if (trigger) {
|
|
4899
|
-
const beforeChangeToken = iEvents.callEvent([
|
|
4927
|
+
const beforeChangeToken = iEvents.callEvent([getInstance()], ...bindedOptions.on.beforeChange);
|
|
4900
4928
|
if (beforeChangeToken.isCancel)
|
|
4901
4929
|
return;
|
|
4902
4930
|
superThis.oldValue = this.value;
|
|
@@ -4911,18 +4939,18 @@ class SelectBox {
|
|
|
4911
4939
|
},
|
|
4912
4940
|
open() {
|
|
4913
4941
|
if (superThis.isOpen)
|
|
4914
|
-
return
|
|
4942
|
+
return;
|
|
4915
4943
|
const findAnother = superThis.Selective?.find?.();
|
|
4916
4944
|
if (findAnother && !findAnother.isEmpty) {
|
|
4917
4945
|
const closeToken = findAnother.close();
|
|
4918
4946
|
if (closeToken.isCancel)
|
|
4919
|
-
return
|
|
4947
|
+
return;
|
|
4920
4948
|
}
|
|
4921
4949
|
if (this.disabled)
|
|
4922
|
-
return
|
|
4923
|
-
const beforeShowToken = iEvents.callEvent([
|
|
4950
|
+
return;
|
|
4951
|
+
const beforeShowToken = iEvents.callEvent([getInstance()], ...bindedOptions.on.beforeShow);
|
|
4924
4952
|
if (beforeShowToken.isCancel)
|
|
4925
|
-
return
|
|
4953
|
+
return;
|
|
4926
4954
|
superThis.isOpen = true;
|
|
4927
4955
|
container.directive.setDropdown(true);
|
|
4928
4956
|
const adapter = container.popup.optionAdapter;
|
|
@@ -4932,6 +4960,7 @@ class SelectBox {
|
|
|
4932
4960
|
else
|
|
4933
4961
|
adapter.resetHighlight();
|
|
4934
4962
|
if ((!superThis.hasLoadedOnce || superThis.isBeforeSearch) && bindedOptions?.ajax) {
|
|
4963
|
+
container.searchController.resetPagination();
|
|
4935
4964
|
container.popup.showLoading();
|
|
4936
4965
|
superThis.hasLoadedOnce = true;
|
|
4937
4966
|
superThis.isBeforeSearch = false;
|
|
@@ -4943,8 +4972,11 @@ class SelectBox {
|
|
|
4943
4972
|
.then(() => container.popup?.triggerResize?.())
|
|
4944
4973
|
.catch((err) => console.error("Initial ajax load error:", err));
|
|
4945
4974
|
}, bindedOptions.animationtime);
|
|
4975
|
+
container.popup.open(null, false);
|
|
4976
|
+
}
|
|
4977
|
+
else {
|
|
4978
|
+
container.popup.open(null, true);
|
|
4946
4979
|
}
|
|
4947
|
-
container.popup.open();
|
|
4948
4980
|
container.searchbox.show();
|
|
4949
4981
|
const ViewPanel = container.tags.ViewPanel;
|
|
4950
4982
|
ViewPanel.setAttribute("aria-expanded", "true");
|
|
@@ -4953,15 +4985,15 @@ class SelectBox {
|
|
|
4953
4985
|
ViewPanel.setAttribute("aria-labelledby", bindedOptions.SEID_HOLDER);
|
|
4954
4986
|
if (bindedOptions.multiple)
|
|
4955
4987
|
ViewPanel.setAttribute("aria-multiselectable", "true");
|
|
4956
|
-
iEvents.callEvent([
|
|
4957
|
-
return
|
|
4988
|
+
iEvents.callEvent([getInstance()], ...bindedOptions.on.show);
|
|
4989
|
+
return;
|
|
4958
4990
|
},
|
|
4959
4991
|
close() {
|
|
4960
4992
|
if (!superThis.isOpen)
|
|
4961
|
-
return
|
|
4962
|
-
const beforeCloseToken = iEvents.callEvent([
|
|
4993
|
+
return;
|
|
4994
|
+
const beforeCloseToken = iEvents.callEvent([getInstance()], ...bindedOptions.on.beforeClose);
|
|
4963
4995
|
if (beforeCloseToken.isCancel)
|
|
4964
|
-
return
|
|
4996
|
+
return;
|
|
4965
4997
|
superThis.isOpen = false;
|
|
4966
4998
|
container.directive.setDropdown(false);
|
|
4967
4999
|
container.popup.close(() => {
|
|
@@ -4969,8 +5001,8 @@ class SelectBox {
|
|
|
4969
5001
|
});
|
|
4970
5002
|
container.searchbox.hide();
|
|
4971
5003
|
container.tags.ViewPanel.setAttribute("aria-expanded", "false");
|
|
4972
|
-
iEvents.callEvent([
|
|
4973
|
-
return
|
|
5004
|
+
iEvents.callEvent([getInstance()], ...bindedOptions.on.close);
|
|
5005
|
+
return;
|
|
4974
5006
|
},
|
|
4975
5007
|
toggle() {
|
|
4976
5008
|
if (superThis.isOpen)
|
|
@@ -4989,7 +5021,7 @@ class SelectBox {
|
|
|
4989
5021
|
this.setValue(null, this.oldValue, false, true);
|
|
4990
5022
|
return;
|
|
4991
5023
|
}
|
|
4992
|
-
const beforeChangeToken = iEvents.callEvent([
|
|
5024
|
+
const beforeChangeToken = iEvents.callEvent([getInstance(), this.value], ...bindedOptions.on.beforeChange);
|
|
4993
5025
|
if (beforeChangeToken.isCancel) {
|
|
4994
5026
|
this.setValue(null, this.oldValue, false);
|
|
4995
5027
|
return;
|
|
@@ -5000,7 +5032,7 @@ class SelectBox {
|
|
|
5000
5032
|
if (canTrigger) {
|
|
5001
5033
|
if (container.targetElement)
|
|
5002
5034
|
iEvents.trigger(container.targetElement, "change");
|
|
5003
|
-
iEvents.callEvent([
|
|
5035
|
+
iEvents.callEvent([getInstance(), this.value], ...bindedOptions.on.change);
|
|
5004
5036
|
if (superThis.options?.autoclose)
|
|
5005
5037
|
this.close();
|
|
5006
5038
|
}
|
|
@@ -5022,6 +5054,29 @@ class SelectBox {
|
|
|
5022
5054
|
ajax(_evtToken, obj) {
|
|
5023
5055
|
container.searchController.setAjax(obj);
|
|
5024
5056
|
},
|
|
5057
|
+
loadAjax(_evtToken) {
|
|
5058
|
+
return new Promise((resove, reject) => {
|
|
5059
|
+
container.popup.showLoading();
|
|
5060
|
+
container.searchController.resetPagination();
|
|
5061
|
+
superThis.hasLoadedOnce = true;
|
|
5062
|
+
superThis.isBeforeSearch = false;
|
|
5063
|
+
if (!container.popup || !container.searchController) {
|
|
5064
|
+
resove(getInstance());
|
|
5065
|
+
}
|
|
5066
|
+
else {
|
|
5067
|
+
container.searchController
|
|
5068
|
+
.search("")
|
|
5069
|
+
.then(() => {
|
|
5070
|
+
container.popup?.triggerResize?.();
|
|
5071
|
+
resove(getInstance());
|
|
5072
|
+
})
|
|
5073
|
+
.catch((err) => {
|
|
5074
|
+
console.error("Initial ajax load error:", err);
|
|
5075
|
+
reject(err);
|
|
5076
|
+
});
|
|
5077
|
+
}
|
|
5078
|
+
});
|
|
5079
|
+
}
|
|
5025
5080
|
};
|
|
5026
5081
|
// mirror properties: disabled / readonly / visible
|
|
5027
5082
|
this.createSymProp(resp, "disabled", "isDisabled");
|
|
@@ -5429,17 +5484,18 @@ class Selective {
|
|
|
5429
5484
|
*/
|
|
5430
5485
|
buildFuntionAction(object, name, els) {
|
|
5431
5486
|
object[name] = (...params) => {
|
|
5487
|
+
let resp = null;
|
|
5432
5488
|
for (let index = 0; index < els.length; index++) {
|
|
5433
5489
|
const el = els[index];
|
|
5434
5490
|
const binded = Libs.getBinderMap(el);
|
|
5435
5491
|
if (!binded?.action)
|
|
5436
5492
|
continue;
|
|
5437
5493
|
const evtToken = iEvents.buildEventToken();
|
|
5438
|
-
binded.action[name](evtToken.callback, ...params);
|
|
5494
|
+
resp ?? (resp = binded.action[name](evtToken.callback, ...params));
|
|
5439
5495
|
if (!evtToken.token.isContinue)
|
|
5440
5496
|
break;
|
|
5441
5497
|
}
|
|
5442
|
-
return object;
|
|
5498
|
+
return resp ?? object;
|
|
5443
5499
|
};
|
|
5444
5500
|
}
|
|
5445
5501
|
}
|
|
@@ -5457,60 +5513,21 @@ class Selective {
|
|
|
5457
5513
|
* to include component styles in the final bundle.
|
|
5458
5514
|
*/
|
|
5459
5515
|
/** Base/global styles for SelectiveUI. */
|
|
5460
|
-
const iVersion = "1.1.
|
|
5516
|
+
const iVersion = "1.1.5";
|
|
5461
5517
|
const iName = "SelectiveUI";
|
|
5462
|
-
|
|
5463
|
-
const SECLASS = new Selective();
|
|
5464
|
-
globalThis.GLOBAL_SEUI = {
|
|
5465
|
-
version: iVersion,
|
|
5466
|
-
name: iName,
|
|
5467
|
-
bind: SECLASS.bind.bind(SECLASS),
|
|
5468
|
-
find: SECLASS.find.bind(SECLASS),
|
|
5469
|
-
destroy: SECLASS.destroy.bind(SECLASS),
|
|
5470
|
-
effector: Effector.bind(Effector),
|
|
5471
|
-
rebind: SECLASS.rebind.bind(SECLASS)
|
|
5472
|
-
};
|
|
5473
|
-
let domInitialized = false;
|
|
5474
|
-
function init() {
|
|
5475
|
-
if (domInitialized)
|
|
5476
|
-
return;
|
|
5477
|
-
domInitialized = true;
|
|
5478
|
-
document.addEventListener("mousedown", () => {
|
|
5479
|
-
const sels = Libs.getBindedCommand();
|
|
5480
|
-
if (sels.length > 0) {
|
|
5481
|
-
const actionApi = SECLASS.find(sels.join(", "));
|
|
5482
|
-
if (!actionApi.isEmpty)
|
|
5483
|
-
actionApi.close();
|
|
5484
|
-
}
|
|
5485
|
-
});
|
|
5486
|
-
SECLASS.Observer();
|
|
5487
|
-
}
|
|
5488
|
-
if (typeof document !== "undefined") {
|
|
5489
|
-
if (document.readyState === "loading") {
|
|
5490
|
-
document.addEventListener("DOMContentLoaded", init);
|
|
5491
|
-
}
|
|
5492
|
-
else {
|
|
5493
|
-
init();
|
|
5494
|
-
}
|
|
5495
|
-
}
|
|
5496
|
-
console.log(`[${iName}] v${iVersion} loaded successfully`);
|
|
5497
|
-
}
|
|
5498
|
-
else {
|
|
5499
|
-
console.warn(`[${globalThis.GLOBAL_SEUI.name}] Already loaded (v${globalThis.GLOBAL_SEUI.version}). ` +
|
|
5500
|
-
`Using existing instance. Please remove duplicate <script> tags.`);
|
|
5501
|
-
}
|
|
5518
|
+
const SECLASS = new Selective();
|
|
5502
5519
|
/**
|
|
5503
5520
|
* Current library version.
|
|
5504
5521
|
*
|
|
5505
5522
|
* Declared as `const` literal type to enable strict typing and easy tree-shaking.
|
|
5506
5523
|
*/
|
|
5507
|
-
const version =
|
|
5524
|
+
const version = iVersion;
|
|
5508
5525
|
/**
|
|
5509
5526
|
* Library name identifier.
|
|
5510
5527
|
*
|
|
5511
5528
|
* Can be used for debugging, logging, telemetry, or exposing global namespace metadata.
|
|
5512
5529
|
*/
|
|
5513
|
-
const name =
|
|
5530
|
+
const name = iName;
|
|
5514
5531
|
/**
|
|
5515
5532
|
* Bind SelectiveUI behaviors to elements matched by a CSS selector.
|
|
5516
5533
|
*
|
|
@@ -5523,7 +5540,7 @@ const name = globalThis.GLOBAL_SEUI.name;
|
|
|
5523
5540
|
* bind(".my-select", { searchable: true });
|
|
5524
5541
|
*/
|
|
5525
5542
|
function bind(query, options = {}) {
|
|
5526
|
-
|
|
5543
|
+
SECLASS.bind(query, options);
|
|
5527
5544
|
}
|
|
5528
5545
|
/**
|
|
5529
5546
|
* Find an existing SelectiveUI instance/actions API by selector.
|
|
@@ -5535,7 +5552,7 @@ function bind(query, options = {}) {
|
|
|
5535
5552
|
* The return type is casted to `SelectiveActionApi` for a stable public contract.
|
|
5536
5553
|
*/
|
|
5537
5554
|
function find(query) {
|
|
5538
|
-
return
|
|
5555
|
+
return SECLASS.find(query);
|
|
5539
5556
|
}
|
|
5540
5557
|
/**
|
|
5541
5558
|
* Destroy SelectiveUI instance(s) and release related resources.
|
|
@@ -5551,7 +5568,7 @@ function find(query) {
|
|
|
5551
5568
|
* destroy();
|
|
5552
5569
|
*/
|
|
5553
5570
|
function destroy(query = null) {
|
|
5554
|
-
|
|
5571
|
+
SECLASS.destroy(query);
|
|
5555
5572
|
}
|
|
5556
5573
|
/**
|
|
5557
5574
|
* Rebind (reinitialize) SelectiveUI on the given selector.
|
|
@@ -5565,7 +5582,7 @@ function destroy(query = null) {
|
|
|
5565
5582
|
* @param options - Optional configuration applied during re-initialization.
|
|
5566
5583
|
*/
|
|
5567
5584
|
function rebind(query, options = {}) {
|
|
5568
|
-
|
|
5585
|
+
SECLASS.rebind(query, options);
|
|
5569
5586
|
}
|
|
5570
5587
|
/**
|
|
5571
5588
|
* Create an Effector instance for a given element.
|
|
@@ -5581,7 +5598,30 @@ function rebind(query, options = {}) {
|
|
|
5581
5598
|
* fx.show();
|
|
5582
5599
|
*/
|
|
5583
5600
|
function effector(element) {
|
|
5584
|
-
return
|
|
5601
|
+
return Effector(element);
|
|
5602
|
+
}
|
|
5603
|
+
let domInitialized = false;
|
|
5604
|
+
function init() {
|
|
5605
|
+
if (domInitialized)
|
|
5606
|
+
return;
|
|
5607
|
+
domInitialized = true;
|
|
5608
|
+
document.addEventListener("mousedown", () => {
|
|
5609
|
+
const sels = Libs.getBindedCommand();
|
|
5610
|
+
if (sels.length > 0) {
|
|
5611
|
+
const actionApi = SECLASS.find(sels.join(", "));
|
|
5612
|
+
if (!actionApi.isEmpty)
|
|
5613
|
+
actionApi.close();
|
|
5614
|
+
}
|
|
5615
|
+
});
|
|
5616
|
+
SECLASS.Observer();
|
|
5617
|
+
}
|
|
5618
|
+
if (typeof document !== "undefined") {
|
|
5619
|
+
if (document.readyState === "loading") {
|
|
5620
|
+
document.addEventListener("DOMContentLoaded", init);
|
|
5621
|
+
}
|
|
5622
|
+
else {
|
|
5623
|
+
init();
|
|
5624
|
+
}
|
|
5585
5625
|
}
|
|
5586
5626
|
|
|
5587
5627
|
export { bind, destroy, effector, find, name, rebind, version };
|