eco-vue-js 0.7.0 → 0.7.2
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.
| @@ -1 +1 @@ | |
| 1 | 
            -
            {"version":3,"file":"WFilterWrapper.vue.d.ts","sourceRoot":"","sources":["../../../src/components/FilterWrapper/WFilterWrapper.vue"],"names":[],"mappings":" | 
| 1 | 
            +
            {"version":3,"file":"WFilterWrapper.vue.d.ts","sourceRoot":"","sources":["../../../src/components/FilterWrapper/WFilterWrapper.vue"],"names":[],"mappings":"AAwLA,iBAAS,cAAc;oBA2HK,GAAG;EAuB9B;AACD,QAAA,MAAM,eAAe;yBApNE,MAAM,EAAE;;;;yBAAR,MAAM,EAAE;;;UA2N7B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            import { defineComponent, ref, computed, watch, onUnmounted, openBlock, createElementBlock, Fragment, renderList, createBlock, resolveDynamicComponent, unref,  | 
| 1 | 
            +
            import { defineComponent, ref, computed, watch, onUnmounted, openBlock, createElementBlock, createElementVNode, Fragment, renderList, createBlock, resolveDynamicComponent, unref, renderSlot, createVNode, withCtx, createTextVNode } from 'vue';
         | 
| 2 2 | 
             
            import { useRoute, useRouter } from 'vue-router';
         | 
| 3 3 | 
             
            import _sfc_main$1 from '../Button/WButton.vue.js';
         | 
| 4 4 | 
             
            import { SemanticType } from '../../utils/SemanticType.js';
         | 
| @@ -6,9 +6,10 @@ import IconFilterRemove from '../../assets/icons/sax/IconFilterRemove.svg.js'; | |
| 6 6 | 
             
            import { Modal } from '../../utils/Modal.js';
         | 
| 7 7 | 
             
            import { throttle } from '../../utils/utils.js';
         | 
| 8 8 |  | 
| 9 | 
            -
            const _hoisted_1 = { class: " | 
| 10 | 
            -
            const _hoisted_2 = /* @__PURE__ */ createElementVNode("div", { class: "h- | 
| 11 | 
            -
            const _hoisted_3 = { class: " | 
| 9 | 
            +
            const _hoisted_1 = { class: "flex flex-col pb-16" };
         | 
| 10 | 
            +
            const _hoisted_2 = /* @__PURE__ */ createElementVNode("div", { class: "text-accent text-2xl font-semibold -h--header-height -mx--inner-margin flex items-center" }, " Filters ", -1);
         | 
| 11 | 
            +
            const _hoisted_3 = /* @__PURE__ */ createElementVNode("div", { class: "h-0.5 bg-gray-400 rounded my-8 -mx--inner-margin" }, null, -1);
         | 
| 12 | 
            +
            const _hoisted_4 = { class: "grid grid-cols-2 gap-4 -px--inner-margin" };
         | 
| 12 13 | 
             
            const _sfc_main = /* @__PURE__ */ defineComponent({
         | 
| 13 14 | 
             
              __name: "WFilterWrapper",
         | 
| 14 15 | 
             
              props: {
         | 
| @@ -56,16 +57,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ | |
| 56 57 | 
             
                });
         | 
| 57 58 | 
             
                return (_ctx, _cache) => {
         | 
| 58 59 | 
             
                  return openBlock(), createElementBlock("div", _hoisted_1, [
         | 
| 59 | 
            -
                    (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.$slots.default?.(), (slot, index) => {
         | 
| 60 | 
            -
                      return openBlock(), createBlock(resolveDynamicComponent(slot), {
         | 
| 61 | 
            -
                        key: index,
         | 
| 62 | 
            -
                        "is-open": index === selectedIndex.value,
         | 
| 63 | 
            -
                        onToggle: ($event) => unref(setSelectedIndex)(index),
         | 
| 64 | 
            -
                        "onUpdate:hasChanges": ($event) => hasChangesMap.value[index.toString()] = $event
         | 
| 65 | 
            -
                      }, null, 40, ["is-open", "onToggle", "onUpdate:hasChanges"]);
         | 
| 66 | 
            -
                    }), 128)),
         | 
| 67 60 | 
             
                    _hoisted_2,
         | 
| 68 | 
            -
                    createElementVNode("div",  | 
| 61 | 
            +
                    createElementVNode("div", null, [
         | 
| 62 | 
            +
                      (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.$slots.default?.(), (slot, index) => {
         | 
| 63 | 
            +
                        return openBlock(), createBlock(resolveDynamicComponent(slot), {
         | 
| 64 | 
            +
                          key: index,
         | 
| 65 | 
            +
                          "is-open": index === selectedIndex.value,
         | 
| 66 | 
            +
                          onToggle: ($event) => unref(setSelectedIndex)(index),
         | 
| 67 | 
            +
                          "onUpdate:hasChanges": ($event) => hasChangesMap.value[index.toString()] = $event
         | 
| 68 | 
            +
                        }, null, 40, ["is-open", "onToggle", "onUpdate:hasChanges"]);
         | 
| 69 | 
            +
                      }), 128))
         | 
| 70 | 
            +
                    ]),
         | 
| 71 | 
            +
                    _hoisted_3,
         | 
| 72 | 
            +
                    createElementVNode("div", _hoisted_4, [
         | 
| 69 73 | 
             
                      renderSlot(_ctx.$slots, "bottom"),
         | 
| 70 74 | 
             
                      createVNode(_sfc_main$1, {
         | 
| 71 75 | 
             
                        "semantic-type": unref(SemanticType).SECONDARY,
         | 
| @@ -1 +1 @@ | |
| 1 | 
            -
            {"version":3,"file":"useSelected.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/use/useSelected.ts"],"names":[],"mappings":"AAAA,OAAO, | 
| 1 | 
            +
            {"version":3,"file":"useSelected.d.ts","sourceRoot":"","sources":["../../../../src/components/InfiniteList/use/useSelected.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,GAAG,EAAC,MAAM,KAAK,CAAA;AA6BnE,eAAO,MAAM,WAAW,GAAI,KAAK,SACxB,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,cAClB,GAAG,CAAC,MAAM,CAAC,YACb,GAAG,CAAC,KAAK,EAAE,CAAC,WACb,GAAG,CAAC,OAAO,CAAC,iBACN,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,UAE5C,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,IAAI,iBACjB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,IAAI,eAC1B,CAAC,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,KAAK,IAAI;8BAqBjB,YAAY,CAAC,KAAK,CAAC;wBA4CzB,KAAK;+BAYE,KAAK,QAAQ,MAAM,SAAS,MAAM;2BAhBtC,YAAY,CAAC,KAAK,CAAC;;;+BAsCf,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI;yBAIhC,KAAK,SAAS,OAAO,KAAG,IAAI;;;CA4EzD,CAAA"}
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            import { ref, computed, unref } from 'vue';
         | 
| 1 | 
            +
            import { ref, computed, unref, onBeforeUnmount } from 'vue';
         | 
| 2 2 |  | 
| 3 3 | 
             
            const isRightOrder = (value) => {
         | 
| 4 4 | 
             
              return value[0].page < value[1].page || value[0].page === value[1].page && value[0].index <= value[1].index;
         | 
| @@ -22,6 +22,7 @@ const useSelected = (count, pageLength, selected, reverse, selectedRange, select | |
| 22 22 | 
             
              const isSelecting = ref(false);
         | 
| 23 23 | 
             
              const rangeCursor = ref(null);
         | 
| 24 24 | 
             
              const rangeHover = ref(null);
         | 
| 25 | 
            +
              const disabled = ref(false);
         | 
| 25 26 | 
             
              const allowSelectHover = computed(() => rangeCursor.value !== null && isSelecting.value);
         | 
| 26 27 | 
             
              const selectionRangeCount = computed(() => {
         | 
| 27 28 | 
             
                if (!selectedRange.value) return void 0;
         | 
| @@ -90,6 +91,7 @@ const useSelected = (count, pageLength, selected, reverse, selectedRange, select | |
| 90 91 | 
             
                rangeCursor.value = value;
         | 
| 91 92 | 
             
              };
         | 
| 92 93 | 
             
              const toggleSelected = (id, value) => {
         | 
| 94 | 
            +
                if (disabled.value) return;
         | 
| 93 95 | 
             
                if (reverse.value && count?.value === selected.value.length + 1) {
         | 
| 94 96 | 
             
                  select([]);
         | 
| 95 97 | 
             
                  cursorReset();
         | 
| @@ -129,6 +131,9 @@ const useSelected = (count, pageLength, selected, reverse, selectedRange, select | |
| 129 131 | 
             
                  return _count !== void 0 && selected.value.length >= _count ? true : selected.value.length ? null : false;
         | 
| 130 132 | 
             
                }
         | 
| 131 133 | 
             
              });
         | 
| 134 | 
            +
              onBeforeUnmount(() => {
         | 
| 135 | 
            +
                disabled.value = true;
         | 
| 136 | 
            +
              });
         | 
| 132 137 | 
             
              return {
         | 
| 133 138 | 
             
                setSelectedRange,
         | 
| 134 139 | 
             
                getIsSelected,
         |