@paperless/core 1.42.5 → 1.43.0
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/CHANGELOG.md +17 -0
- package/dist/build/index.esm.js +1 -1
- package/dist/build/index.esm.js.map +1 -1
- package/dist/build/p-15f63841.js +2 -0
- package/dist/build/p-15f63841.js.map +1 -0
- package/dist/build/p-205dece4.entry.js +2 -0
- package/dist/build/p-205dece4.entry.js.map +1 -0
- package/dist/build/p-5aaf5bc2.entry.js +2 -0
- package/dist/build/p-5aaf5bc2.entry.js.map +1 -0
- package/dist/build/{p-1079ffc6.entry.js → p-e7826192.entry.js} +2 -2
- package/dist/build/p-e7826192.entry.js.map +1 -0
- package/dist/build/paperless.esm.js +1 -1
- package/dist/build/paperless.esm.js.map +1 -1
- package/dist/cjs/index-1fde8b14.js +4 -0
- package/dist/cjs/index.cjs.js +12 -52
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-floating-menu-container_8.cjs.entry.js +21 -8
- package/dist/cjs/p-floating-menu-container_8.cjs.entry.js.map +1 -1
- package/dist/cjs/p-table-row-action.cjs.entry.js +26 -0
- package/dist/cjs/p-table-row-action.cjs.entry.js.map +1 -0
- package/dist/cjs/p-table.cjs.entry.js +100 -38
- package/dist/cjs/p-table.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/cjs/screens-84f01214.js +56 -0
- package/dist/cjs/screens-84f01214.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.css +1 -1
- package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.js +19 -0
- package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.js.map +1 -1
- package/dist/collection/components/helpers/table-row-action/table-row-action.component.js +182 -0
- package/dist/collection/components/helpers/table-row-action/table-row-action.component.js.map +1 -0
- package/dist/collection/components/molecules/table-cell/table-cell.component.css +1 -1
- package/dist/collection/components/molecules/table-cell/table-cell.component.js +37 -7
- package/dist/collection/components/molecules/table-cell/table-cell.component.js.map +1 -1
- package/dist/collection/components/molecules/table-row/table-row.component.js +1 -1
- package/dist/collection/components/molecules/table-row/table-row.component.js.map +1 -1
- package/dist/collection/components/organisms/table/table.component.css +1 -1
- package/dist/collection/components/organisms/table/table.component.js +115 -38
- package/dist/collection/components/organisms/table/table.component.js.map +1 -1
- package/dist/components/floating-menu-item.component.js +4 -2
- package/dist/components/floating-menu-item.component.js.map +1 -1
- package/dist/components/index.js +3 -42
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-table-row-action.d.ts +11 -0
- package/dist/components/p-table-row-action.js +48 -0
- package/dist/components/p-table-row-action.js.map +1 -0
- package/dist/components/p-table.js +110 -41
- package/dist/components/p-table.js.map +1 -1
- package/dist/components/screens.js +44 -0
- package/dist/components/screens.js.map +1 -0
- package/dist/components/table-cell.component.js +19 -6
- package/dist/components/table-cell.component.js.map +1 -1
- package/dist/components/table-row.component.js +1 -1
- package/dist/components/table-row.component.js.map +1 -1
- package/dist/esm/index-7b917f6b.js +4 -0
- package/dist/esm/index.js +3 -42
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-floating-menu-container_8.entry.js +21 -8
- package/dist/esm/p-floating-menu-container_8.entry.js.map +1 -1
- package/dist/esm/p-table-row-action.entry.js +22 -0
- package/dist/esm/p-table-row-action.entry.js.map +1 -0
- package/dist/esm/p-table.entry.js +100 -38
- package/dist/esm/p-table.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/esm/screens-64bd8af0.js +44 -0
- package/dist/esm/screens-64bd8af0.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/paperless/index.esm.js +1 -1
- package/dist/paperless/index.esm.js.map +1 -1
- package/dist/paperless/p-15f63841.js +2 -0
- package/dist/paperless/p-15f63841.js.map +1 -0
- package/dist/paperless/p-205dece4.entry.js +2 -0
- package/dist/paperless/p-205dece4.entry.js.map +1 -0
- package/dist/paperless/p-5aaf5bc2.entry.js +2 -0
- package/dist/paperless/p-5aaf5bc2.entry.js.map +1 -0
- package/dist/paperless/{p-1079ffc6.entry.js → p-e7826192.entry.js} +2 -2
- package/dist/paperless/p-e7826192.entry.js.map +1 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/paperless/paperless.esm.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/atoms/floating-menu-item/floating-menu-item.component.d.ts +4 -0
- package/dist/types/components/helpers/table-row-action/table-row-action.component.d.ts +43 -0
- package/dist/types/components/molecules/table-cell/table-cell.component.d.ts +6 -1
- package/dist/types/components/organisms/table/table.component.d.ts +6 -1
- package/dist/types/components.d.ts +99 -4
- package/hydrate/index.js +197 -50
- package/package.json +1 -1
- package/dist/build/p-1079ffc6.entry.js.map +0 -1
- package/dist/build/p-a9ebacc8.entry.js +0 -2
- package/dist/build/p-a9ebacc8.entry.js.map +0 -1
- package/dist/paperless/p-1079ffc6.entry.js.map +0 -1
- package/dist/paperless/p-a9ebacc8.entry.js +0 -2
- package/dist/paperless/p-a9ebacc8.entry.js.map +0 -1
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy(JSON.parse("[[\"p-button_3.cjs\",[[4,\"p-button\",{\"variant\":[1],\"underline\":[4],\"href\":[1],\"target\":[1],\"size\":[1],\"type\":[1],\"loading\":[4],\"chevron\":[8],\"chevronPosition\":[1,\"chevron-position\"],\"disabled\":[4],\"icon\":[1],\"iconOnly\":[4,\"icon-only\"],\"iconPosition\":[1,\"icon-position\"],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"inheritText\":[4,\"inherit-text\"]},[[2,\"click\",\"handleClick\"]]],[1,\"p-loader\",{\"show\":[4],\"variant\":[1],\"color\":[1],\"modalTitle\":[1,\"modal-title\"],\"modalDescription\":[1,\"modal-description\"]}],[0,\"p-icon\",{\"variant\":[1],\"size\":[1],\"rotate\":[2],\"flip\":[1]}]]],[\"p-table.cjs\",[[4,\"p-table\",{\"items\":[1],\"loading\":[4],\"headerLoading\":[4,\"header-loading\"],\"footerLoading\":[4,\"footer-loading\"],\"amountOfLoadingRows\":[2,\"amount-of-loading-rows\"],\"enableRowSelection\":[4,\"enable-row-selection\"],\"rowSelectionLimit\":[2,\"row-selection-limit\"],\"enableRowClick\":[4,\"enable-row-click\"],\"selectedRows\":[16],\"enableFloatingMenu\":[4,\"enable-floating-menu\"],\"floatingMenuAmountSelectedTemplate\":[16],\"selectionKey\":[1,\"selection-key\"],\"canSelectKey\":[1,\"can-select-key\"],\"enableHeader\":[4,\"enable-header\"],\"quickFilters\":[16],\"activeQuickFilterIdentifier\":[1,\"active-quick-filter-identifier\"],\"enableSearch\":[4,\"enable-search\"],\"query\":[1025],\"enableFilter\":[4,\"enable-filter\"],\"selectedFiltersAmount\":[2,\"selected-filters-amount\"],\"filterButtonTemplate\":[16],\"enableAction\":[4,\"enable-action\"],\"actionButtonLoading\":[4,\"action-button-loading\"],\"actionButtonEnabled\":[4,\"action-button-enabled\"],\"actionButtonIcon\":[1,\"action-button-icon\"],\"actionButtonText\":[1,\"action-button-text\"],\"actionButtonTemplate\":[16],\"enableFooter\":[4,\"enable-footer\"],\"enablePageSize\":[4,\"enable-page-size\"],\"enablePagination\":[4,\"enable-pagination\"],\"enableExport\":[4,\"enable-export\"],\"page\":[1538],\"total\":[2],\"pageSize\":[2,\"page-size\"],\"pageSizeOptions\":[16],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"emptyStateHeader\":[16],\"emptyStateContent\":[16],\"emptyStateAction\":[16],\"enableEmptyStateAction\":[4,\"enable-empty-state-action\"],\"emptyStateFilteredHeader\":[16],\"emptyStateFilteredContent\":[16],\"shadow\":[4],\"_locales\":[32],\"_columns\":[32],\"_items\":[32]},[[16,\"localeChanged\",\"_setLocales\"],[16,\"tableDefinitionChanged\",\"onTableDefinitionUpdated\"],[4,\"keydown\",\"keyDown\"],[4,\"keyup\",\"keyUp\"],[4,\"visibilitychange\",\"visibilityChange\"]],{\"items\":[\"_parseItems\"]}]]],[\"p-select.cjs\",[[0,\"p-select\",{\"items\":[1],\"multi\":[516],\"icon\":[1],\"query\":[1],\"placeholder\":[1],\"autocompletePlaceholder\":[1,\"autocomplete-placeholder\"],\"value\":[8],\"displayKey\":[1,\"display-key\"],\"dropdownDisplayKey\":[1,\"dropdown-display-key\"],\"selectionDisplayKey\":[1,\"selection-display-key\"],\"valueKey\":[1,\"value-key\"],\"avatarKey\":[1,\"avatar-key\"],\"avatarLettersKey\":[1,\"avatar-letters-key\"],\"identifierKey\":[1,\"identifier-key\"],\"queryKey\":[1,\"query-key\"],\"autoSelectFirst\":[4,\"auto-select-first\"],\"showChevron\":[4,\"show-chevron\"],\"maxDisplayedItems\":[2,\"max-displayed-items\"],\"enableAutocomplete\":[4,\"enable-autocomplete\"],\"asyncFilter\":[4,\"async-filter\"],\"loading\":[4],\"enableSelectAll\":[4,\"enable-select-all\"],\"selectAllText\":[1,\"select-all-text\"],\"selectAllIcon\":[1,\"select-all-icon\"],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"showAddItem\":[4,\"show-add-item\"],\"addItemText\":[1,\"add-item-text\"],\"emptyStateText\":[1,\"empty-state-text\"],\"_showDropdown\":[32],\"_selectedItem\":[32],\"_allSelected\":[32],\"_amountHidden\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"_valueChange\"],\"items\":[\"itemChanges\"],\"_showDropdown\":[\"_showDropdownChanges\"],\"multi\":[\"multiChanges\"]}]]],[\"p-modal.cjs\",[[1,\"p-modal\",{\"size\":[1],\"variant\":[1],\"header\":[1],\"show\":[4],\"applyBlur\":[4,\"apply-blur\"],\"showClose\":[4,\"show-close\"],\"showMobileFooter\":[4,\"show-mobile-footer\"],\"backdropClickClose\":[4,\"backdrop-click-close\"],\"scrollLock\":[4,\"scroll-lock\"],\"padding\":[4],\"_closing\":[32]},[[8,\"closeModal\",\"handleCloseModal\"]]]]],[\"p-datepicker.cjs\",[[0,\"p-datepicker\",{\"placeholder\":[1],\"value\":[1],\"preselectToday\":[4,\"preselect-today\"],\"disabledDates\":[1,\"disabled-dates\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"disableWeekends\":[4,\"disable-weekends\"],\"mode\":[1],\"format\":[1],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"_showDropdown\":[32],\"_value\":[32],\"_minDate\":[32],\"_maxDate\":[32],\"_disabledDates\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"parseValue\"],\"minDate\":[\"parseMinDate\"],\"maxDate\":[\"parseMaxDate\"],\"disabledDates\":[\"parseDisabledDates\"]}]]],[\"p-drawer.cjs\",[[1,\"p-drawer\",{\"header\":[1],\"show\":[4],\"applyBlur\":[4,\"apply-blur\"],\"showClose\":[4,\"show-close\"],\"backdropClickClose\":[4,\"backdrop-click-close\"],\"canClose\":[4,\"can-close\"],\"scrollLock\":[4,\"scroll-lock\"],\"_closing\":[32]},[[8,\"closeDrawer\",\"handleCloseDrawer\"],[8,\"forceCloseDrawer\",\"handleForceCloseDrawer\"]]]]],[\"p-attachment.cjs\",[[1,\"p-attachment\",{\"mode\":[1],\"loading\":[4],\"error\":[1],\"downloading\":[4]}]]],[\"p-navbar.cjs\",[[1,\"p-navbar\",{\"closeText\":[1,\"close-text\"],\"menuText\":[1,\"menu-text\"],\"_showMenu\":[32]},[[8,\"closeNavbar\",\"handleCloseNavbar\"],[8,\"openNavbar\",\"handleOpenNavbar\"]]]]],[\"p-profile.cjs\",[[1,\"p-profile\",{\"variant\":[1],\"size\":[513],\"_dropdownOpen\":[32]}]]],[\"p-toast.cjs\",[[1,\"p-toast\",{\"variant\":[1],\"header\":[1],\"content\":[1],\"enableAction\":[4,\"enable-action\"],\"actionIcon\":[1,\"action-icon\"],\"actionIconFlip\":[1,\"action-icon-flip\"],\"actionIconRotate\":[2,\"action-icon-rotate\"]}]]],[\"p-divider.cjs\",[[1,\"p-divider\",{\"variant\":[513]}]]],[\"p-accordion.cjs\",[[1,\"p-accordion\",{\"header\":[1],\"open\":[4],\"closeable\":[4],\"openable\":[4]}]]],[\"p-navigation-item.cjs\",[[1,\"p-navigation-item\",{\"active\":[4],\"icon\":[1],\"counter\":[8],\"href\":[1],\"target\":[1]}]]],[\"p-card-header.cjs\",[[4,\"p-card-header\",{\"header\":[1],\"arrow\":[4]}]]],[\"p-content-slider.cjs\",[[1,\"p-content-slider\",{\"hideMobileIndicator\":[4,\"hide-mobile-indicator\"],\"disableDrag\":[4,\"disable-drag\"],\"disableAutoCenter\":[4,\"disable-auto-center\"],\"disableIndicatorClick\":[4,\"disable-indicator-click\"],\"_visibleIndex\":[32],\"_outerHeight\":[32],\"_totalWidth\":[32],\"_dragging\":[32]},[[9,\"mouseup\",\"mouseUpHandler\"],[9,\"touchend\",\"mouseUpHandler\"],[9,\"resize\",\"resizeHandler\"]]]]],[\"p-cropper.cjs\",[[1,\"p-cropper\",{\"variant\":[513],\"value\":[8],\"returnType\":[1,\"return-type\"],\"_loaded\":[32],\"_currentScale\":[32]},[[9,\"resize\",\"onResize\"]]]]],[\"p-info-panel.cjs\",[[1,\"p-info-panel\",{\"variant\":[1],\"header\":[1],\"content\":[1],\"closeable\":[4]}]]],[\"p-status.cjs\",[[4,\"p-status\",{\"variant\":[1],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"]}]]],[\"p-stepper-line.cjs\",[[1,\"p-stepper-line\",{\"active\":[516],\"direction\":[513]}]]],[\"p-stepper.cjs\",[[1,\"p-stepper\",{\"activeStep\":[2,\"active-step\"],\"direction\":[513],\"contentPosition\":[513,\"content-position\"],\"_rendering\":[32]},null,{\"activeStep\":[\"_onActiveStepChange\"]}]]],[\"p-stepper-item.cjs\",[[1,\"p-stepper-item\",{\"align\":[513],\"direction\":[513],\"contentPosition\":[513,\"content-position\"],\"finished\":[516],\"active\":[516]}]]],[\"p-tab-group.cjs\",[[1,\"p-tab-group\"]]],[\"p-avatar-group.cjs\",[[4,\"p-avatar-group\",{\"extra\":[2]}]]],[\"p-card-body.cjs\",[[4,\"p-card-body\",{\"inheritText\":[516,\"inherit-text\"]}]]],[\"p-card-container.cjs\",[[1,\"p-card-container\",{\"hoverable\":[516],\"shadow\":[516]}]]],[\"p-layout.cjs\",[[1,\"p-layout\",{\"variant\":[1]}]]],[\"p-tab-item.cjs\",[[1,\"p-tab-item\",{\"active\":[4]}]]],[\"p-table-column.cjs\",[[0,\"p-table-column\",{\"path\":[1537],\"type\":[1537],\"name\":[1537],\"useSlot\":[1540,\"use-slot\"],\"hasCheckbox\":[1540,\"has-checkbox\"],\"align\":[1537],\"isLast\":[1540,\"is-last\"],\"sizes\":[1032]}]]],[\"p-toast-container.cjs\",[[1,\"p-toast-container\",{\"placement\":[1]}]]],[\"p-calendar.cjs\",[[1,\"p-calendar\",{\"variant\":[1],\"value\":[1],\"preselectToday\":[4,\"preselect-today\"],\"disabledDates\":[1,\"disabled-dates\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"disableWeekends\":[4,\"disable-weekends\"],\"mode\":[1],\"_view\":[32],\"_viewDate\":[32],\"_value\":[32],\"_minDate\":[32],\"_maxDate\":[32],\"_disabledDates\":[32]},null,{\"value\":[\"_parseValue\"],\"minDate\":[\"_parseMinDate\"],\"maxDate\":[\"_parseMaxDate\"],\"disabledDates\":[\"_parseDisabledDates\"]}]]],[\"p-avatar.cjs\",[[0,\"p-avatar\",{\"variant\":[513],\"size\":[513],\"defaultImage\":[1,\"default-image\"],\"src\":[1],\"letters\":[1],\"_src\":[32],\"_failed\":[32]},null,{\"src\":[\"onSrchChange\"]}]]],[\"p-counter.cjs\",[[1,\"p-counter\",{\"variant\":[1],\"size\":[1]}]]],[\"p-slider-indicator.cjs\",[[1,\"p-slider-indicator\",{\"active\":[4]}]]],[\"p-drawer-body_3.cjs\",[[1,\"p-drawer-header\",{\"showClose\":[4,\"show-close\"]}],[1,\"p-drawer-body\",{\"variant\":[1]}],[4,\"p-drawer-container\",{\"closing\":[4]}]]],[\"p-backdrop.cjs\",[[1,\"p-backdrop\",{\"variant\":[1],\"applyBlur\":[4,\"apply-blur\"],\"closing\":[4],\"scrollLock\":[4,\"scroll-lock\"]},[[2,\"click\",\"handleClick\"]]]]],[\"p-modal-body_4.cjs\",[[1,\"p-modal-header\",{\"showClose\":[4,\"show-close\"]}],[1,\"p-modal-footer\"],[1,\"p-modal-body\",{\"variant\":[1],\"rounded\":[4],\"padding\":[4]}],[4,\"p-modal-container\",{\"size\":[1],\"closing\":[4]}]]],[\"p-label_3.cjs\",[[1,\"p-label\",{\"variant\":[513],\"behavior\":[513],\"iconPosition\":[1,\"icon-position\"],\"icon\":[513],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"size\":[513],\"keepMobileContent\":[516,\"keep-mobile-content\"]}],[1,\"p-segment-item\",{\"active\":[4],\"iconOnly\":[4,\"icon-only\"],\"size\":[513],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"]}],[4,\"p-segment-container\"]]],[\"p-dropdown-menu-container.cjs\",[[4,\"p-dropdown-menu-container\",{\"maxWidth\":[4,\"max-width\"],\"fullWidth\":[4,\"full-width\"],\"scrollable\":[8]}]]],[\"p-dropdown_2.cjs\",[[1,\"p-dropdown-menu-item\",{\"active\":[4],\"variant\":[1],\"enableHover\":[4,\"enable-hover\"],\"icon\":[1]}],[1,\"p-dropdown\",{\"placement\":[513],\"offset\":[2],\"strategy\":[1],\"show\":[4],\"calculateWidth\":[4,\"calculate-width\"],\"applyMaxWidth\":[4,\"apply-max-width\"],\"applyFullWidth\":[4,\"apply-full-width\"],\"scrollable\":[8],\"insideClick\":[4,\"inside-click\"],\"disableTriggerClick\":[4,\"disable-trigger-click\"],\"applyChevron\":[4,\"apply-chevron\"],\"chevronPosition\":[1,\"chevron-position\"],\"chevronDirection\":[1,\"chevron-direction\"]},[[6,\"click\",\"documentClickHandler\"]],{\"show\":[\"onShowChange\"]}]]],[\"p-page-size-select_3.cjs\",[[1,\"p-page-size-select\",{\"size\":[1538],\"sizeOptions\":[16],\"chevronPosition\":[1,\"chevron-position\"],\"buttonSize\":[1,\"button-size\"],\"buttonTemplate\":[16],\"itemTemplate\":[16],\"hidden\":[4],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[0,\"p-pagination\",{\"page\":[1538],\"pageSize\":[2,\"page-size\"],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"total\":[2]},null,{\"page\":[\"pageChangeHandler\"],\"pageSize\":[\"pageChangeHandler\"],\"total\":[\"pageChangeHandler\"]}],[1,\"p-pagination-item\",{\"active\":[4]}]]],[\"p-tooltip.cjs\",[[1,\"p-tooltip\",{\"variant\":[1],\"content\":[8],\"placement\":[1],\"offset\":[2],\"strategy\":[1],\"enableUserInput\":[4,\"enable-user-input\"],\"show\":[4],\"canManuallyClose\":[4,\"can-manually-close\"]},[[2,\"click\",\"clickHandler\"],[6,\"click\",\"documentClickHandler\"],[1,\"mouseenter\",\"mouseEnterHandler\"],[0,\"focus\",\"mouseEnterHandler\"],[1,\"mouseleave\",\"mouseLeaveHandler\"],[0,\"blur\",\"mouseLeaveHandler\"]],{\"show\":[\"onShowChange\"]}]]],[\"p-helper_3.cjs\",[[1,\"p-input-group\",{\"size\":[1],\"prefix\":[1],\"suffix\":[1],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"iconPosition\":[1,\"icon-position\"],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"focused\":[516],\"forceShowTooltip\":[516,\"force-show-tooltip\"],\"focusMethod\":[1,\"focus-method\"],\"errorVariant\":[1,\"error-variant\"],\"_forceShowTooltip\":[32]},[[0,\"focusin\",\"handleFocusIn\"],[0,\"focusout\",\"handleFocusOut\"]]],[1,\"p-helper\",{\"placement\":[1]}],[1,\"p-input-error\",{\"error\":[1],\"forceShowTooltip\":[4,\"force-show-tooltip\"],\"_showTooltip\":[32]}]]],[\"p-floating-menu-container_8.cjs\",[[1,\"p-table-header\",{\"quickFilters\":[16],\"activeQuickFilterIdentifier\":[1,\"active-quick-filter-identifier\"],\"loading\":[4],\"enableSearch\":[4,\"enable-search\"],\"itemsSelectedAmount\":[2,\"items-selected-amount\"],\"query\":[1025],\"enableFilter\":[4,\"enable-filter\"],\"selectedFiltersAmount\":[2,\"selected-filters-amount\"],\"filterButtonTemplate\":[16],\"enableAction\":[4,\"enable-action\"],\"actionLoading\":[4,\"action-loading\"],\"actionIcon\":[1,\"action-icon\"],\"actionText\":[1,\"action-text\"],\"canUseAction\":[1028,\"can-use-action\"],\"actionButtonTemplate\":[16],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[1,\"p-table-footer\",{\"enablePageSize\":[4,\"enable-page-size\"],\"enablePagination\":[4,\"enable-pagination\"],\"enableExport\":[4,\"enable-export\"],\"loading\":[4],\"page\":[1538],\"total\":[2],\"pageSize\":[2,\"page-size\"],\"pageSizeOptions\":[16],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[4,\"p-table-cell\",{\"variant\":[1],\"index\":[2],\"rowIndex\":[2,\"row-index\"],\"definition\":[16],\"item\":[8],\"value\":[8],\"checkbox\":[8],\"template\":[16]}],[1,\"p-table-row\",{\"variant\":[1],\"enableHover\":[4,\"enable-hover\"]}],[1,\"p-floating-menu-container\",{\"usedInTable\":[4,\"used-in-table\"]}],[1,\"p-floating-menu-item\",{\"hover\":[516]}],[0,\"p-illustration\",{\"variant\":[1]}],[1,\"p-table-container\",{\"shadow\":[4]}]]]]"), options);
|
|
20
|
+
return index.bootstrapLazy(JSON.parse("[[\"p-button_3.cjs\",[[4,\"p-button\",{\"variant\":[1],\"underline\":[4],\"href\":[1],\"target\":[1],\"size\":[1],\"type\":[1],\"loading\":[4],\"chevron\":[8],\"chevronPosition\":[1,\"chevron-position\"],\"disabled\":[4],\"icon\":[1],\"iconOnly\":[4,\"icon-only\"],\"iconPosition\":[1,\"icon-position\"],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"inheritText\":[4,\"inherit-text\"]},[[2,\"click\",\"handleClick\"]]],[1,\"p-loader\",{\"show\":[4],\"variant\":[1],\"color\":[1],\"modalTitle\":[1,\"modal-title\"],\"modalDescription\":[1,\"modal-description\"]}],[0,\"p-icon\",{\"variant\":[1],\"size\":[1],\"rotate\":[2],\"flip\":[1]}]]],[\"p-table.cjs\",[[4,\"p-table\",{\"items\":[1],\"loading\":[4],\"headerLoading\":[4,\"header-loading\"],\"footerLoading\":[4,\"footer-loading\"],\"amountOfLoadingRows\":[2,\"amount-of-loading-rows\"],\"enableRowSelection\":[4,\"enable-row-selection\"],\"rowSelectionLimit\":[2,\"row-selection-limit\"],\"enableRowClick\":[4,\"enable-row-click\"],\"selectedRows\":[16],\"enableFloatingMenu\":[4,\"enable-floating-menu\"],\"floatingMenuAmountSelectedTemplate\":[16],\"selectionKey\":[1,\"selection-key\"],\"canSelectKey\":[1,\"can-select-key\"],\"enableHeader\":[4,\"enable-header\"],\"quickFilters\":[16],\"activeQuickFilterIdentifier\":[1,\"active-quick-filter-identifier\"],\"enableSearch\":[4,\"enable-search\"],\"query\":[1025],\"enableFilter\":[4,\"enable-filter\"],\"selectedFiltersAmount\":[2,\"selected-filters-amount\"],\"filterButtonTemplate\":[16],\"enableAction\":[4,\"enable-action\"],\"actionButtonLoading\":[4,\"action-button-loading\"],\"actionButtonEnabled\":[4,\"action-button-enabled\"],\"actionButtonIcon\":[1,\"action-button-icon\"],\"actionButtonText\":[1,\"action-button-text\"],\"actionButtonTemplate\":[16],\"enableFooter\":[4,\"enable-footer\"],\"enablePageSize\":[4,\"enable-page-size\"],\"enablePagination\":[4,\"enable-pagination\"],\"enableExport\":[4,\"enable-export\"],\"page\":[1538],\"total\":[2],\"pageSize\":[2,\"page-size\"],\"pageSizeOptions\":[16],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"emptyStateHeader\":[16],\"emptyStateContent\":[16],\"emptyStateAction\":[16],\"enableEmptyStateAction\":[4,\"enable-empty-state-action\"],\"emptyStateFilteredHeader\":[16],\"emptyStateFilteredContent\":[16],\"shadow\":[4],\"_locales\":[32],\"_columns\":[32],\"_items\":[32],\"_enableRowSelection\":[32],\"_rowSelectionLimit\":[32],\"_rowActionsFloating\":[32],\"_rowActionsRow\":[32]},[[16,\"localeChanged\",\"_setLocales\"],[16,\"tableDefinitionChanged\",\"onTableDefinitionUpdated\"],[4,\"keydown\",\"keyDown\"],[4,\"keyup\",\"keyUp\"],[4,\"visibilitychange\",\"visibilityChange\"],[9,\"resize\",\"_setRowSelectionData\"]],{\"items\":[\"_parseItems\"],\"enableRowSelection\":[\"_setRowSelectionData\"],\"rowSelectionLimit\":[\"_setRowSelectionData\"],\"selectedRows\":[\"_setRowSelectionData\"]}]]],[\"p-select.cjs\",[[0,\"p-select\",{\"items\":[1],\"multi\":[516],\"icon\":[1],\"query\":[1],\"placeholder\":[1],\"autocompletePlaceholder\":[1,\"autocomplete-placeholder\"],\"value\":[8],\"displayKey\":[1,\"display-key\"],\"dropdownDisplayKey\":[1,\"dropdown-display-key\"],\"selectionDisplayKey\":[1,\"selection-display-key\"],\"valueKey\":[1,\"value-key\"],\"avatarKey\":[1,\"avatar-key\"],\"avatarLettersKey\":[1,\"avatar-letters-key\"],\"identifierKey\":[1,\"identifier-key\"],\"queryKey\":[1,\"query-key\"],\"autoSelectFirst\":[4,\"auto-select-first\"],\"showChevron\":[4,\"show-chevron\"],\"maxDisplayedItems\":[2,\"max-displayed-items\"],\"enableAutocomplete\":[4,\"enable-autocomplete\"],\"asyncFilter\":[4,\"async-filter\"],\"loading\":[4],\"enableSelectAll\":[4,\"enable-select-all\"],\"selectAllText\":[1,\"select-all-text\"],\"selectAllIcon\":[1,\"select-all-icon\"],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"showAddItem\":[4,\"show-add-item\"],\"addItemText\":[1,\"add-item-text\"],\"emptyStateText\":[1,\"empty-state-text\"],\"_showDropdown\":[32],\"_selectedItem\":[32],\"_allSelected\":[32],\"_amountHidden\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"_valueChange\"],\"items\":[\"itemChanges\"],\"_showDropdown\":[\"_showDropdownChanges\"],\"multi\":[\"multiChanges\"]}]]],[\"p-modal.cjs\",[[1,\"p-modal\",{\"size\":[1],\"variant\":[1],\"header\":[1],\"show\":[4],\"applyBlur\":[4,\"apply-blur\"],\"showClose\":[4,\"show-close\"],\"showMobileFooter\":[4,\"show-mobile-footer\"],\"backdropClickClose\":[4,\"backdrop-click-close\"],\"scrollLock\":[4,\"scroll-lock\"],\"padding\":[4],\"_closing\":[32]},[[8,\"closeModal\",\"handleCloseModal\"]]]]],[\"p-datepicker.cjs\",[[0,\"p-datepicker\",{\"placeholder\":[1],\"value\":[1],\"preselectToday\":[4,\"preselect-today\"],\"disabledDates\":[1,\"disabled-dates\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"disableWeekends\":[4,\"disable-weekends\"],\"mode\":[1],\"format\":[1],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"_showDropdown\":[32],\"_value\":[32],\"_minDate\":[32],\"_maxDate\":[32],\"_disabledDates\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"parseValue\"],\"minDate\":[\"parseMinDate\"],\"maxDate\":[\"parseMaxDate\"],\"disabledDates\":[\"parseDisabledDates\"]}]]],[\"p-drawer.cjs\",[[1,\"p-drawer\",{\"header\":[1],\"show\":[4],\"applyBlur\":[4,\"apply-blur\"],\"showClose\":[4,\"show-close\"],\"backdropClickClose\":[4,\"backdrop-click-close\"],\"canClose\":[4,\"can-close\"],\"scrollLock\":[4,\"scroll-lock\"],\"_closing\":[32]},[[8,\"closeDrawer\",\"handleCloseDrawer\"],[8,\"forceCloseDrawer\",\"handleForceCloseDrawer\"]]]]],[\"p-attachment.cjs\",[[1,\"p-attachment\",{\"mode\":[1],\"loading\":[4],\"error\":[1],\"downloading\":[4]}]]],[\"p-navbar.cjs\",[[1,\"p-navbar\",{\"closeText\":[1,\"close-text\"],\"menuText\":[1,\"menu-text\"],\"_showMenu\":[32]},[[8,\"closeNavbar\",\"handleCloseNavbar\"],[8,\"openNavbar\",\"handleOpenNavbar\"]]]]],[\"p-profile.cjs\",[[1,\"p-profile\",{\"variant\":[1],\"size\":[513],\"_dropdownOpen\":[32]}]]],[\"p-toast.cjs\",[[1,\"p-toast\",{\"variant\":[1],\"header\":[1],\"content\":[1],\"enableAction\":[4,\"enable-action\"],\"actionIcon\":[1,\"action-icon\"],\"actionIconFlip\":[1,\"action-icon-flip\"],\"actionIconRotate\":[2,\"action-icon-rotate\"]}]]],[\"p-divider.cjs\",[[1,\"p-divider\",{\"variant\":[513]}]]],[\"p-accordion.cjs\",[[1,\"p-accordion\",{\"header\":[1],\"open\":[4],\"closeable\":[4],\"openable\":[4]}]]],[\"p-navigation-item.cjs\",[[1,\"p-navigation-item\",{\"active\":[4],\"icon\":[1],\"counter\":[8],\"href\":[1],\"target\":[1]}]]],[\"p-card-header.cjs\",[[4,\"p-card-header\",{\"header\":[1],\"arrow\":[4]}]]],[\"p-content-slider.cjs\",[[1,\"p-content-slider\",{\"hideMobileIndicator\":[4,\"hide-mobile-indicator\"],\"disableDrag\":[4,\"disable-drag\"],\"disableAutoCenter\":[4,\"disable-auto-center\"],\"disableIndicatorClick\":[4,\"disable-indicator-click\"],\"_visibleIndex\":[32],\"_outerHeight\":[32],\"_totalWidth\":[32],\"_dragging\":[32]},[[9,\"mouseup\",\"mouseUpHandler\"],[9,\"touchend\",\"mouseUpHandler\"],[9,\"resize\",\"resizeHandler\"]]]]],[\"p-cropper.cjs\",[[1,\"p-cropper\",{\"variant\":[513],\"value\":[8],\"returnType\":[1,\"return-type\"],\"_loaded\":[32],\"_currentScale\":[32]},[[9,\"resize\",\"onResize\"]]]]],[\"p-info-panel.cjs\",[[1,\"p-info-panel\",{\"variant\":[1],\"header\":[1],\"content\":[1],\"closeable\":[4]}]]],[\"p-status.cjs\",[[4,\"p-status\",{\"variant\":[1],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"]}]]],[\"p-stepper-line.cjs\",[[1,\"p-stepper-line\",{\"active\":[516],\"direction\":[513]}]]],[\"p-stepper.cjs\",[[1,\"p-stepper\",{\"activeStep\":[2,\"active-step\"],\"direction\":[513],\"contentPosition\":[513,\"content-position\"],\"_rendering\":[32]},null,{\"activeStep\":[\"_onActiveStepChange\"]}]]],[\"p-stepper-item.cjs\",[[1,\"p-stepper-item\",{\"align\":[513],\"direction\":[513],\"contentPosition\":[513,\"content-position\"],\"finished\":[516],\"active\":[516]}]]],[\"p-tab-group.cjs\",[[1,\"p-tab-group\"]]],[\"p-avatar-group.cjs\",[[4,\"p-avatar-group\",{\"extra\":[2]}]]],[\"p-card-body.cjs\",[[4,\"p-card-body\",{\"inheritText\":[516,\"inherit-text\"]}]]],[\"p-card-container.cjs\",[[1,\"p-card-container\",{\"hoverable\":[516],\"shadow\":[516]}]]],[\"p-layout.cjs\",[[1,\"p-layout\",{\"variant\":[1]}]]],[\"p-tab-item.cjs\",[[1,\"p-tab-item\",{\"active\":[4]}]]],[\"p-table-column.cjs\",[[0,\"p-table-column\",{\"path\":[1537],\"type\":[1537],\"name\":[1537],\"useSlot\":[1540,\"use-slot\"],\"hasCheckbox\":[1540,\"has-checkbox\"],\"align\":[1537],\"isLast\":[1540,\"is-last\"],\"sizes\":[1032]}]]],[\"p-table-row-action.cjs\",[[0,\"p-table-row-action\",{\"type\":[1537],\"icon\":[1],\"iconOnly\":[4,\"icon-only\"],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"label\":[1],\"action\":[16],\"disabled\":[4]}]]],[\"p-toast-container.cjs\",[[1,\"p-toast-container\",{\"placement\":[1]}]]],[\"p-calendar.cjs\",[[1,\"p-calendar\",{\"variant\":[1],\"value\":[1],\"preselectToday\":[4,\"preselect-today\"],\"disabledDates\":[1,\"disabled-dates\"],\"minDate\":[1,\"min-date\"],\"maxDate\":[1,\"max-date\"],\"disableWeekends\":[4,\"disable-weekends\"],\"mode\":[1],\"_view\":[32],\"_viewDate\":[32],\"_value\":[32],\"_minDate\":[32],\"_maxDate\":[32],\"_disabledDates\":[32]},null,{\"value\":[\"_parseValue\"],\"minDate\":[\"_parseMinDate\"],\"maxDate\":[\"_parseMaxDate\"],\"disabledDates\":[\"_parseDisabledDates\"]}]]],[\"p-avatar.cjs\",[[0,\"p-avatar\",{\"variant\":[513],\"size\":[513],\"defaultImage\":[1,\"default-image\"],\"src\":[1],\"letters\":[1],\"_src\":[32],\"_failed\":[32]},null,{\"src\":[\"onSrchChange\"]}]]],[\"p-counter.cjs\",[[1,\"p-counter\",{\"variant\":[1],\"size\":[1]}]]],[\"p-slider-indicator.cjs\",[[1,\"p-slider-indicator\",{\"active\":[4]}]]],[\"p-drawer-body_3.cjs\",[[1,\"p-drawer-header\",{\"showClose\":[4,\"show-close\"]}],[1,\"p-drawer-body\",{\"variant\":[1]}],[4,\"p-drawer-container\",{\"closing\":[4]}]]],[\"p-backdrop.cjs\",[[1,\"p-backdrop\",{\"variant\":[1],\"applyBlur\":[4,\"apply-blur\"],\"closing\":[4],\"scrollLock\":[4,\"scroll-lock\"]},[[2,\"click\",\"handleClick\"]]]]],[\"p-modal-body_4.cjs\",[[1,\"p-modal-header\",{\"showClose\":[4,\"show-close\"]}],[1,\"p-modal-footer\"],[1,\"p-modal-body\",{\"variant\":[1],\"rounded\":[4],\"padding\":[4]}],[4,\"p-modal-container\",{\"size\":[1],\"closing\":[4]}]]],[\"p-label_3.cjs\",[[1,\"p-label\",{\"variant\":[513],\"behavior\":[513],\"iconPosition\":[1,\"icon-position\"],\"icon\":[513],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"size\":[513],\"keepMobileContent\":[516,\"keep-mobile-content\"]}],[1,\"p-segment-item\",{\"active\":[4],\"iconOnly\":[4,\"icon-only\"],\"size\":[513],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"]}],[4,\"p-segment-container\"]]],[\"p-dropdown-menu-container.cjs\",[[4,\"p-dropdown-menu-container\",{\"maxWidth\":[4,\"max-width\"],\"fullWidth\":[4,\"full-width\"],\"scrollable\":[8]}]]],[\"p-dropdown_2.cjs\",[[1,\"p-dropdown-menu-item\",{\"active\":[4],\"variant\":[1],\"enableHover\":[4,\"enable-hover\"],\"icon\":[1]}],[1,\"p-dropdown\",{\"placement\":[513],\"offset\":[2],\"strategy\":[1],\"show\":[4],\"calculateWidth\":[4,\"calculate-width\"],\"applyMaxWidth\":[4,\"apply-max-width\"],\"applyFullWidth\":[4,\"apply-full-width\"],\"scrollable\":[8],\"insideClick\":[4,\"inside-click\"],\"disableTriggerClick\":[4,\"disable-trigger-click\"],\"applyChevron\":[4,\"apply-chevron\"],\"chevronPosition\":[1,\"chevron-position\"],\"chevronDirection\":[1,\"chevron-direction\"]},[[6,\"click\",\"documentClickHandler\"]],{\"show\":[\"onShowChange\"]}]]],[\"p-page-size-select_3.cjs\",[[1,\"p-page-size-select\",{\"size\":[1538],\"sizeOptions\":[16],\"chevronPosition\":[1,\"chevron-position\"],\"buttonSize\":[1,\"button-size\"],\"buttonTemplate\":[16],\"itemTemplate\":[16],\"hidden\":[4],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[0,\"p-pagination\",{\"page\":[1538],\"pageSize\":[2,\"page-size\"],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"total\":[2]},null,{\"page\":[\"pageChangeHandler\"],\"pageSize\":[\"pageChangeHandler\"],\"total\":[\"pageChangeHandler\"]}],[1,\"p-pagination-item\",{\"active\":[4]}]]],[\"p-tooltip.cjs\",[[1,\"p-tooltip\",{\"variant\":[1],\"content\":[8],\"placement\":[1],\"offset\":[2],\"strategy\":[1],\"enableUserInput\":[4,\"enable-user-input\"],\"show\":[4],\"canManuallyClose\":[4,\"can-manually-close\"]},[[2,\"click\",\"clickHandler\"],[6,\"click\",\"documentClickHandler\"],[1,\"mouseenter\",\"mouseEnterHandler\"],[0,\"focus\",\"mouseEnterHandler\"],[1,\"mouseleave\",\"mouseLeaveHandler\"],[0,\"blur\",\"mouseLeaveHandler\"]],{\"show\":[\"onShowChange\"]}]]],[\"p-helper_3.cjs\",[[1,\"p-input-group\",{\"size\":[1],\"prefix\":[1],\"suffix\":[1],\"icon\":[1],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"iconPosition\":[1,\"icon-position\"],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"focused\":[516],\"forceShowTooltip\":[516,\"force-show-tooltip\"],\"focusMethod\":[1,\"focus-method\"],\"errorVariant\":[1,\"error-variant\"],\"_forceShowTooltip\":[32]},[[0,\"focusin\",\"handleFocusIn\"],[0,\"focusout\",\"handleFocusOut\"]]],[1,\"p-helper\",{\"placement\":[1]}],[1,\"p-input-error\",{\"error\":[1],\"forceShowTooltip\":[4,\"force-show-tooltip\"],\"_showTooltip\":[32]}]]],[\"p-floating-menu-container_8.cjs\",[[1,\"p-table-header\",{\"quickFilters\":[16],\"activeQuickFilterIdentifier\":[1,\"active-quick-filter-identifier\"],\"loading\":[4],\"enableSearch\":[4,\"enable-search\"],\"itemsSelectedAmount\":[2,\"items-selected-amount\"],\"query\":[1025],\"enableFilter\":[4,\"enable-filter\"],\"selectedFiltersAmount\":[2,\"selected-filters-amount\"],\"filterButtonTemplate\":[16],\"enableAction\":[4,\"enable-action\"],\"actionLoading\":[4,\"action-loading\"],\"actionIcon\":[1,\"action-icon\"],\"actionText\":[1,\"action-text\"],\"canUseAction\":[1028,\"can-use-action\"],\"actionButtonTemplate\":[16],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[1,\"p-table-footer\",{\"enablePageSize\":[4,\"enable-page-size\"],\"enablePagination\":[4,\"enable-pagination\"],\"enableExport\":[4,\"enable-export\"],\"loading\":[4],\"page\":[1538],\"total\":[2],\"pageSize\":[2,\"page-size\"],\"pageSizeOptions\":[16],\"hideOnSinglePage\":[4,\"hide-on-single-page\"],\"_locales\":[32]},[[16,\"localeChanged\",\"_setLocales\"]]],[4,\"p-table-cell\",{\"variant\":[1],\"index\":[2],\"rowIndex\":[2,\"row-index\"],\"definition\":[16],\"item\":[8],\"value\":[8],\"tableHasActions\":[4,\"table-has-actions\"],\"checkbox\":[8],\"template\":[16]}],[1,\"p-table-row\",{\"variant\":[1],\"enableHover\":[4,\"enable-hover\"]}],[1,\"p-floating-menu-container\",{\"usedInTable\":[4,\"used-in-table\"]}],[1,\"p-floating-menu-item\",{\"hover\":[516],\"disabled\":[516]}],[0,\"p-illustration\",{\"variant\":[1]}],[1,\"p-table-container\",{\"shadow\":[4]}]]]]"), options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const screens = {
|
|
4
|
+
tablet: '40rem',
|
|
5
|
+
'desktop-xs': '64rem',
|
|
6
|
+
'desktop-sm': '80rem',
|
|
7
|
+
desktop: '85.375rem',
|
|
8
|
+
'desktop-lg': '90rem',
|
|
9
|
+
'desktop-xl': '120rem',
|
|
10
|
+
// layout sizes
|
|
11
|
+
'layout-1280': '80rem',
|
|
12
|
+
'layout-1440': '90rem',
|
|
13
|
+
'layout-1536': '96rem',
|
|
14
|
+
'layout-1680': '105rem',
|
|
15
|
+
'layout-1920': '120rem',
|
|
16
|
+
'layout-2560': '160rem',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const getScreenSize = (size) => screens[size];
|
|
20
|
+
const getScreenSizeInRem = (size) => {
|
|
21
|
+
const screen = getScreenSize(size);
|
|
22
|
+
return parseInt(screen.replace('rem', ''), 10);
|
|
23
|
+
};
|
|
24
|
+
const getScreenSizeInPixels = (size) => {
|
|
25
|
+
const rem = getScreenSizeInRem(size);
|
|
26
|
+
return rem * 16;
|
|
27
|
+
};
|
|
28
|
+
const isBiggerThanScreen = (size) => {
|
|
29
|
+
const pixels = getScreenSizeInPixels(size);
|
|
30
|
+
return window.innerWidth > pixels;
|
|
31
|
+
};
|
|
32
|
+
const isSmallerThanScreen = (size) => {
|
|
33
|
+
const pixels = getScreenSizeInPixels(size);
|
|
34
|
+
return window.innerWidth < pixels;
|
|
35
|
+
};
|
|
36
|
+
const isBetweenScreens = (smallSize, bigSize) => {
|
|
37
|
+
return isBiggerThanScreen(smallSize) && isSmallerThanScreen(bigSize);
|
|
38
|
+
};
|
|
39
|
+
const isTouchDevice = () => !!window.matchMedia('(pointer: coarse)').matches;
|
|
40
|
+
const isMobile = () => isTouchDevice() || isSmallerThanScreen('tablet');
|
|
41
|
+
const isTablet = () => isBetweenScreens('tablet', 'desktop-xs');
|
|
42
|
+
const isDesktop = () => isBiggerThanScreen('desktop-xs');
|
|
43
|
+
|
|
44
|
+
exports.getScreenSize = getScreenSize;
|
|
45
|
+
exports.getScreenSizeInPixels = getScreenSizeInPixels;
|
|
46
|
+
exports.getScreenSizeInRem = getScreenSizeInRem;
|
|
47
|
+
exports.isBetweenScreens = isBetweenScreens;
|
|
48
|
+
exports.isBiggerThanScreen = isBiggerThanScreen;
|
|
49
|
+
exports.isDesktop = isDesktop;
|
|
50
|
+
exports.isMobile = isMobile;
|
|
51
|
+
exports.isSmallerThanScreen = isSmallerThanScreen;
|
|
52
|
+
exports.isTablet = isTablet;
|
|
53
|
+
exports.isTouchDevice = isTouchDevice;
|
|
54
|
+
exports.screens = screens;
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=screens-84f01214.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"screens-84f01214.js","mappings":";;AAAA,gBAAe;EACd,MAAM,EAAE,OAAO;EACf,YAAY,EAAE,OAAO;EACrB,YAAY,EAAE,OAAO;EACrB,OAAO,EAAE,WAAW;EACpB,YAAY,EAAE,OAAO;EACrB,YAAY,EAAE,QAAQ;;EAGtB,aAAa,EAAE,OAAO;EACtB,aAAa,EAAE,OAAO;EACtB,aAAa,EAAE,OAAO;EACtB,aAAa,EAAE,QAAQ;EACvB,aAAa,EAAE,QAAQ;EACvB,aAAa,EAAE,QAAQ;CACvB;;MCXY,aAAa,GAAG,CAAC,IAAgB,KAAK,OAAO,CAAC,IAAI,EAAE;MAEpD,kBAAkB,GAAG,CAAC,IAAgB;EAClD,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;EACnC,OAAO,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAChD,EAAE;MAEW,qBAAqB,GAAG,CAAC,IAAgB;EACrD,MAAM,GAAG,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;EACrC,OAAO,GAAG,GAAG,EAAE,CAAC;AACjB,EAAE;MAEW,kBAAkB,GAAG,CAAC,IAAgB;EAClD,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;EAC3C,OAAO,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC;AACnC,EAAE;MAEW,mBAAmB,GAAG,CAAC,IAAgB;EACnD,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;EAC3C,OAAO,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC;AACnC,EAAE;MAEW,gBAAgB,GAAG,CAC/B,SAAqB,EACrB,OAAmB;EAEnB,OAAO,kBAAkB,CAAC,SAAS,CAAC,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAC;AACtE,EAAE;MAEW,aAAa,GAAG,MAC5B,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC,QAAQ;MACrC,QAAQ,GAAG,MAAM,aAAa,EAAE,IAAI,mBAAmB,CAAC,QAAQ,EAAE;MAClE,QAAQ,GAAG,MAAM,gBAAgB,CAAC,QAAQ,EAAE,YAAY,EAAE;MAC1D,SAAS,GAAG,MAAM,kBAAkB,CAAC,YAAY;;;;;;;;;;;;;;","names":[],"sources":["src/tailwind/theme/screens.ts","src/utils/screens.ts"],"sourcesContent":["export default {\n\ttablet: '40rem', // 640 px\n\t'desktop-xs': '64rem', // 1024 px\n\t'desktop-sm': '80rem', // 1360 px\n\tdesktop: '85.375rem', // 1366\n\t'desktop-lg': '90rem', // 1440\n\t'desktop-xl': '120rem', // 1920\n\n\t// layout sizes\n\t'layout-1280': '80rem',\n\t'layout-1440': '90rem',\n\t'layout-1536': '96rem',\n\t'layout-1680': '105rem',\n\t'layout-1920': '120rem',\n\t'layout-2560': '160rem',\n};\n","import screens from '../tailwind/theme/screens';\n\nexport type ScreenSize = keyof typeof screens;\n\nexport const getScreenSize = (size: ScreenSize) => screens[size];\n\nexport const getScreenSizeInRem = (size: ScreenSize) => {\n\tconst screen = getScreenSize(size);\n\treturn parseInt(screen.replace('rem', ''), 10);\n};\n\nexport const getScreenSizeInPixels = (size: ScreenSize) => {\n\tconst rem = getScreenSizeInRem(size);\n\treturn rem * 16;\n};\n\nexport const isBiggerThanScreen = (size: ScreenSize) => {\n\tconst pixels = getScreenSizeInPixels(size);\n\treturn window.innerWidth > pixels;\n};\n\nexport const isSmallerThanScreen = (size: ScreenSize) => {\n\tconst pixels = getScreenSizeInPixels(size);\n\treturn window.innerWidth < pixels;\n};\n\nexport const isBetweenScreens = (\n\tsmallSize: ScreenSize,\n\tbigSize: ScreenSize\n) => {\n\treturn isBiggerThanScreen(smallSize) && isSmallerThanScreen(bigSize);\n};\n\nexport const isTouchDevice = () =>\n\t!!window.matchMedia('(pointer: coarse)').matches;\nexport const isMobile = () => isTouchDevice() || isSmallerThanScreen('tablet');\nexport const isTablet = () => isBetweenScreens('tablet', 'desktop-xs');\nexport const isDesktop = () => isBiggerThanScreen('desktop-xs');\n"],"version":3}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"components/molecules/page-size-select/page-size-select.component.js",
|
|
6
6
|
"components/helpers/table-column/table-column.component.js",
|
|
7
7
|
"components/molecules/table-header/table-header.component.js",
|
|
8
|
+
"components/helpers/table-row-action/table-row-action.component.js",
|
|
8
9
|
"components/organisms/table/table.component.js",
|
|
9
10
|
"components/atoms/avatar/avatar.component.js",
|
|
10
11
|
"components/atoms/avatar-group/avatar-group.component.js",
|
package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.flex{display:flex!important}.h-6{height:1.5rem!important}.cursor-pointer{cursor:pointer!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.whitespace-nowrap{white-space:nowrap!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}*{box-sizing:border-box}:host{--tw-text-opacity:1;align-items:center;color:rgb(152 154 183/var(--tw-text-opacity));display:flex;font-size:.875rem;gap:.5rem;height:1.5rem;line-height:1.25rem;white-space:nowrap}:host([hover]){cursor:pointer;font-weight:600}:host([hover]:hover){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.static{position:static!important}
|
|
1
|
+
.flex{display:flex!important}.h-6{height:1.5rem!important}.cursor-pointer{cursor:pointer!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.whitespace-nowrap{white-space:nowrap!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.opacity-40{opacity:.4!important}*{box-sizing:border-box}:host{--tw-text-opacity:1;align-items:center;color:rgb(152 154 183/var(--tw-text-opacity));display:flex;font-size:.875rem;gap:.5rem;height:1.5rem;line-height:1.25rem;white-space:nowrap}:host([hover]){cursor:pointer;font-weight:600}:host([disabled=true]),:host([disabled]){opacity:.4;pointer-events:none}:host([hover]:hover:not([disabled])){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.static{position:static!important}
|
|
@@ -2,6 +2,7 @@ import { h, Host } from "@stencil/core";
|
|
|
2
2
|
export class FloatingMenuItem {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.hover = true;
|
|
5
|
+
this.disabled = false;
|
|
5
6
|
}
|
|
6
7
|
render() {
|
|
7
8
|
return (h(Host, { class: "p-floating-menu-item" }, h("slot", null)));
|
|
@@ -37,6 +38,24 @@ export class FloatingMenuItem {
|
|
|
37
38
|
"attribute": "hover",
|
|
38
39
|
"reflect": true,
|
|
39
40
|
"defaultValue": "true"
|
|
41
|
+
},
|
|
42
|
+
"disabled": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"mutable": false,
|
|
45
|
+
"complexType": {
|
|
46
|
+
"original": "boolean",
|
|
47
|
+
"resolved": "boolean",
|
|
48
|
+
"references": {}
|
|
49
|
+
},
|
|
50
|
+
"required": false,
|
|
51
|
+
"optional": false,
|
|
52
|
+
"docs": {
|
|
53
|
+
"tags": [],
|
|
54
|
+
"text": "Wether the item is disabled"
|
|
55
|
+
},
|
|
56
|
+
"attribute": "disabled",
|
|
57
|
+
"reflect": true,
|
|
58
|
+
"defaultValue": "false"
|
|
40
59
|
}
|
|
41
60
|
};
|
|
42
61
|
}
|
package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floating-menu-item.component.js","sourceRoot":"","sources":["../../../../src/components/atoms/floating-menu-item/floating-menu-item.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,gBAAgB;;iBAIc,IAAI;;
|
|
1
|
+
{"version":3,"file":"floating-menu-item.component.js","sourceRoot":"","sources":["../../../../src/components/atoms/floating-menu-item/floating-menu-item.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,gBAAgB;;iBAIc,IAAI;oBAKD,KAAK;;EAElD,MAAM;IACL,OAAO,CACN,EAAC,IAAI,IAAC,KAAK,EAAC,sBAAsB;MACjC,eAAQ,CACF,CACP,CAAC;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-floating-menu-item',\n\tstyleUrl: 'floating-menu-item.component.scss',\n\tshadow: true,\n})\nexport class FloatingMenuItem {\n\t/**\n\t * Wether it should have a hover effect\n\t */\n\t@Prop({ reflect: true }) hover: boolean = true;\n\n\t/**\n\t * Wether the item is disabled\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-floating-menu-item\">\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"]}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
export class TableRowAction {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.type = 'both';
|
|
4
|
+
this.icon = undefined;
|
|
5
|
+
this.iconOnly = false;
|
|
6
|
+
this.iconFlip = undefined;
|
|
7
|
+
this.iconRotate = undefined;
|
|
8
|
+
this.label = undefined;
|
|
9
|
+
this.action = undefined;
|
|
10
|
+
this.disabled = false;
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
static get is() { return "p-table-row-action"; }
|
|
16
|
+
static get properties() {
|
|
17
|
+
return {
|
|
18
|
+
"type": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"mutable": true,
|
|
21
|
+
"complexType": {
|
|
22
|
+
"original": "'both' | 'single' | 'multi'",
|
|
23
|
+
"resolved": "\"both\" | \"multi\" | \"single\"",
|
|
24
|
+
"references": {}
|
|
25
|
+
},
|
|
26
|
+
"required": false,
|
|
27
|
+
"optional": false,
|
|
28
|
+
"docs": {
|
|
29
|
+
"tags": [],
|
|
30
|
+
"text": "The type of action\nmutli = Only multi select action\nsingle = Only an action on the row\nboth = Action on both locations"
|
|
31
|
+
},
|
|
32
|
+
"attribute": "type",
|
|
33
|
+
"reflect": true,
|
|
34
|
+
"defaultValue": "'both'"
|
|
35
|
+
},
|
|
36
|
+
"icon": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"mutable": false,
|
|
39
|
+
"complexType": {
|
|
40
|
+
"original": "IconVariant",
|
|
41
|
+
"resolved": "\"arrow\" | \"attachment\" | \"bread\" | \"calendar\" | \"camera\" | \"car\" | \"checklist\" | \"checkmark\" | \"chevron\" | \"chevrons\" | \"clock\" | \"colleagues\" | \"cogs\" | \"comment\" | \"companies\" | \"company\" | \"deactivate\" | \"document\" | \"download\" | \"envelope\" | \"explanation\" | \"eye\" | \"faPiggy\" | \"filter\" | \"folder\" | \"formula\" | \"grid\" | \"hashtag\" | \"headset\" | \"hidden\" | \"iDeal\" | \"integration\" | \"list\" | \"location\" | \"megaphone\" | \"menu\" | \"minus\" | \"more\" | \"negative\" | \"notification\" | \"pagination\" | \"payment\" | \"pencil\" | \"person\" | \"plan\" | \"plus\" | \"question\" | \"reload\" | \"receipt\" | \"report\" | \"search\" | \"settings\" | \"sick\" | \"signout\" | \"switch\" | \"tachometer\" | \"task\" | \"template\" | \"tool\" | \"trash\" | \"turn\" | \"upload\" | \"warning\"",
|
|
42
|
+
"references": {
|
|
43
|
+
"IconVariant": {
|
|
44
|
+
"location": "import",
|
|
45
|
+
"path": "../../../components",
|
|
46
|
+
"id": "src/components.d.ts::IconVariant"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": false,
|
|
51
|
+
"optional": false,
|
|
52
|
+
"docs": {
|
|
53
|
+
"tags": [],
|
|
54
|
+
"text": "Icon to show on the button"
|
|
55
|
+
},
|
|
56
|
+
"attribute": "icon",
|
|
57
|
+
"reflect": false
|
|
58
|
+
},
|
|
59
|
+
"iconOnly": {
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"mutable": false,
|
|
62
|
+
"complexType": {
|
|
63
|
+
"original": "boolean",
|
|
64
|
+
"resolved": "boolean",
|
|
65
|
+
"references": {}
|
|
66
|
+
},
|
|
67
|
+
"required": false,
|
|
68
|
+
"optional": false,
|
|
69
|
+
"docs": {
|
|
70
|
+
"tags": [],
|
|
71
|
+
"text": "Wether the button is icon only"
|
|
72
|
+
},
|
|
73
|
+
"attribute": "icon-only",
|
|
74
|
+
"reflect": false,
|
|
75
|
+
"defaultValue": "false"
|
|
76
|
+
},
|
|
77
|
+
"iconFlip": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"mutable": false,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "IconFlipOptions",
|
|
82
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
83
|
+
"references": {
|
|
84
|
+
"IconFlipOptions": {
|
|
85
|
+
"location": "import",
|
|
86
|
+
"path": "../../../components",
|
|
87
|
+
"id": "src/components.d.ts::IconFlipOptions"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"required": false,
|
|
92
|
+
"optional": false,
|
|
93
|
+
"docs": {
|
|
94
|
+
"tags": [],
|
|
95
|
+
"text": "Icon flip"
|
|
96
|
+
},
|
|
97
|
+
"attribute": "icon-flip",
|
|
98
|
+
"reflect": false
|
|
99
|
+
},
|
|
100
|
+
"iconRotate": {
|
|
101
|
+
"type": "number",
|
|
102
|
+
"mutable": false,
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "RotateOptions",
|
|
105
|
+
"resolved": "-135 | -180 | -225 | -25 | -270 | -315 | -45 | -90 | 0 | 135 | 180 | 225 | 25 | 270 | 315 | 45 | 90",
|
|
106
|
+
"references": {
|
|
107
|
+
"RotateOptions": {
|
|
108
|
+
"location": "import",
|
|
109
|
+
"path": "../../../components",
|
|
110
|
+
"id": "src/components.d.ts::RotateOptions"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"required": false,
|
|
115
|
+
"optional": false,
|
|
116
|
+
"docs": {
|
|
117
|
+
"tags": [],
|
|
118
|
+
"text": "Icon rotate"
|
|
119
|
+
},
|
|
120
|
+
"attribute": "icon-rotate",
|
|
121
|
+
"reflect": false
|
|
122
|
+
},
|
|
123
|
+
"label": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"mutable": false,
|
|
126
|
+
"complexType": {
|
|
127
|
+
"original": "string",
|
|
128
|
+
"resolved": "string",
|
|
129
|
+
"references": {}
|
|
130
|
+
},
|
|
131
|
+
"required": false,
|
|
132
|
+
"optional": false,
|
|
133
|
+
"docs": {
|
|
134
|
+
"tags": [],
|
|
135
|
+
"text": "Label of the action"
|
|
136
|
+
},
|
|
137
|
+
"attribute": "label",
|
|
138
|
+
"reflect": false
|
|
139
|
+
},
|
|
140
|
+
"action": {
|
|
141
|
+
"type": "unknown",
|
|
142
|
+
"mutable": false,
|
|
143
|
+
"complexType": {
|
|
144
|
+
"original": "TableRowActionFunc",
|
|
145
|
+
"resolved": "{ (item: any, multi: false): void; (item: any[], multi: true): void; }",
|
|
146
|
+
"references": {
|
|
147
|
+
"TableRowActionFunc": {
|
|
148
|
+
"location": "local",
|
|
149
|
+
"path": "/home/runner/work/Paperless/Paperless/packages/core/src/components/helpers/table-row-action/table-row-action.component.tsx",
|
|
150
|
+
"id": "src/components/helpers/table-row-action/table-row-action.component.tsx::TableRowActionFunc"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"required": false,
|
|
155
|
+
"optional": false,
|
|
156
|
+
"docs": {
|
|
157
|
+
"tags": [],
|
|
158
|
+
"text": "The action to trigger when used"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"disabled": {
|
|
162
|
+
"type": "boolean",
|
|
163
|
+
"mutable": false,
|
|
164
|
+
"complexType": {
|
|
165
|
+
"original": "boolean",
|
|
166
|
+
"resolved": "boolean",
|
|
167
|
+
"references": {}
|
|
168
|
+
},
|
|
169
|
+
"required": false,
|
|
170
|
+
"optional": false,
|
|
171
|
+
"docs": {
|
|
172
|
+
"tags": [],
|
|
173
|
+
"text": "Wether the action is disabled"
|
|
174
|
+
},
|
|
175
|
+
"attribute": "disabled",
|
|
176
|
+
"reflect": false,
|
|
177
|
+
"defaultValue": "false"
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=table-row-action.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-row-action.component.js","sourceRoot":"","sources":["../../../../src/components/helpers/table-row-action/table-row-action.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAehD,MAAM,OAAO,cAAc;;gBAQzB,MAAM;;oBAUqB,KAAK;;;;;oBAyBL,KAAK;;EAEjC,MAAM;IACL,OAAO;EACR,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Prop } from '@stencil/core';\nimport {\n\tIconFlipOptions,\n\tIconVariant,\n\tRotateOptions,\n} from '../../../components';\n\nexport type TableRowActionFunc = {\n\t(item: any, multi: false): void;\n\t(item: any[], multi: true): void;\n};\n\n@Component({\n\ttag: 'p-table-row-action',\n})\nexport class TableRowAction {\n\t/**\n\t * The type of action\n\t * mutli = Only multi select action\n\t * single = Only an action on the row\n\t * both = Action on both locations\n\t */\n\t@Prop({ reflect: true, mutable: true }) type: 'both' | 'single' | 'multi' =\n\t\t'both';\n\n\t/**\n\t * Icon to show on the button\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * Wether the button is icon only\n\t */\n\t@Prop() iconOnly: boolean = false;\n\n\t/**\n\t * Icon flip\n\t */\n\t@Prop() iconFlip: IconFlipOptions;\n\n\t/**\n\t * Icon rotate\n\t */\n\t@Prop() iconRotate: RotateOptions;\n\n\t/**\n\t * Label of the action\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The action to trigger when used\n\t */\n\t@Prop() action: TableRowActionFunc;\n\n\t/**\n\t * Wether the action is disabled\n\t */\n\t@Prop() disabled: boolean = false;\n\n\trender() {\n\t\treturn;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.gap-4{gap:1rem!important}*{box-sizing:border-box}p-table-cell{align-items:center;gap:1rem}.static{position:static!important}.flex{display:flex!important}.table-cell{display:table-cell!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.w-1\/12{width:8.333333%!important}.w-10\/12{width:83.333333%!important}.w-11\/12{width:91.666667%!important}.w-2\/12{width:16.666667%!important}.w-3\/12{width:25%!important}.w-4\/12{width:33.333333%!important}.w-5\/12{width:41.666667%!important}.w-6\/12{width:50%!important}.w-7\/12{width:58.333333%!important}.w-8\/12{width:66.666667%!important}.w-9\/12{width:75%!important}.w-auto{width:auto!important}.w-full{width:100%!important}.flex-1{flex:1 1 0%!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.rounded{border-radius:.25rem!important}.pr-4{padding-right:1rem!important}.font-semibold{font-weight:600!important}.text-storm-dark{--tw-text-opacity:1!important;color:rgb(39 40 56/var(--tw-text-opacity))!important}.group:hover .group-hover\:flex{display:flex!important}.group:hover .group-hover\:hidden{display:none!important}@media (min-width:40rem){.tablet\:w-1\/12{width:8.333333%!important}.tablet\:w-10\/12{width:83.333333%!important}.tablet\:w-11\/12{width:91.666667%!important}.tablet\:w-2\/12{width:16.666667%!important}.tablet\:w-3\/12{width:25%!important}.tablet\:w-4\/12{width:33.333333%!important}.tablet\:w-5\/12{width:41.666667%!important}.tablet\:w-6\/12{width:50%!important}.tablet\:w-7\/12{width:58.333333%!important}.tablet\:w-8\/12{width:66.666667%!important}.tablet\:w-9\/12{width:75%!important}}@media (min-width:64rem){.desktop-xs\:w-1\/12{width:8.333333%!important}.desktop-xs\:w-10\/12{width:83.333333%!important}.desktop-xs\:w-11\/12{width:91.666667%!important}.desktop-xs\:w-2\/12{width:16.666667%!important}.desktop-xs\:w-3\/12{width:25%!important}.desktop-xs\:w-4\/12{width:33.333333%!important}.desktop-xs\:w-5\/12{width:41.666667%!important}.desktop-xs\:w-6\/12{width:50%!important}.desktop-xs\:w-7\/12{width:58.333333%!important}.desktop-xs\:w-8\/12{width:66.666667%!important}.desktop-xs\:w-9\/12{width:75%!important}}@media (min-width:80rem){.desktop-sm\:w-1\/12{width:8.333333%!important}.desktop-sm\:w-10\/12{width:83.333333%!important}.desktop-sm\:w-11\/12{width:91.666667%!important}.desktop-sm\:w-2\/12{width:16.666667%!important}.desktop-sm\:w-3\/12{width:25%!important}.desktop-sm\:w-4\/12{width:33.333333%!important}.desktop-sm\:w-5\/12{width:41.666667%!important}.desktop-sm\:w-6\/12{width:50%!important}.desktop-sm\:w-7\/12{width:58.333333%!important}.desktop-sm\:w-8\/12{width:66.666667%!important}.desktop-sm\:w-9\/12{width:75%!important}}@media (min-width:85.375rem){.desktop\:w-1\/12{width:8.333333%!important}.desktop\:w-10\/12{width:83.333333%!important}.desktop\:w-11\/12{width:91.666667%!important}.desktop\:w-2\/12{width:16.666667%!important}.desktop\:w-3\/12{width:25%!important}.desktop\:w-4\/12{width:33.333333%!important}.desktop\:w-5\/12{width:41.666667%!important}.desktop\:w-6\/12{width:50%!important}.desktop\:w-7\/12{width:58.333333%!important}.desktop\:w-8\/12{width:66.666667%!important}.desktop\:w-9\/12{width:75%!important}}@media (min-width:90rem){.desktop-lg\:w-1\/12{width:8.333333%!important}.desktop-lg\:w-10\/12{width:83.333333%!important}.desktop-lg\:w-11\/12{width:91.666667%!important}.desktop-lg\:w-2\/12{width:16.666667%!important}.desktop-lg\:w-3\/12{width:25%!important}.desktop-lg\:w-4\/12{width:33.333333%!important}.desktop-lg\:w-5\/12{width:41.666667%!important}.desktop-lg\:w-6\/12{width:50%!important}.desktop-lg\:w-7\/12{width:58.333333%!important}.desktop-lg\:w-8\/12{width:66.666667%!important}.desktop-lg\:w-9\/12{width:75%!important}}@media (min-width:120rem){.desktop-xl\:w-1\/12{width:8.333333%!important}.desktop-xl\:w-10\/12{width:83.333333%!important}.desktop-xl\:w-11\/12{width:91.666667%!important}.desktop-xl\:w-2\/12{width:16.666667%!important}.desktop-xl\:w-3\/12{width:25%!important}.desktop-xl\:w-4\/12{width:33.333333%!important}.desktop-xl\:w-5\/12{width:41.666667%!important}.desktop-xl\:w-6\/12{width:50%!important}.desktop-xl\:w-7\/12{width:58.333333%!important}.desktop-xl\:w-8\/12{width:66.666667%!important}.desktop-xl\:w-9\/12{width:75%!important}}
|
|
@@ -9,6 +9,7 @@ export class TableCell {
|
|
|
9
9
|
this.definition = undefined;
|
|
10
10
|
this.item = undefined;
|
|
11
11
|
this.value = undefined;
|
|
12
|
+
this.tableHasActions = false;
|
|
12
13
|
this.checkbox = undefined;
|
|
13
14
|
this.template = ({ value, }) => value;
|
|
14
15
|
}
|
|
@@ -27,21 +28,32 @@ export class TableCell {
|
|
|
27
28
|
};
|
|
28
29
|
}
|
|
29
30
|
render() {
|
|
30
|
-
return (h(Host, { class: Object.assign({ 'p-table-cell': true, [`variant-${this.variant}`]: true }, this._getColumnClasses()) }, this.checkbox, this.
|
|
31
|
+
return (h(Host, { class: Object.assign({ 'p-table-cell': true, [`variant-${this.variant}`]: true }, this._getColumnClasses()) }, this.checkbox, this._getContent()));
|
|
32
|
+
}
|
|
33
|
+
_getContent() {
|
|
34
|
+
if (this.variant === 'loading') {
|
|
35
|
+
return (h("p-loader", { variant: "ghost", class: "h-6 w-full flex-1 rounded" }));
|
|
36
|
+
}
|
|
37
|
+
if (this.variant === 'actions') {
|
|
38
|
+
return h("slot", { name: "actions" });
|
|
39
|
+
}
|
|
40
|
+
return (h("div", { class: {
|
|
31
41
|
flex: true,
|
|
32
42
|
'justify-start': this.definition.align === 'start',
|
|
33
43
|
'justify-center': this.definition.align === 'center',
|
|
34
44
|
'justify-end': this.definition.align === 'end',
|
|
35
|
-
} }, this.variant === 'header' ? (this.data.value) : this.definition.useSlot ? (h("slot", null)) : (this.template(this.data))))
|
|
45
|
+
} }, this.variant === 'header' ? (this.data.value) : this.definition.useSlot ? (h("slot", null)) : (this.template(this.data))));
|
|
36
46
|
}
|
|
37
47
|
_getColumnClasses() {
|
|
38
48
|
var _a, _b, _c, _d, _e, _f;
|
|
39
49
|
const sizes = this.definition ? this._getSizes(this.definition) : {};
|
|
40
|
-
return Object.assign({ 'justify-start': !((_a = this.definition) === null || _a === void 0 ? void 0 : _a.align) || ((_b = this.definition) === null || _b === void 0 ? void 0 : _b.align) === 'start', 'justify-center': ((_c = this.definition) === null || _c === void 0 ? void 0 : _c.align) === 'center', 'justify-end': ((_d = this.definition) === null || _d === void 0 ? void 0 : _d.align) === 'end', 'font-semibold': this.variant !== 'header' && ((_e = this.definition) === null || _e === void 0 ? void 0 : _e.type) === 'th', 'text-storm-dark': this.variant !== 'header' && ((_f = this.definition) === null || _f === void 0 ? void 0 : _f.type) === 'th', 'pr-4': this.definition.isLast === false
|
|
50
|
+
return Object.assign({ 'justify-start': !((_a = this.definition) === null || _a === void 0 ? void 0 : _a.align) || ((_b = this.definition) === null || _b === void 0 ? void 0 : _b.align) === 'start', 'justify-center': ((_c = this.definition) === null || _c === void 0 ? void 0 : _c.align) === 'center', 'justify-end': ((_d = this.definition) === null || _d === void 0 ? void 0 : _d.align) === 'end', 'font-semibold': this.variant !== 'header' && ((_e = this.definition) === null || _e === void 0 ? void 0 : _e.type) === 'th', 'text-storm-dark': this.variant !== 'header' && ((_f = this.definition) === null || _f === void 0 ? void 0 : _f.type) === 'th', 'pr-4': this.definition.isLast === false, 'group-hover:hidden': this.definition.isLast &&
|
|
51
|
+
this.tableHasActions &&
|
|
52
|
+
this.variant !== 'actions', 'group-hover:flex': this.variant === 'actions' && this.tableHasActions, hidden: this.variant === 'actions' && this.tableHasActions, flex: this.variant !== 'actions' }, sizes);
|
|
41
53
|
}
|
|
42
54
|
/*
|
|
43
55
|
With this, we shall hack the system in ways no one would ever have thought.
|
|
44
|
-
|
|
56
|
+
|
|
45
57
|
<div class="w-1/12 w-2/12 w-3/12 w-4/12 w-5/12 w-6/12 w-7/12 w-8/12 w-9/12 w-10/12 w-11/12 w-12/12"></div>
|
|
46
58
|
<div class="tablet:w-1/12 tablet:w-2/12 tablet:w-3/12 tablet:w-4/12 tablet:w-5/12 tablet:w-6/12 tablet:w-7/12 tablet:w-8/12 tablet:w-9/12 tablet:w-10/12 tablet:w-11/12 tablet:w-12/12"></div>
|
|
47
59
|
<div class="desktop-xs:w-1/12 desktop-xs:w-2/12 desktop-xs:w-3/12 desktop-xs:w-4/12 desktop-xs:w-5/12 desktop-xs:w-6/12 desktop-xs:w-7/12 desktop-xs:w-8/12 desktop-xs:w-9/12 desktop-xs:w-10/12 desktop-xs:w-11/12 desktop-xs:w-12/12"></div>
|
|
@@ -51,7 +63,7 @@ export class TableCell {
|
|
|
51
63
|
<div class="desktop-lg:w-1/12 desktop-lg:w-2/12 desktop-lg:w-3/12 desktop-lg:w-4/12 desktop-lg:w-5/12 desktop-lg:w-6/12 desktop-lg:w-7/12 desktop-lg:w-8/12 desktop-lg:w-9/12 desktop-lg:w-10/12 desktop-lg:w-11/12 desktop-lg:w-12/12"></div>
|
|
52
64
|
<div class="desktop-xl:w-1/12 desktop-xl:w-2/12 desktop-xl:w-3/12 desktop-xl:w-4/12 desktop-xl:w-5/12 desktop-xl:w-6/12 desktop-xl:w-7/12 desktop-xl:w-8/12 desktop-xl:w-9/12 desktop-xl:w-10/12 desktop-xl:w-11/12 desktop-xl:w-12/12"></div>
|
|
53
65
|
|
|
54
|
-
|
|
66
|
+
|
|
55
67
|
⠀⠀⠀⠀⠀⣠⣴⣶⣿⣿⠿⣷⣶⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣷⠿⣿⣿⣶⣦⣀⠀⠀⠀⠀⠀
|
|
56
68
|
⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣶⣦⣬⡉⠒⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠚⢉⣥⣴⣾⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀
|
|
57
69
|
⠀⠀⠀⡾⠿⠛⠛⠛⠛⠿⢿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣿⠿⠿⠛⠛⠛⠛⠿⢧⠀⠀⠀
|
|
@@ -156,8 +168,8 @@ export class TableCell {
|
|
|
156
168
|
"type": "string",
|
|
157
169
|
"mutable": false,
|
|
158
170
|
"complexType": {
|
|
159
|
-
"original": "'default' | 'loading' | 'header'",
|
|
160
|
-
"resolved": "\"default\" | \"header\" | \"loading\"",
|
|
171
|
+
"original": "'default' | 'loading' | 'header' | 'actions'",
|
|
172
|
+
"resolved": "\"actions\" | \"default\" | \"header\" | \"loading\"",
|
|
161
173
|
"references": {}
|
|
162
174
|
},
|
|
163
175
|
"required": false,
|
|
@@ -259,6 +271,24 @@ export class TableCell {
|
|
|
259
271
|
"attribute": "value",
|
|
260
272
|
"reflect": false
|
|
261
273
|
},
|
|
274
|
+
"tableHasActions": {
|
|
275
|
+
"type": "boolean",
|
|
276
|
+
"mutable": false,
|
|
277
|
+
"complexType": {
|
|
278
|
+
"original": "boolean",
|
|
279
|
+
"resolved": "boolean",
|
|
280
|
+
"references": {}
|
|
281
|
+
},
|
|
282
|
+
"required": false,
|
|
283
|
+
"optional": false,
|
|
284
|
+
"docs": {
|
|
285
|
+
"tags": [],
|
|
286
|
+
"text": "Wether the table has actions"
|
|
287
|
+
},
|
|
288
|
+
"attribute": "table-has-actions",
|
|
289
|
+
"reflect": false,
|
|
290
|
+
"defaultValue": "false"
|
|
291
|
+
},
|
|
262
292
|
"checkbox": {
|
|
263
293
|
"type": "any",
|
|
264
294
|
"mutable": false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-cell.component.js","sourceRoot":"","sources":["../../../../src/components/molecules/table-cell/table-cell.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EACN,qBAAqB,GAKrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAOjD,MAAM,OAAO,SAAS;;mBAI+B,SAAS;;;;;;;oBAmCb,CAAC,EAChD,KAAK,GACgB,EAAE,EAAE,CAAC,KAAK;;EAEhC,IAAI,IAAI;;IACP,IAAI,IAAI,CAAC,OAAO,KAAK,QAAQ,EAAE;MAC9B,OAAO;QACN,KAAK,EAAE,IAAI,CAAC,KAAK;OACjB,CAAC;KACF;IAED,OAAO;MACN,KAAK,EACJ,MAAA,IAAI,CAAC,KAAK,mCAAI,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,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;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, h, Host, Prop } from '@stencil/core';\nimport {\n\tisTableColumnSizesKey,\n\tTableColumnSizes,\n\tTableColumnSizesKey,\n\tTableDefinitionData,\n\tTableDefinitionTemplateFunc,\n} from '../../../types';\nimport { objectGetByPath } from '../../../utils';\nimport { TableColumn } from '../../helpers/table-column/table-column.component';\n\n@Component({\n\ttag: 'p-table-cell',\n\tstyleUrl: 'table-cell.component.scss',\n})\nexport class TableCell {\n\t/**\n\t * The variant of the column\n\t */\n\t@Prop() variant: 'default' | 'loading' | 'header' = 'default';\n\n\t/**\n\t * The index of the column\n\t */\n\t@Prop() index: number;\n\n\t/**\n\t * The index of the row\n\t */\n\t@Prop() rowIndex: number;\n\n\t/**\n\t * The definition of the table column\n\t */\n\t@Prop() definition?: TableColumn;\n\n\t/**\n\t * The item in question\n\t */\n\t@Prop() item: any;\n\n\t/**\n\t * The value of the column\n\t */\n\t@Prop() value: any;\n\n\t/**\n\t * The checkbox to show\n\t */\n\t@Prop() checkbox: any;\n\n\t/**\n\t * The template to show\n\t */\n\t@Prop() template: TableDefinitionTemplateFunc = ({\n\t\tvalue,\n\t}: TableDefinitionData) => value;\n\n\tget data(): TableDefinitionData | { value: string } {\n\t\tif (this.variant === 'header') {\n\t\t\treturn {\n\t\t\t\tvalue: this.value,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tvalue:\n\t\t\t\tthis.value ?? objectGetByPath(this.item, this.definition.path),\n\t\t\titem: this.item,\n\t\t\tindex: this.index,\n\t\t\trowIndex: this.rowIndex,\n\t\t};\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{\n\t\t\t\t\t'p-table-cell': true,\n\t\t\t\t\t[`variant-${this.variant}`]: true,\n\t\t\t\t\t...this._getColumnClasses(),\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{this.checkbox}\n\n\t\t\t\t{this.variant === 'loading' ? (\n\t\t\t\t\t<p-loader\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tclass=\"h-6 w-full flex-1 rounded\"\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\tflex: true,\n\t\t\t\t\t\t\t'justify-start': this.definition.align === 'start',\n\t\t\t\t\t\t\t'justify-center':\n\t\t\t\t\t\t\t\tthis.definition.align === 'center',\n\t\t\t\t\t\t\t'justify-end': this.definition.align === 'end',\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this.variant === 'header' ? (\n\t\t\t\t\t\t\tthis.data.value\n\t\t\t\t\t\t) : this.definition.useSlot ? (\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tthis.template(this.data as TableDefinitionData)\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _getColumnClasses() {\n\t\tconst sizes = this.definition ? this._getSizes(this.definition) : {};\n\t\treturn {\n\t\t\t'justify-start':\n\t\t\t\t!this.definition?.align || this.definition?.align === 'start',\n\t\t\t'justify-center': this.definition?.align === 'center',\n\t\t\t'justify-end': this.definition?.align === 'end',\n\t\t\t'font-semibold':\n\t\t\t\tthis.variant !== 'header' && this.definition?.type === 'th',\n\t\t\t'text-storm-dark':\n\t\t\t\tthis.variant !== 'header' && this.definition?.type === 'th',\n\t\t\t'pr-4': this.definition.isLast === false,\n\t\t\t...sizes,\n\t\t};\n\t}\n\n\t/* \n With this, we shall hack the system in ways no one would ever have thought.\n \n <div class=\"w-1/12 w-2/12 w-3/12 w-4/12 w-5/12 w-6/12 w-7/12 w-8/12 w-9/12 w-10/12 w-11/12 w-12/12\"></div>\n <div class=\"tablet:w-1/12 tablet:w-2/12 tablet:w-3/12 tablet:w-4/12 tablet:w-5/12 tablet:w-6/12 tablet:w-7/12 tablet:w-8/12 tablet:w-9/12 tablet:w-10/12 tablet:w-11/12 tablet:w-12/12\"></div>\n <div class=\"desktop-xs:w-1/12 desktop-xs:w-2/12 desktop-xs:w-3/12 desktop-xs:w-4/12 desktop-xs:w-5/12 desktop-xs:w-6/12 desktop-xs:w-7/12 desktop-xs:w-8/12 desktop-xs:w-9/12 desktop-xs:w-10/12 desktop-xs:w-11/12 desktop-xs:w-12/12\"></div>\n <div class=\"desktop-xs:w-1/12 desktop-xs:w-2/12 desktop-xs:w-3/12 desktop-xs:w-4/12 desktop-xs:w-5/12 desktop-xs:w-6/12 desktop-xs:w-7/12 desktop-xs:w-8/12 desktop-xs:w-9/12 desktop-xs:w-10/12 desktop-xs:w-11/12 desktop-xs:w-12/12\"></div>\n <div class=\"desktop-sm:w-1/12 desktop-sm:w-2/12 desktop-sm:w-3/12 desktop-sm:w-4/12 desktop-sm:w-5/12 desktop-sm:w-6/12 desktop-sm:w-7/12 desktop-sm:w-8/12 desktop-sm:w-9/12 desktop-sm:w-10/12 desktop-sm:w-11/12 desktop-sm:w-12/12\"></div>\n <div class=\"desktop:w-1/12 desktop:w-2/12 desktop:w-3/12 desktop:w-4/12 desktop:w-5/12 desktop:w-6/12 desktop:w-7/12 desktop:w-8/12 desktop:w-9/12 desktop:w-10/12 desktop:w-11/12 desktop:w-12/12\"></div>\n <div class=\"desktop-lg:w-1/12 desktop-lg:w-2/12 desktop-lg:w-3/12 desktop-lg:w-4/12 desktop-lg:w-5/12 desktop-lg:w-6/12 desktop-lg:w-7/12 desktop-lg:w-8/12 desktop-lg:w-9/12 desktop-lg:w-10/12 desktop-lg:w-11/12 desktop-lg:w-12/12\"></div>\n <div class=\"desktop-xl:w-1/12 desktop-xl:w-2/12 desktop-xl:w-3/12 desktop-xl:w-4/12 desktop-xl:w-5/12 desktop-xl:w-6/12 desktop-xl:w-7/12 desktop-xl:w-8/12 desktop-xl:w-9/12 desktop-xl:w-10/12 desktop-xl:w-11/12 desktop-xl:w-12/12\"></div>\n\n \n ⠀⠀⠀⠀⠀⣠⣴⣶⣿⣿⠿⣷⣶⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣷⠿⣿⣿⣶⣦⣀⠀⠀⠀⠀⠀\n ⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣶⣦⣬⡉⠒⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠚⢉⣥⣴⣾⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀\n ⠀⠀⠀⡾⠿⠛⠛⠛⠛⠿⢿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣿⠿⠿⠛⠛⠛⠛⠿⢧⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠻⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⡿⠟⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⣠⣤⠶⠶⠶⠰⠦⣤⣀⠀⠙⣷⠀⠀⠀⠀⠀⠀⠀⢠⡿⠋⢀⣀⣤⢴⠆⠲⠶⠶⣤⣄⠀⠀⠀⠀⠀⠀⠀\n ⠀⠘⣆⠀⠀⢠⣾⣫⣶⣾⣿⣿⣿⣿⣷⣯⣿⣦⠈⠃⡇⠀⠀⠀⠀⢸⠘⢁⣶⣿⣵⣾⣿⣿⣿⣿⣷⣦⣝⣷⡄⠀⠀⡰⠂⠀\n ⠀⠀⣨⣷⣶⣿⣧⣛⣛⠿⠿⣿⢿⣿⣿⣛⣿⡿⠀⠀⡇⠀⠀⠀⠀⢸⠀⠈⢿⣟⣛⠿⢿⡿⢿⢿⢿⣛⣫⣼⡿⣶⣾⣅⡀⠀\n ⢀⡼⠋⠁⠀⠀⠈⠉⠛⠛⠻⠟⠸⠛⠋⠉⠁⠀⠀⢸⡇⠀⠀⠄⠀⢸⡄⠀⠀⠈⠉⠙⠛⠃⠻⠛⠛⠛⠉⠁⠀⠀⠈⠙⢧⡀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⡇⢠⠀⠀⠀⢸⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⡇⠀⠀⠀⠀⢸⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⠟⠁⣿⠇⠀⠀⠀⠀⢸⡇⠙⢿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠰⣄⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⠖⡾⠁⠀⠀⣿⠀⠀⠀⠀⠀⠘⣿⠀⠀⠙⡇⢸⣷⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⣰⠄⠀\n ⠀⠀⢻⣷⡦⣤⣤⣤⡴⠶⠿⠛⠉⠁⠀⢳⠀⢠⡀⢿⣀⠀⠀⠀⠀⣠⡟⢀⣀⢠⠇⠀⠈⠙⠛⠷⠶⢦⣤⣤⣤⢴⣾⡏⠀⠀\n ⠀⠀⠈⣿⣧⠙⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⢊⣙⠛⠒⠒⢛⣋⡚⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⡿⠁⣾⡿⠀⠀⠀\n ⠀⠀⠀⠘⣿⣇⠈⢿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⡿⢿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⡟⠁⣼⡿⠁⠀⠀⠀\n ⠀⠀⠀⠀⠘⣿⣦⠀⠻⣿⣷⣦⣤⣤⣶⣶⣶⣿⣿⣿⣿⠏⠀⠀⠻⣿⣿⣿⣿⣶⣶⣶⣦⣤⣴⣿⣿⠏⢀⣼⡿⠁⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠘⢿⣷⣄⠙⠻⠿⠿⠿⠿⠿⢿⣿⣿⣿⣁⣀⣀⣀⣀⣙⣿⣿⣿⠿⠿⠿⠿⠿⠿⠟⠁⣠⣿⡿⠁⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠈⠻⣯⠙⢦⣀⠀⠀⠀⠀⠀⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠀⠀⠀⠀⠀⣠⠴⢋⣾⠟⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠙⢧⡀⠈⠉⠒⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠐⠒⠉⠁⢀⡾⠃⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠳⣄⠀⠀⠀⠀⠀⠀⠀⠀⠻⣿⣿⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⣠⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢦⡀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⢀⡴⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n */\n\tprivate _getSizes({ sizes }: TableColumn) {\n\t\tif (sizes === 'auto' || !sizes) {\n\t\t\treturn {\n\t\t\t\t'w-auto': true,\n\t\t\t};\n\t\t}\n\n\t\tif (sizes === 'hidden') {\n\t\t\treturn {\n\t\t\t\thidden: true,\n\t\t\t};\n\t\t}\n\n\t\tif (typeof sizes === 'object') {\n\t\t\tsizes = sizes as TableColumnSizes;\n\t\t\tconst classes: any = {};\n\t\t\tlet previousSize: TableColumnSizesKey | undefined;\n\n\t\t\tfor (let size in sizes) {\n\t\t\t\tif (!isTableColumnSizesKey(sizes, size)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (size === 'default') {\n\t\t\t\t\tif (sizes.default === 'hidden') {\n\t\t\t\t\t\tclasses['hidden'] = true;\n\t\t\t\t\t\tpreviousSize = size;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tclasses[`w-${sizes.default}/12`] = true;\n\t\t\t\t\tpreviousSize = size;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst currentValue = sizes[size];\n\t\t\t\tconst previousValue = previousSize ? sizes[previousSize] : null;\n\t\t\t\tif (\n\t\t\t\t\tcurrentValue !== 'hidden' &&\n\t\t\t\t\tpreviousValue &&\n\t\t\t\t\tpreviousValue === 'hidden'\n\t\t\t\t) {\n\t\t\t\t\tclasses[`${size}:flex`] = true;\n\t\t\t\t}\n\n\t\t\t\tif (currentValue === 'hidden') {\n\t\t\t\t\tclasses[`${size}:hidden`] = true;\n\t\t\t\t\tpreviousSize = size;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (currentValue === 12 || currentValue === 'full') {\n\t\t\t\t\tclasses[`${size}:w-full`] = true;\n\t\t\t\t}\n\n\t\t\t\tclasses[`${size}:w-${currentValue}/12`] = true;\n\t\t\t\tpreviousSize = size;\n\t\t\t}\n\n\t\t\treturn classes;\n\t\t}\n\n\t\tif (sizes === 12 || sizes === 'full') {\n\t\t\treturn {\n\t\t\t\t'w-full': true,\n\t\t\t};\n\t\t}\n\n\t\t// is a number.\n\t\treturn {\n\t\t\t[`w-${sizes}/12`]: true,\n\t\t};\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"table-cell.component.js","sourceRoot":"","sources":["../../../../src/components/molecules/table-cell/table-cell.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EACN,qBAAqB,GAKrB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IAAI,CAAC;QAChE,IACC,YAAY,KAAK,QAAQ;UACzB,aAAa;UACb,aAAa,KAAK,QAAQ,EACzB;UACD,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,IAAI,CAAC;SAC/B;QAED,IAAI,YAAY,KAAK,QAAQ,EAAE;UAC9B,OAAO,CAAC,GAAG,IAAI,SAAS,CAAC,GAAG,IAAI,CAAC;UACjC,YAAY,GAAG,IAAI,CAAC;UACpB,SAAS;SACT;QAED,IAAI,YAAY,KAAK,EAAE,IAAI,YAAY,KAAK,MAAM,EAAE;UACnD,OAAO,CAAC,GAAG,IAAI,SAAS,CAAC,GAAG,IAAI,CAAC;SACjC;QAED,OAAO,CAAC,GAAG,IAAI,MAAM,YAAY,KAAK,CAAC,GAAG,IAAI,CAAC;QAC/C,YAAY,GAAG,IAAI,CAAC;OACpB;MAED,OAAO,OAAO,CAAC;KACf;IAED,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,MAAM,EAAE;MACrC,OAAO;QACN,QAAQ,EAAE,IAAI;OACd,CAAC;KACF;IAED,eAAe;IACf,OAAO;MACN,CAAC,KAAK,KAAK,KAAK,CAAC,EAAE,IAAI;KACvB,CAAC;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, h, Host, Prop } from '@stencil/core';\nimport {\n\tisTableColumnSizesKey,\n\tTableColumnSizes,\n\tTableColumnSizesKey,\n\tTableDefinitionData,\n\tTableDefinitionTemplateFunc,\n} from '../../../types';\nimport { objectGetByPath } from '../../../utils';\nimport { TableColumn } from '../../helpers/table-column/table-column.component';\n\n@Component({\n\ttag: 'p-table-cell',\n\tstyleUrl: 'table-cell.component.scss',\n})\nexport class TableCell {\n\t/**\n\t * The variant of the column\n\t */\n\t@Prop() variant: 'default' | 'loading' | 'header' | 'actions' = 'default';\n\n\t/**\n\t * The index of the column\n\t */\n\t@Prop() index: number;\n\n\t/**\n\t * The index of the row\n\t */\n\t@Prop() rowIndex: number;\n\n\t/**\n\t * The definition of the table column\n\t */\n\t@Prop() definition?: TableColumn;\n\n\t/**\n\t * The item in question\n\t */\n\t@Prop() item: any;\n\n\t/**\n\t * The value of the column\n\t */\n\t@Prop() value: any;\n\n\t/**\n\t * Wether the table has actions\n\t */\n\t@Prop() tableHasActions: boolean = false;\n\n\t/**\n\t * The checkbox to show\n\t */\n\t@Prop() checkbox: any;\n\n\t/**\n\t * The template to show\n\t */\n\t@Prop() template: TableDefinitionTemplateFunc = ({\n\t\tvalue,\n\t}: TableDefinitionData) => value;\n\n\tget data(): TableDefinitionData | { value: string } {\n\t\tif (this.variant === 'header') {\n\t\t\treturn {\n\t\t\t\tvalue: this.value,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tvalue:\n\t\t\t\tthis.value ?? objectGetByPath(this.item, this.definition.path),\n\t\t\titem: this.item,\n\t\t\tindex: this.index,\n\t\t\trowIndex: this.rowIndex,\n\t\t};\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{\n\t\t\t\t\t'p-table-cell': true,\n\t\t\t\t\t[`variant-${this.variant}`]: true,\n\t\t\t\t\t...this._getColumnClasses(),\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{this.checkbox}\n\n\t\t\t\t{this._getContent()}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _getContent() {\n\t\tif (this.variant === 'loading') {\n\t\t\treturn (\n\t\t\t\t<p-loader variant=\"ghost\" class=\"h-6 w-full flex-1 rounded\" />\n\t\t\t);\n\t\t}\n\n\t\tif (this.variant === 'actions') {\n\t\t\treturn <slot name=\"actions\"></slot>;\n\t\t}\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclass={{\n\t\t\t\t\tflex: true,\n\t\t\t\t\t'justify-start': this.definition.align === 'start',\n\t\t\t\t\t'justify-center': this.definition.align === 'center',\n\t\t\t\t\t'justify-end': this.definition.align === 'end',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{this.variant === 'header' ? (\n\t\t\t\t\tthis.data.value\n\t\t\t\t) : this.definition.useSlot ? (\n\t\t\t\t\t<slot />\n\t\t\t\t) : (\n\t\t\t\t\tthis.template(this.data as TableDefinitionData)\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _getColumnClasses() {\n\t\tconst sizes = this.definition ? this._getSizes(this.definition) : {};\n\t\treturn {\n\t\t\t'justify-start':\n\t\t\t\t!this.definition?.align || this.definition?.align === 'start',\n\t\t\t'justify-center': this.definition?.align === 'center',\n\t\t\t'justify-end': this.definition?.align === 'end',\n\t\t\t'font-semibold':\n\t\t\t\tthis.variant !== 'header' && this.definition?.type === 'th',\n\t\t\t'text-storm-dark':\n\t\t\t\tthis.variant !== 'header' && this.definition?.type === 'th',\n\t\t\t'pr-4': this.definition.isLast === false,\n\t\t\t'group-hover:hidden':\n\t\t\t\tthis.definition.isLast &&\n\t\t\t\tthis.tableHasActions &&\n\t\t\t\tthis.variant !== 'actions',\n\t\t\t'group-hover:flex':\n\t\t\t\tthis.variant === 'actions' && this.tableHasActions,\n\t\t\thidden: this.variant === 'actions' && this.tableHasActions,\n\t\t\tflex: this.variant !== 'actions',\n\t\t\t...sizes,\n\t\t};\n\t}\n\n\t/*\n With this, we shall hack the system in ways no one would ever have thought.\n\n <div class=\"w-1/12 w-2/12 w-3/12 w-4/12 w-5/12 w-6/12 w-7/12 w-8/12 w-9/12 w-10/12 w-11/12 w-12/12\"></div>\n <div class=\"tablet:w-1/12 tablet:w-2/12 tablet:w-3/12 tablet:w-4/12 tablet:w-5/12 tablet:w-6/12 tablet:w-7/12 tablet:w-8/12 tablet:w-9/12 tablet:w-10/12 tablet:w-11/12 tablet:w-12/12\"></div>\n <div class=\"desktop-xs:w-1/12 desktop-xs:w-2/12 desktop-xs:w-3/12 desktop-xs:w-4/12 desktop-xs:w-5/12 desktop-xs:w-6/12 desktop-xs:w-7/12 desktop-xs:w-8/12 desktop-xs:w-9/12 desktop-xs:w-10/12 desktop-xs:w-11/12 desktop-xs:w-12/12\"></div>\n <div class=\"desktop-xs:w-1/12 desktop-xs:w-2/12 desktop-xs:w-3/12 desktop-xs:w-4/12 desktop-xs:w-5/12 desktop-xs:w-6/12 desktop-xs:w-7/12 desktop-xs:w-8/12 desktop-xs:w-9/12 desktop-xs:w-10/12 desktop-xs:w-11/12 desktop-xs:w-12/12\"></div>\n <div class=\"desktop-sm:w-1/12 desktop-sm:w-2/12 desktop-sm:w-3/12 desktop-sm:w-4/12 desktop-sm:w-5/12 desktop-sm:w-6/12 desktop-sm:w-7/12 desktop-sm:w-8/12 desktop-sm:w-9/12 desktop-sm:w-10/12 desktop-sm:w-11/12 desktop-sm:w-12/12\"></div>\n <div class=\"desktop:w-1/12 desktop:w-2/12 desktop:w-3/12 desktop:w-4/12 desktop:w-5/12 desktop:w-6/12 desktop:w-7/12 desktop:w-8/12 desktop:w-9/12 desktop:w-10/12 desktop:w-11/12 desktop:w-12/12\"></div>\n <div class=\"desktop-lg:w-1/12 desktop-lg:w-2/12 desktop-lg:w-3/12 desktop-lg:w-4/12 desktop-lg:w-5/12 desktop-lg:w-6/12 desktop-lg:w-7/12 desktop-lg:w-8/12 desktop-lg:w-9/12 desktop-lg:w-10/12 desktop-lg:w-11/12 desktop-lg:w-12/12\"></div>\n <div class=\"desktop-xl:w-1/12 desktop-xl:w-2/12 desktop-xl:w-3/12 desktop-xl:w-4/12 desktop-xl:w-5/12 desktop-xl:w-6/12 desktop-xl:w-7/12 desktop-xl:w-8/12 desktop-xl:w-9/12 desktop-xl:w-10/12 desktop-xl:w-11/12 desktop-xl:w-12/12\"></div>\n\n\n ⠀⠀⠀⠀⠀⣠⣴⣶⣿⣿⠿⣷⣶⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣷⠿⣿⣿⣶⣦⣀⠀⠀⠀⠀⠀\n ⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣶⣦⣬⡉⠒⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠚⢉⣥⣴⣾⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀\n ⠀⠀⠀⡾⠿⠛⠛⠛⠛⠿⢿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣿⠿⠿⠛⠛⠛⠛⠿⢧⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠻⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⡿⠟⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⣠⣤⠶⠶⠶⠰⠦⣤⣀⠀⠙⣷⠀⠀⠀⠀⠀⠀⠀⢠⡿⠋⢀⣀⣤⢴⠆⠲⠶⠶⣤⣄⠀⠀⠀⠀⠀⠀⠀\n ⠀⠘⣆⠀⠀⢠⣾⣫⣶⣾⣿⣿⣿⣿⣷⣯⣿⣦⠈⠃⡇⠀⠀⠀⠀⢸⠘⢁⣶⣿⣵⣾⣿⣿⣿⣿⣷⣦⣝⣷⡄⠀⠀⡰⠂⠀\n ⠀⠀⣨⣷⣶⣿⣧⣛⣛⠿⠿⣿⢿⣿⣿⣛⣿⡿⠀⠀⡇⠀⠀⠀⠀⢸⠀⠈⢿⣟⣛⠿⢿⡿⢿⢿⢿⣛⣫⣼⡿⣶⣾⣅⡀⠀\n ⢀⡼⠋⠁⠀⠀⠈⠉⠛⠛⠻⠟⠸⠛⠋⠉⠁⠀⠀⢸⡇⠀⠀⠄⠀⢸⡄⠀⠀⠈⠉⠙⠛⠃⠻⠛⠛⠛⠉⠁⠀⠀⠈⠙⢧⡀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⡇⢠⠀⠀⠀⢸⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⡇⠀⠀⠀⠀⢸⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⠟⠁⣿⠇⠀⠀⠀⠀⢸⡇⠙⢿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠰⣄⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⠖⡾⠁⠀⠀⣿⠀⠀⠀⠀⠀⠘⣿⠀⠀⠙⡇⢸⣷⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⣰⠄⠀\n ⠀⠀⢻⣷⡦⣤⣤⣤⡴⠶⠿⠛⠉⠁⠀⢳⠀⢠⡀⢿⣀⠀⠀⠀⠀⣠⡟⢀⣀⢠⠇⠀⠈⠙⠛⠷⠶⢦⣤⣤⣤⢴⣾⡏⠀⠀\n ⠀⠀⠈⣿⣧⠙⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⢊⣙⠛⠒⠒⢛⣋⡚⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⡿⠁⣾⡿⠀⠀⠀\n ⠀⠀⠀⠘⣿⣇⠈⢿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⡿⢿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⡟⠁⣼⡿⠁⠀⠀⠀\n ⠀⠀⠀⠀⠘⣿⣦⠀⠻⣿⣷⣦⣤⣤⣶⣶⣶⣿⣿⣿⣿⠏⠀⠀⠻⣿⣿⣿⣿⣶⣶⣶⣦⣤⣴⣿⣿⠏⢀⣼⡿⠁⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠘⢿⣷⣄⠙⠻⠿⠿⠿⠿⠿⢿⣿⣿⣿⣁⣀⣀⣀⣀⣙⣿⣿⣿⠿⠿⠿⠿⠿⠿⠟⠁⣠⣿⡿⠁⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠈⠻⣯⠙⢦⣀⠀⠀⠀⠀⠀⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠀⠀⠀⠀⠀⣠⠴⢋⣾⠟⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠙⢧⡀⠈⠉⠒⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠐⠒⠉⠁⢀⡾⠃⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠳⣄⠀⠀⠀⠀⠀⠀⠀⠀⠻⣿⣿⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⣠⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢦⡀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⢀⡴⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n */\n\tprivate _getSizes({ sizes }: TableColumn) {\n\t\tif (sizes === 'auto' || !sizes) {\n\t\t\treturn {\n\t\t\t\t'w-auto': true,\n\t\t\t};\n\t\t}\n\n\t\tif (sizes === 'hidden') {\n\t\t\treturn {\n\t\t\t\thidden: true,\n\t\t\t};\n\t\t}\n\n\t\tif (typeof sizes === 'object') {\n\t\t\tsizes = sizes as TableColumnSizes;\n\t\t\tconst classes: any = {};\n\t\t\tlet previousSize: TableColumnSizesKey | undefined;\n\n\t\t\tfor (let size in sizes) {\n\t\t\t\tif (!isTableColumnSizesKey(sizes, size)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (size === 'default') {\n\t\t\t\t\tif (sizes.default === 'hidden') {\n\t\t\t\t\t\tclasses['hidden'] = true;\n\t\t\t\t\t\tpreviousSize = size;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tclasses[`w-${sizes.default}/12`] = true;\n\t\t\t\t\tpreviousSize = size;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst currentValue = sizes[size];\n\t\t\t\tconst previousValue = previousSize ? sizes[previousSize] : null;\n\t\t\t\tif (\n\t\t\t\t\tcurrentValue !== 'hidden' &&\n\t\t\t\t\tpreviousValue &&\n\t\t\t\t\tpreviousValue === 'hidden'\n\t\t\t\t) {\n\t\t\t\t\tclasses[`${size}:flex`] = true;\n\t\t\t\t}\n\n\t\t\t\tif (currentValue === 'hidden') {\n\t\t\t\t\tclasses[`${size}:hidden`] = true;\n\t\t\t\t\tpreviousSize = size;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (currentValue === 12 || currentValue === 'full') {\n\t\t\t\t\tclasses[`${size}:w-full`] = true;\n\t\t\t\t}\n\n\t\t\t\tclasses[`${size}:w-${currentValue}/12`] = true;\n\t\t\t\tpreviousSize = size;\n\t\t\t}\n\n\t\t\treturn classes;\n\t\t}\n\n\t\tif (sizes === 12 || sizes === 'full') {\n\t\t\treturn {\n\t\t\t\t'w-full': true,\n\t\t\t};\n\t\t}\n\n\t\t// is a number.\n\t\treturn {\n\t\t\t[`w-${sizes}/12`]: true,\n\t\t};\n\t}\n}\n"]}
|