{"version":3,"file":"ListPaginate-CjM-d0RT.mjs","names":[],"sources":["../src/components/display/list/ListPaginate.vue","../src/components/display/list/ListPaginate.vue"],"sourcesContent":["<template>\n  <div :id=\"id\" class=\"d-flex flex-column align-items-center\">\n    <ClassicLoading\n      v-if=\"loading || errorText\"\n      :loading-text=\"loadingText\" :error-text=\"errorText\"\n    />\n    <template v-if=\"!loading\">\n      <div\n        v-if=\"!justSizeChosen\"\n        class=\"d-flex justify-content-between align-items-center flex-grow-1 w-100\"\n      >\n        <div class=\"text-secondary me-3\">\n          <template v-if=\"textCount\">\n            {{ textCount }}\n          </template>\n        </div>\n        <PaginateParams\n          v-if=\"!isPhone && !justSizeChosen && totalCount > 0\"\n          :id=\"id\"\n          :rows-per-page=\"rowsPerPage\"\n          @update:rows-per-page=\"changeSize\"\n        />\n      </div>\n    </template>\n    <slot name=\"list\" />\n    <PaginateSection\n      v-if=\"!isPhone && !justSizeChosen && totalCount > 0\"\n      :id=\"id\"\n      :style=\"pagingStyle\"\n      :first=\"first\"\n      :rows-per-page=\"rowsPerPage\"\n      :total-count=\"totalCount\"\n      :range-size=\"rangeSize\"\n      @update:first=\"changeFirst\"\n    />\n    <button\n      v-show=\"first + rowsPerPage < totalCount && (isPhone || justSizeChosen)\"\n      :disabled=\"loading\"\n      class=\"btn btn-primary align-self-center w-fit-content m-4\"\n      :title=\"t('See more')\"\n      @click=\"fetchMore\"\n    >\n      <template v-if=\"buttonPlus\">\n        {{ t(\"See more\") }}\n      </template>\n      <PlusIcon :size=\"16\" :class=\"buttonPlus ? 'ms-1' : ''\" />\n    </button>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\nimport PlusIcon from \"vue-material-design-icons/Plus.vue\";\nimport domHelper from \"../../../helper/domHelper\";\nimport ClassicLoading from \"../../form/ClassicLoading.vue\";\nimport { state } from \"../../../stores/ParamSdkStore\";\nimport PaginateParams from \"./PaginateParams.vue\";\nimport PaginateSection from \"./PaginateSection.vue\";\nimport {useResizePhone} from \"../../composable/useResizePhone\";\nimport { useRouteUpdateParams } from \"../../composable/route/useRouteUpdateParams\";\nimport { computed, watch } from \"vue\";\nimport { usePlayerStore } from \"../../../stores/PlayerStore\";\nimport { useI18n } from \"vue-i18n\";\n\n\n//Props \nconst props = defineProps({\n  first: { default: 0, type: Number },\n  rowsPerPage: { default: 30, type: Number },\n  totalCount: { default: 0, type: Number },\n  textCount: { default: undefined, type: String },\n  id: { default: \"\", type: String },\n  loadingText: { default: undefined, type: String },\n  errorText: { default: undefined, type: String },\n  loading: { default: false, type: Boolean },\n  isMobile: { default: false, type: Boolean },\n  justSizeChosen: { default: false, type: Boolean },\n  playerResponsive: { default: false, type: Boolean },\n  forceUpdateParameters: { default: false, type: Boolean },\n})\n\n//Emits\nconst emit = defineEmits([\"update:first\", \"update:rowsPerPage\", \"update:isMobile\"]);\n\n  \n//Composables\nconst { t } = useI18n();\nconst { isPhone, windowWidth } = useResizePhone();\nconst { updateRouteParam, updatePaginateSize } = useRouteUpdateParams();\nconst playerStore = usePlayerStore();\n\n\n//Computed\nconst buttonPlus = computed(() => state.generalParameters.buttonPlus);\nconst rangeSize = computed(() => {\n  if (windowWidth.value > 1600) {\n    return 3;\n  }\n  return windowWidth.value > 1530 ? 2 : 1;\n});\n\n\n//Watch\nwatch(isPhone, () => {emit(\"update:isMobile\", isPhone.value);}, {immediate: true});\nwatch(()=>props.first,  () => {\n  updateRouteParam({pr:(Math.floor(props.first / props.rowsPerPage) + 1).toString()}, props.forceUpdateParameters);\n});\n\n//Methods\nfunction fetchMore() {\n  emit(\"update:first\", props.first + props.rowsPerPage);\n}\nfunction changeFirst(firstValue: number) {\n  scrollToTop();\n  emit(\"update:first\", firstValue);\n}\nfunction changeSize(sizeValue: number) {\n  scrollToTop();\n  emit(\"update:rowsPerPage\", sizeValue);\n  updatePaginateSize(sizeValue, props.forceUpdateParameters);\n}\nfunction scrollToTop() {\n  const element = document.getElementById(props.id);\n  if (!element || element.getBoundingClientRect().top > 0) {\n    return;\n  }\n  const y =\n    element.getBoundingClientRect().top +\n    window.scrollY -\n    domHelper.convertRemToPixels(3.5);\n  window.scrollTo({ top: y, behavior: \"smooth\" });\n}\n\n/** Style to apply to the paging section */\nfunction pagingStyle(): Record<string, string> {\n  // Only change position if player is active and not at the top\n  if (props.playerResponsive && state.player.topPlacement !== true) {\n    return { 'bottom': playerStore.playerHeight };\n  }\n}\n</script>\n","<template>\n  <div :id=\"id\" class=\"d-flex flex-column align-items-center\">\n    <ClassicLoading\n      v-if=\"loading || errorText\"\n      :loading-text=\"loadingText\" :error-text=\"errorText\"\n    />\n    <template v-if=\"!loading\">\n      <div\n        v-if=\"!justSizeChosen\"\n        class=\"d-flex justify-content-between align-items-center flex-grow-1 w-100\"\n      >\n        <div class=\"text-secondary me-3\">\n          <template v-if=\"textCount\">\n            {{ textCount }}\n          </template>\n        </div>\n        <PaginateParams\n          v-if=\"!isPhone && !justSizeChosen && totalCount > 0\"\n          :id=\"id\"\n          :rows-per-page=\"rowsPerPage\"\n          @update:rows-per-page=\"changeSize\"\n        />\n      </div>\n    </template>\n    <slot name=\"list\" />\n    <PaginateSection\n      v-if=\"!isPhone && !justSizeChosen && totalCount > 0\"\n      :id=\"id\"\n      :style=\"pagingStyle\"\n      :first=\"first\"\n      :rows-per-page=\"rowsPerPage\"\n      :total-count=\"totalCount\"\n      :range-size=\"rangeSize\"\n      @update:first=\"changeFirst\"\n    />\n    <button\n      v-show=\"first + rowsPerPage < totalCount && (isPhone || justSizeChosen)\"\n      :disabled=\"loading\"\n      class=\"btn btn-primary align-self-center w-fit-content m-4\"\n      :title=\"t('See more')\"\n      @click=\"fetchMore\"\n    >\n      <template v-if=\"buttonPlus\">\n        {{ t(\"See more\") }}\n      </template>\n      <PlusIcon :size=\"16\" :class=\"buttonPlus ? 'ms-1' : ''\" />\n    </button>\n  </div>\n</template>\n\n<script setup lang=\"ts\">\nimport PlusIcon from \"vue-material-design-icons/Plus.vue\";\nimport domHelper from \"../../../helper/domHelper\";\nimport ClassicLoading from \"../../form/ClassicLoading.vue\";\nimport { state } from \"../../../stores/ParamSdkStore\";\nimport PaginateParams from \"./PaginateParams.vue\";\nimport PaginateSection from \"./PaginateSection.vue\";\nimport {useResizePhone} from \"../../composable/useResizePhone\";\nimport { useRouteUpdateParams } from \"../../composable/route/useRouteUpdateParams\";\nimport { computed, watch } from \"vue\";\nimport { usePlayerStore } from \"../../../stores/PlayerStore\";\nimport { useI18n } from \"vue-i18n\";\n\n\n//Props \nconst props = defineProps({\n  first: { default: 0, type: Number },\n  rowsPerPage: { default: 30, type: Number },\n  totalCount: { default: 0, type: Number },\n  textCount: { default: undefined, type: String },\n  id: { default: \"\", type: String },\n  loadingText: { default: undefined, type: String },\n  errorText: { default: undefined, type: String },\n  loading: { default: false, type: Boolean },\n  isMobile: { default: false, type: Boolean },\n  justSizeChosen: { default: false, type: Boolean },\n  playerResponsive: { default: false, type: Boolean },\n  forceUpdateParameters: { default: false, type: Boolean },\n})\n\n//Emits\nconst emit = defineEmits([\"update:first\", \"update:rowsPerPage\", \"update:isMobile\"]);\n\n  \n//Composables\nconst { t } = useI18n();\nconst { isPhone, windowWidth } = useResizePhone();\nconst { updateRouteParam, updatePaginateSize } = useRouteUpdateParams();\nconst playerStore = usePlayerStore();\n\n\n//Computed\nconst buttonPlus = computed(() => state.generalParameters.buttonPlus);\nconst rangeSize = computed(() => {\n  if (windowWidth.value > 1600) {\n    return 3;\n  }\n  return windowWidth.value > 1530 ? 2 : 1;\n});\n\n\n//Watch\nwatch(isPhone, () => {emit(\"update:isMobile\", isPhone.value);}, {immediate: true});\nwatch(()=>props.first,  () => {\n  updateRouteParam({pr:(Math.floor(props.first / props.rowsPerPage) + 1).toString()}, props.forceUpdateParameters);\n});\n\n//Methods\nfunction fetchMore() {\n  emit(\"update:first\", props.first + props.rowsPerPage);\n}\nfunction changeFirst(firstValue: number) {\n  scrollToTop();\n  emit(\"update:first\", firstValue);\n}\nfunction changeSize(sizeValue: number) {\n  scrollToTop();\n  emit(\"update:rowsPerPage\", sizeValue);\n  updatePaginateSize(sizeValue, props.forceUpdateParameters);\n}\nfunction scrollToTop() {\n  const element = document.getElementById(props.id);\n  if (!element || element.getBoundingClientRect().top > 0) {\n    return;\n  }\n  const y =\n    element.getBoundingClientRect().top +\n    window.scrollY -\n    domHelper.convertRemToPixels(3.5);\n  window.scrollTo({ top: y, behavior: \"smooth\" });\n}\n\n/** Style to apply to the paging section */\nfunction pagingStyle(): Record<string, string> {\n  // Only change position if player is active and not at the top\n  if (props.playerResponsive && state.player.topPlacement !== true) {\n    return { 'bottom': playerStore.playerHeight };\n  }\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEA,MAAM,QAAQ;EAgBd,MAAM,OAAO;EAIb,MAAM,EAAE,MAAM,QAAQ;EACtB,MAAM,EAAE,SAAS,gBAAgB,eAAe;EAChD,MAAM,EAAE,kBAAkB,uBAAuB,qBAAqB;EACtE,MAAM,cAAc,eAAe;EAInC,MAAM,aAAa,eAAe,MAAM,kBAAkB,UAAU;EACpE,MAAM,YAAY,eAAe;GAC/B,IAAI,YAAY,QAAQ,MACtB,OAAO;GAET,OAAO,YAAY,QAAQ,OAAO,IAAI;EACxC,CAAC;EAID,MAAM,eAAe;GAAC,KAAK,mBAAmB,QAAQ,KAAK;EAAE,GAAG,EAAC,WAAW,KAAI,CAAC;EACjF,YAAU,MAAM,aAAc;GAC5B,iBAAiB,EAAC,KAAI,KAAK,MAAM,MAAM,QAAQ,MAAM,WAAW,IAAI,GAAG,SAAS,EAAC,GAAG,MAAM,qBAAqB;EACjH,CAAC;EAGD,SAAS,YAAY;GACnB,KAAK,gBAAgB,MAAM,QAAQ,MAAM,WAAW;EACtD;EACA,SAAS,YAAY,YAAoB;GACvC,YAAY;GACZ,KAAK,gBAAgB,UAAU;EACjC;EACA,SAAS,WAAW,WAAmB;GACrC,YAAY;GACZ,KAAK,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