selective-ui 1.4.3 → 1.4.4
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.esm.js +42 -5
- 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.js +2 -2
- package/dist/selective-ui.min.js.br +0 -0
- package/dist/selective-ui.umd.js +43 -6
- package/dist/selective-ui.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/ts/components/accessorybox.ts +39 -4
- package/src/ts/components/selectbox.ts +9 -5
package/dist/selective-ui.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Selective UI v1.4.
|
|
1
|
+
/*! Selective UI v1.4.4 | MIT License */
|
|
2
2
|
/**
|
|
3
3
|
* @class
|
|
4
4
|
*/
|
|
@@ -4745,6 +4745,35 @@ class AccessoryBox extends Lifecycle {
|
|
|
4745
4745
|
* This is a cached snapshot used for show/hide decisions and re-rendering.
|
|
4746
4746
|
*/
|
|
4747
4747
|
this.modelDatas = [];
|
|
4748
|
+
/**
|
|
4749
|
+
* Internal SelectBox action bridge used by the accessory box to communicate
|
|
4750
|
+
* with the parent SelectBox instance.
|
|
4751
|
+
*
|
|
4752
|
+
* This reference is intentionally lightweight and acts as a direct integration
|
|
4753
|
+
* point between chip interactions and the main Select component behavior.
|
|
4754
|
+
*
|
|
4755
|
+
* Current responsibilities:
|
|
4756
|
+
* - Read runtime interaction state:
|
|
4757
|
+
* - `readonly`
|
|
4758
|
+
* - `disabled`
|
|
4759
|
+
* - Trigger synchronized change propagation through:
|
|
4760
|
+
* - `change(null, true)`
|
|
4761
|
+
*
|
|
4762
|
+
* Usage flow:
|
|
4763
|
+
* - When a chip remove button is clicked:
|
|
4764
|
+
* 1) AccessoryBox checks `readonly` / `disabled`
|
|
4765
|
+
* 2) Updates `modelData.selectedNonTrigger = false`
|
|
4766
|
+
* 3) Delegates the final change pipeline back to the SelectBox instance
|
|
4767
|
+
* through `internalInstance.change(...)`
|
|
4768
|
+
*
|
|
4769
|
+
* Notes:
|
|
4770
|
+
* - This property is optional because the AccessoryBox can exist before the
|
|
4771
|
+
* parent SelectBox finishes wiring dependencies.
|
|
4772
|
+
* - The instance is not owned by AccessoryBox and therefore is not destroyed
|
|
4773
|
+
* during {@link destroy}.
|
|
4774
|
+
* - Intended for internal framework communication only.
|
|
4775
|
+
*/
|
|
4776
|
+
this.internalInstance = null;
|
|
4748
4777
|
if (options)
|
|
4749
4778
|
this.initialize(options);
|
|
4750
4779
|
}
|
|
@@ -4885,6 +4914,7 @@ class AccessoryBox extends Lifecycle {
|
|
|
4885
4914
|
if (!this.node || !this.options)
|
|
4886
4915
|
return;
|
|
4887
4916
|
this.node.replaceChildren();
|
|
4917
|
+
const superThis = this;
|
|
4888
4918
|
if (modelDatas.length > 0 && this.options.multiple) {
|
|
4889
4919
|
modelDatas.forEach((modelData) => {
|
|
4890
4920
|
Libs.mountNode({
|
|
@@ -4900,8 +4930,12 @@ class AccessoryBox extends Lifecycle {
|
|
|
4900
4930
|
title: `${this.options.textAccessoryDeselect}${modelData.textContent}`,
|
|
4901
4931
|
onclick: async (evt) => {
|
|
4902
4932
|
evt.preventDefault();
|
|
4903
|
-
|
|
4904
|
-
|
|
4933
|
+
const instance = superThis.internalInstance;
|
|
4934
|
+
if (instance.readonly || instance.disabled) {
|
|
4935
|
+
return;
|
|
4936
|
+
}
|
|
4937
|
+
modelData.selectedNonTrigger = false;
|
|
4938
|
+
instance?.change(null, true);
|
|
4905
4939
|
},
|
|
4906
4940
|
},
|
|
4907
4941
|
},
|
|
@@ -8927,6 +8961,7 @@ class SelectBox extends Lifecycle {
|
|
|
8927
8961
|
return;
|
|
8928
8962
|
this.options.readonly = value;
|
|
8929
8963
|
this.node.classList.toggle("readonly", value);
|
|
8964
|
+
this.node.dataset["readonly"] = String(!!value);
|
|
8930
8965
|
}
|
|
8931
8966
|
/**
|
|
8932
8967
|
* Visibility state mirror.
|
|
@@ -9124,8 +9159,10 @@ class SelectBox extends Lifecycle {
|
|
|
9124
9159
|
Refresher.resizeBox(select, container.tags.ViewPanel);
|
|
9125
9160
|
Refresher.resizeBox(select, this.node, true);
|
|
9126
9161
|
select.classList.add("init");
|
|
9127
|
-
// initial mask
|
|
9128
9162
|
const action = this.getAction();
|
|
9163
|
+
container.accessorybox.internalInstance = action;
|
|
9164
|
+
this.oldValue = action.value;
|
|
9165
|
+
// initial mask
|
|
9129
9166
|
action?.change?.(null, false);
|
|
9130
9167
|
if (this.options.preload) {
|
|
9131
9168
|
action?.load?.();
|
|
@@ -10739,7 +10776,7 @@ const SECLASS = new Selective();
|
|
|
10739
10776
|
*
|
|
10740
10777
|
* Declared as `const` literal type to enable strict typing and easy tree-shaking.
|
|
10741
10778
|
*/
|
|
10742
|
-
const version = "1.4.
|
|
10779
|
+
const version = "1.4.4";
|
|
10743
10780
|
/**
|
|
10744
10781
|
* Library name identifier.
|
|
10745
10782
|
*
|