selective-ui 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +7 -2
  3. package/dist/selective-ui.css +567 -567
  4. package/dist/selective-ui.css.map +1 -1
  5. package/dist/selective-ui.esm.js +6046 -6046
  6. package/dist/selective-ui.esm.js.map +1 -1
  7. package/dist/selective-ui.esm.min.js +1 -1
  8. package/dist/selective-ui.esm.min.js.br +0 -0
  9. package/dist/selective-ui.min.js +1 -1
  10. package/dist/selective-ui.min.js.br +0 -0
  11. package/dist/selective-ui.umd.js +6046 -6046
  12. package/dist/selective-ui.umd.js.map +1 -1
  13. package/package.json +68 -68
  14. package/src/css/components/accessorybox.css +63 -63
  15. package/src/css/components/directive.css +19 -19
  16. package/src/css/components/empty-state.css +25 -25
  17. package/src/css/components/loading-state.css +25 -25
  18. package/src/css/components/optgroup.css +61 -61
  19. package/src/css/components/option-handle.css +33 -33
  20. package/src/css/components/option.css +129 -129
  21. package/src/css/components/placeholder.css +14 -14
  22. package/src/css/components/popup.css +38 -38
  23. package/src/css/components/searchbox.css +28 -28
  24. package/src/css/components/selectbox.css +53 -53
  25. package/src/css/index.css +74 -74
  26. package/src/js/adapter/mixed-adapter.js +434 -434
  27. package/src/js/components/accessorybox.js +124 -124
  28. package/src/js/components/directive.js +37 -37
  29. package/src/js/components/empty-state.js +67 -67
  30. package/src/js/components/loading-state.js +59 -59
  31. package/src/js/components/option-handle.js +113 -113
  32. package/src/js/components/placeholder.js +56 -56
  33. package/src/js/components/popup.js +470 -470
  34. package/src/js/components/searchbox.js +167 -167
  35. package/src/js/components/selectbox.js +692 -692
  36. package/src/js/core/base/adapter.js +162 -162
  37. package/src/js/core/base/model.js +59 -59
  38. package/src/js/core/base/recyclerview.js +82 -82
  39. package/src/js/core/base/view.js +62 -62
  40. package/src/js/core/model-manager.js +286 -286
  41. package/src/js/core/search-controller.js +521 -521
  42. package/src/js/index.js +136 -136
  43. package/src/js/models/group-model.js +142 -142
  44. package/src/js/models/option-model.js +236 -236
  45. package/src/js/services/dataset-observer.js +73 -73
  46. package/src/js/services/ea-observer.js +87 -87
  47. package/src/js/services/effector.js +403 -403
  48. package/src/js/services/refresher.js +39 -39
  49. package/src/js/services/resize-observer.js +151 -151
  50. package/src/js/services/select-observer.js +60 -60
  51. package/src/js/types/adapter.type.js +32 -32
  52. package/src/js/types/effector.type.js +23 -23
  53. package/src/js/types/ievents.type.js +10 -10
  54. package/src/js/types/libs.type.js +27 -27
  55. package/src/js/types/model.type.js +11 -11
  56. package/src/js/types/recyclerview.type.js +11 -11
  57. package/src/js/types/resize-observer.type.js +18 -18
  58. package/src/js/types/view.group.type.js +12 -12
  59. package/src/js/types/view.option.type.js +14 -14
  60. package/src/js/types/view.type.js +10 -10
  61. package/src/js/utils/guard.js +46 -46
  62. package/src/js/utils/ievents.js +83 -83
  63. package/src/js/utils/istorage.js +60 -60
  64. package/src/js/utils/libs.js +618 -618
  65. package/src/js/utils/selective.js +385 -385
  66. package/src/js/views/group-view.js +102 -102
  67. package/src/js/views/option-view.js +152 -152
@@ -1,62 +1,62 @@
1
-
2
- /**
3
- * @template {Record<string, Element>} TTags
4
- * @implements {ViewContract<TTags>}
5
- */
6
- export class View {
7
- /** @type {Element|null} */
8
- parent = null;
9
-
10
- /**
11
- * Initializes the view with a parent container element that will host its rendered content.
12
- *
13
- * @param {Element} parent - The parent element into which this view will render.
14
- */
15
- constructor(parent) {
16
- this.parent = parent;
17
- }
18
-
19
- /**
20
- * Renders the view into the parent container.
21
- * Override in subclasses to create DOM structure and mount tags.
22
- */
23
- render() {}
24
-
25
- /**
26
- * Updates the view to reflect model or state changes.
27
- * Override in subclasses to patch DOM nodes without full re-render.
28
- */
29
- update() {}
30
-
31
- /** @type {MountViewResult<TTags>} */
32
- view = null;
33
-
34
- /**
35
- * Returns the root HTMLElement of the mounted view.
36
- *
37
- * @returns {HTMLElement} - The root view element.
38
- */
39
- getView() {
40
- return this.view.view;
41
- }
42
-
43
- /**
44
- * Retrieves a single tagged element from the mounted view.
45
- *
46
- * @template {keyof TTags} K
47
- * @param {K} tag - The tag key corresponding to the desired element.
48
- * @returns {TTags[K]} - The element associated with the provided tag key.
49
- */
50
- getTag(tag) {
51
- return this.view.tags[tag];
52
- }
53
-
54
- /**
55
- * Retrieves the full tag map for the mounted view.
56
- *
57
- * @returns {TTags} - An object map of all tagged elements.
58
- */
59
- getTags() {
60
- return this.view.tags;
61
- }
62
- }
1
+
2
+ /**
3
+ * @template {Record<string, Element>} TTags
4
+ * @implements {ViewContract<TTags>}
5
+ */
6
+ export class View {
7
+ /** @type {Element|null} */
8
+ parent = null;
9
+
10
+ /**
11
+ * Initializes the view with a parent container element that will host its rendered content.
12
+ *
13
+ * @param {Element} parent - The parent element into which this view will render.
14
+ */
15
+ constructor(parent) {
16
+ this.parent = parent;
17
+ }
18
+
19
+ /**
20
+ * Renders the view into the parent container.
21
+ * Override in subclasses to create DOM structure and mount tags.
22
+ */
23
+ render() {}
24
+
25
+ /**
26
+ * Updates the view to reflect model or state changes.
27
+ * Override in subclasses to patch DOM nodes without full re-render.
28
+ */
29
+ update() {}
30
+
31
+ /** @type {MountViewResult<TTags>} */
32
+ view = null;
33
+
34
+ /**
35
+ * Returns the root HTMLElement of the mounted view.
36
+ *
37
+ * @returns {HTMLElement} - The root view element.
38
+ */
39
+ getView() {
40
+ return this.view.view;
41
+ }
42
+
43
+ /**
44
+ * Retrieves a single tagged element from the mounted view.
45
+ *
46
+ * @template {keyof TTags} K
47
+ * @param {K} tag - The tag key corresponding to the desired element.
48
+ * @returns {TTags[K]} - The element associated with the provided tag key.
49
+ */
50
+ getTag(tag) {
51
+ return this.view.tags[tag];
52
+ }
53
+
54
+ /**
55
+ * Retrieves the full tag map for the mounted view.
56
+ *
57
+ * @returns {TTags} - An object map of all tagged elements.
58
+ */
59
+ getTags() {
60
+ return this.view.tags;
61
+ }
62
+ }