@paperless/core 1.9.4 → 1.11.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 +26 -0
- package/dist/build/p-2540301a.entry.js +3 -0
- package/dist/build/p-2540301a.entry.js.map +1 -0
- package/dist/build/p-2cb55f24.entry.js +2 -0
- package/dist/build/p-2cb55f24.entry.js.map +1 -0
- package/dist/build/p-fac13366.entry.js +2 -0
- package/dist/build/p-fac13366.entry.js.map +1 -0
- package/dist/build/paperless.css +1 -1
- 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/loader.cjs.js +1 -1
- package/dist/cjs/p-cropper.cjs.entry.js +2815 -0
- package/dist/cjs/p-cropper.cjs.entry.js.map +1 -0
- package/dist/cjs/p-modal-body_4.cjs.entry.js +3 -2
- package/dist/cjs/p-modal-body_4.cjs.entry.js.map +1 -1
- package/dist/cjs/p-modal.cjs.entry.js +2 -1
- package/dist/cjs/p-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/atoms/modal-body/modal-body.component.css +1 -1
- package/dist/collection/components/atoms/modal-body/modal-body.component.js +20 -1
- package/dist/collection/components/atoms/modal-body/modal-body.component.js.map +1 -1
- package/dist/collection/components/molecules/cropper/cropper.component.css +1 -0
- package/dist/collection/components/molecules/cropper/cropper.component.js +235 -0
- package/dist/collection/components/molecules/cropper/cropper.component.js.map +1 -0
- package/dist/collection/components/molecules/cropper/test/cropper.component.e2e.js +26 -0
- package/dist/collection/components/molecules/cropper/test/cropper.component.e2e.js.map +1 -0
- package/dist/collection/components/molecules/cropper/test/cropper.component.spec.js +17 -0
- package/dist/collection/components/molecules/cropper/test/cropper.component.spec.js.map +1 -0
- package/dist/collection/components/organisms/modal/modal.component.js +21 -2
- package/dist/collection/components/organisms/modal/modal.component.js.map +1 -1
- package/dist/components/modal-body.component.js +5 -3
- package/dist/components/modal-body.component.js.map +1 -1
- package/dist/components/p-cropper.d.ts +11 -0
- package/dist/components/p-cropper.js +2841 -0
- package/dist/components/p-cropper.js.map +1 -0
- package/dist/components/p-modal.js +3 -1
- package/dist/components/p-modal.js.map +1 -1
- package/dist/esm/index-7b917f6b.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-cropper.entry.js +2811 -0
- package/dist/esm/p-cropper.entry.js.map +1 -0
- package/dist/esm/p-modal-body_4.entry.js +3 -2
- package/dist/esm/p-modal-body_4.entry.js.map +1 -1
- package/dist/esm/p-modal.entry.js +2 -1
- package/dist/esm/p-modal.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/p-2540301a.entry.js +3 -0
- package/dist/paperless/p-2540301a.entry.js.map +1 -0
- package/dist/paperless/p-2cb55f24.entry.js +2 -0
- package/dist/paperless/p-2cb55f24.entry.js.map +1 -0
- package/dist/paperless/p-fac13366.entry.js +2 -0
- package/dist/paperless/p-fac13366.entry.js.map +1 -0
- package/dist/paperless/paperless.css +35 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/paperless/paperless.esm.js.map +1 -1
- package/dist/style/form/_range.scss +13 -0
- package/dist/style/form/index.scss +1 -0
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/atoms/modal-body/modal-body.component.d.ts +4 -0
- package/dist/types/components/molecules/cropper/cropper.component.d.ts +38 -0
- package/dist/types/components/organisms/modal/modal.component.d.ts +4 -0
- package/dist/types/components.d.ts +61 -0
- package/hydrate/index.js +2834 -9
- package/package.json +3 -1
- package/dist/build/p-997962db.entry.js +0 -2
- package/dist/build/p-997962db.entry.js.map +0 -1
- package/dist/build/p-b7893a63.entry.js +0 -2
- package/dist/build/p-b7893a63.entry.js.map +0 -1
- package/dist/paperless/p-997962db.entry.js +0 -2
- package/dist/paperless/p-997962db.entry.js.map +0 -1
- package/dist/paperless/p-b7893a63.entry.js +0 -2
- package/dist/paperless/p-b7893a63.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-modal.entry.cjs.js","mappings":";;;;;;MAea,KAAK;;;;;
|
|
1
|
+
{"file":"p-modal.entry.cjs.js","mappings":";;;;;;MAea,KAAK;;;;;IAwEN,mBAAc,GAAG,KAAK,CAAC;IACvB,mBAAc,GAAG,KAAK,CAAC;gBArEW,IAAI;mBAKP,SAAS;;gBAUxB,KAAK;qBAKA,KAAK;qBAKd,IAAI;4BAKG,KAAK;8BAKH,IAAI;sBAKH,IAAI;mBAKP,IAAI;oBA0BH,KAAK;;EAEjC,iBAAiB;IACb,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAC1C,0BAA0B,CAC7B,CAAC;IACF,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAC1C,0BAA0B,CAC7B,CAAC;GACL;EAED,MAAM;;IACF,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;MACZ,OAAO;KACV;IAED,MAAM,aAAa,GAAGA,kBAAM,IAAI,EAAC,QAAQ,GAAG,CAAC;IAC7C,MAAM,WAAW,GAAGA,kBAAM,IAAI,EAAC,SAAS,GAAG,CAAC;IAC5C,MAAM,aAAa,GAAGA,kBAAM,IAAI,EAAC,QAAQ,GAAG,CAAC;IAE7C,QACIA,QAACC,UAAI,IAAC,KAAK,EAAC,SAAS,IACjBD,wBACI,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,SAAS,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,MAAM,CAAC,EACjD,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,UAAU,EAAE,IAAI,CAAC,UAAU,IAE3BA,+BAAmB,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,IACrD,CAAC,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,KAAI,IAAI,CAAC,cAAc,MACxCA,4BACI,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,OAAO,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,IAErC,IAAI,CAAC,cAAc;QACd,aAAa;QACb,IAAI,CAAC,MAAM,CACJ,CACpB,EACDA,0BACI,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,OAAO,EAAE,CAAC,IAAI,CAAC,cAAc,EAC7B,OAAO,EAAE,IAAI,CAAC,OAAO,IAEpB,WAAW,CACD,EACd,IAAI,CAAC,cAAc,KAChBA,gCAAiB,aAAa,CAAkB,CACnD,CACe,CACX,CACV,EACT;GACL;EAEO,cAAc,CAAC,EAAc;IACjC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;MAC1B,OAAO;KACV;IAED,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;GAClB;EAEM,KAAK,CAAC,EAAc;IACvB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAE3B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IAErB,UAAU,CAAC;MACP,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;MAClB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;MAEtB,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;KACtB,EAAE,GAAG,CAAC,CAAC;GACX;;;;;;","names":["h","Host"],"sources":["src/components/organisms/modal/modal.component.tsx"],"sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\n\n@Component({\n tag: 'p-modal',\n shadow: true,\n})\nexport class Modal {\n /**\n * The size of the modal container\n */\n @Prop() size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\n\n /**\n * The variant of the modal body\n */\n @Prop() variant: 'default' | 'table' = 'default';\n\n /**\n * The Header of the modal\n */\n @Prop() header?: string;\n\n /**\n * Wether to show the modal or not\n */\n @Prop() show: boolean = false;\n\n /**\n * Wether to apply blur to the backdrop\n */\n @Prop() applyBlur: boolean = false;\n\n /**\n * Wether to show the close button in the header\n */\n @Prop() showClose = true;\n\n /**\n * Wether to show the footer on mobile\n */\n @Prop() showMobileFooter = false;\n\n /**\n * Wether to hide the modal when the backdrop is clicked\n */\n @Prop() backdropClickClose = true;\n\n /**\n * Wether we should scroll lock the body\n */\n @Prop() scrollLock: boolean = true;\n\n /**\n * Wether the body should have padding\n */\n @Prop() padding: boolean = true;\n\n /**\n * Close click event\n */\n @Event({\n bubbles: false,\n })\n closeClicked: EventEmitter<MouseEvent>;\n\n /**\n * Closed event\n */\n @Event({\n bubbles: false,\n })\n closed: EventEmitter<null>;\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n private _hasFooterSlot = false;\n private _hasHeaderSlot = false;\n\n @State() private _closing = false;\n\n componentWillLoad() {\n this._hasFooterSlot = !!this._el.querySelector(\n ':scope > [slot=\"footer\"]'\n );\n this._hasHeaderSlot = !!this._el.querySelector(\n ':scope > [slot=\"header\"]'\n );\n }\n\n render() {\n if (!this.show) {\n return;\n }\n\n const headerContent = <slot name=\"header\" />;\n const bodyContent = <slot name=\"content\" />;\n const footerContent = <slot name=\"footer\" />;\n\n return (\n <Host class=\"p-modal\">\n <p-backdrop\n applyBlur={this.applyBlur}\n onClicked={(ev) => this._backdropClick(ev.detail)}\n closing={this._closing}\n scrollLock={this.scrollLock}\n >\n <p-modal-container size={this.size} closing={this._closing}>\n {(this.header?.length || this._hasHeaderSlot) && (\n <p-modal-header\n showClose={this.showClose}\n onClose={(ev) => this.close(ev.detail)}\n >\n {this._hasHeaderSlot\n ? headerContent\n : this.header}\n </p-modal-header>\n )}\n <p-modal-body\n variant={this.variant}\n rounded={!this._hasFooterSlot}\n padding={this.padding}\n >\n {bodyContent}\n </p-modal-body>\n {this._hasFooterSlot && (\n <p-modal-footer>{footerContent}</p-modal-footer>\n )}\n </p-modal-container>\n </p-backdrop>\n </Host>\n );\n }\n\n private _backdropClick(ev: MouseEvent) {\n if (!this.backdropClickClose) {\n return;\n }\n\n this.close(ev);\n }\n\n public close(ev: MouseEvent) {\n this.closeClicked.emit(ev);\n\n this._closing = true;\n\n setTimeout(() => {\n this.show = false;\n this._closing = false;\n\n this.closed.emit();\n }, 550);\n }\n}\n"],"version":3}
|
|
@@ -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],\"href\":[1],\"target\":[1],\"size\":[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\"],\"enableRowClick\":[4,\"enable-row-click\"],\"selectedRows\":[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],\"enableEdit\":[4,\"enable-edit\"],\"editButtonLoading\":[4,\"edit-button-loading\"],\"editButtonIcon\":[1,\"edit-button-icon\"],\"editButtonText\":[1,\"edit-button-text\"],\"editButtonTemplate\":[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],\"_locales\":[32],\"_columns\":[32],\"_items\":[32]},[[16,\"localeChanged\",\"_setLocales\"],[16,\"tableDefinitionChanged\",\"onTableDefinitionUpdated\"],[4,\"keydown\",\"keyDown\"],[4,\"keyup\",\"keyUp\"],[4,\"visibilitychange\",\"visibilityChange\"]],{\"items\":[\"_parseItems\"]}]]],[\"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\"],\"_closing\":[32]}]]],[\"p-select.cjs\",[[0,\"p-select\",{\"items\":[1],\"icon\":[1],\"query\":[1],\"placeholder\":[1],\"autocompletePlaceholder\":[1,\"autocomplete-placeholder\"],\"value\":[8],\"displayKey\":[1,\"display-key\"],\"valueKey\":[1,\"value-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\"],\"keepQuery\":[4,\"keep-query\"],\"asyncFilter\":[4,\"async-filter\"],\"loading\":[4],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"_showDropdown\":[32],\"_selectedItem\":[32],\"_isAutoCompleting\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"_valueChange\"],\"items\":[\"itemChanges\"],\"_showDropdown\":[\"_showDropdownChanges\"]}]]],[\"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]}]]],[\"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-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-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\"]},null,{\"activeStep\":[\"_generateSteps\"]}]]],[\"p-stepper-item.cjs\",[[1,\"p-stepper-item\",{\"align\":[513],\"direction\":[513],\"contentPosition\":[513,\"content-position\"],\"finished\":[516],\"active\":[516]}]]],[\"p-divider.cjs\",[[1,\"p-divider\"]]],[\"p-tab-group.cjs\",[[1,\"p-tab-group\"]]],[\"p-avatar.cjs\",[[0,\"p-avatar\",{\"variant\":[513],\"size\":[513],\"defaultImage\":[1,\"default-image\"],\"src\":[1],\"_src\":[32]},null,{\"src\":[\"onSrchChange\"]}]]],[\"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-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]}],[4,\"p-modal-container\",{\"size\":[1],\"closing\":[4]}]]],[\"p-label_3.cjs\",[[1,\"p-label\",{\"variant\":[513],\"behavior\":[513],\"icon\":[513],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"size\":[513],\"keepMobileContent\":[516,\"keep-mobile-content\"]}],[1,\"p-segment-item\",{\"active\":[4],\"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\":[4]}]]],[\"p-dropdown_2.cjs\",[[1,\"p-dropdown-menu-item\",{\"active\":[4],\"enableHover\":[4,\"enable-hover\"],\"icon\":[1]}],[1,\"p-dropdown\",{\"placement\":[513],\"strategy\":[1],\"show\":[4],\"calculateWidth\":[4,\"calculate-width\"],\"applyMaxWidth\":[4,\"apply-max-width\"],\"applyFullWidth\":[4,\"apply-full-width\"],\"scrollable\":[4],\"insideClick\":[4,\"inside-click\"],\"disableTriggerClick\":[4,\"disable-trigger-click\"],\"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],\"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\"]]]]],[\"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],\"focusMethod\":[1,\"focus-method\"],\"_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-illustration_6.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],\"enableEdit\":[4,\"enable-edit\"],\"editLoading\":[4,\"edit-loading\"],\"editIcon\":[1,\"edit-icon\"],\"editText\":[1,\"edit-text\"],\"canEdit\":[1028,\"can-edit\"],\"editButtonTemplate\":[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\"]}],[0,\"p-illustration\",{\"variant\":[1]}],[1,\"p-table-container\"]]]]"), options);
|
|
20
|
+
return index.bootstrapLazy(JSON.parse("[[\"p-button_3.cjs\",[[4,\"p-button\",{\"variant\":[1],\"href\":[1],\"target\":[1],\"size\":[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\"],\"enableRowClick\":[4,\"enable-row-click\"],\"selectedRows\":[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],\"enableEdit\":[4,\"enable-edit\"],\"editButtonLoading\":[4,\"edit-button-loading\"],\"editButtonIcon\":[1,\"edit-button-icon\"],\"editButtonText\":[1,\"edit-button-text\"],\"editButtonTemplate\":[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],\"_locales\":[32],\"_columns\":[32],\"_items\":[32]},[[16,\"localeChanged\",\"_setLocales\"],[16,\"tableDefinitionChanged\",\"onTableDefinitionUpdated\"],[4,\"keydown\",\"keyDown\"],[4,\"keyup\",\"keyUp\"],[4,\"visibilitychange\",\"visibilityChange\"]],{\"items\":[\"_parseItems\"]}]]],[\"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]}]]],[\"p-select.cjs\",[[0,\"p-select\",{\"items\":[1],\"icon\":[1],\"query\":[1],\"placeholder\":[1],\"autocompletePlaceholder\":[1,\"autocomplete-placeholder\"],\"value\":[8],\"displayKey\":[1,\"display-key\"],\"valueKey\":[1,\"value-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\"],\"keepQuery\":[4,\"keep-query\"],\"asyncFilter\":[4,\"async-filter\"],\"loading\":[4],\"size\":[1],\"prefix\":[1],\"label\":[1],\"helper\":[1],\"required\":[516],\"error\":[513],\"disabled\":[516],\"_showDropdown\":[32],\"_selectedItem\":[32],\"_isAutoCompleting\":[32]},[[6,\"click\",\"documentClickHandler\"]],{\"value\":[\"_valueChange\"],\"items\":[\"itemChanges\"],\"_showDropdown\":[\"_showDropdownChanges\"]}]]],[\"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]}]]],[\"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\"]]],[\"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\"]},null,{\"activeStep\":[\"_generateSteps\"]}]]],[\"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.cjs\",[[0,\"p-avatar\",{\"variant\":[513],\"size\":[513],\"defaultImage\":[1,\"default-image\"],\"src\":[1],\"_src\":[32]},null,{\"src\":[\"onSrchChange\"]}]]],[\"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-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],\"icon\":[513],\"iconFlip\":[1,\"icon-flip\"],\"iconRotate\":[2,\"icon-rotate\"],\"size\":[513],\"keepMobileContent\":[516,\"keep-mobile-content\"]}],[1,\"p-segment-item\",{\"active\":[4],\"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\":[4]}]]],[\"p-dropdown_2.cjs\",[[1,\"p-dropdown-menu-item\",{\"active\":[4],\"enableHover\":[4,\"enable-hover\"],\"icon\":[1]}],[1,\"p-dropdown\",{\"placement\":[513],\"strategy\":[1],\"show\":[4],\"calculateWidth\":[4,\"calculate-width\"],\"applyMaxWidth\":[4,\"apply-max-width\"],\"applyFullWidth\":[4,\"apply-full-width\"],\"scrollable\":[4],\"insideClick\":[4,\"inside-click\"],\"disableTriggerClick\":[4,\"disable-trigger-click\"],\"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],\"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\"]]]]],[\"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],\"focusMethod\":[1,\"focus-method\"],\"_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-illustration_6.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],\"enableEdit\":[4,\"enable-edit\"],\"editLoading\":[4,\"edit-loading\"],\"editIcon\":[1,\"edit-icon\"],\"editText\":[1,\"edit-text\"],\"canEdit\":[1028,\"can-edit\"],\"editButtonTemplate\":[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\"]}],[0,\"p-illustration\",{\"variant\":[1]}],[1,\"p-table-container\"]]]]"), options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"components/molecules/attachment/attachment.component.js",
|
|
46
46
|
"components/molecules/calendar/calendar.component.js",
|
|
47
47
|
"components/molecules/content-slider/content-slider.component.js",
|
|
48
|
+
"components/molecules/cropper/cropper.component.js",
|
|
48
49
|
"components/molecules/datepicker/datepicker.component.js",
|
|
49
50
|
"components/molecules/dropdown/dropdown.component.js",
|
|
50
51
|
"components/molecules/input-error/input-error.component.js",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.rounded-b-none{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}*{box-sizing:border-box}:host{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:1.5rem}@media (min-width:40rem){:host{padding-left:2.5rem;padding-right:2.5rem}}@media (min-width:64rem){:host{padding-left:3.5rem;padding-right:3.5rem}}:host(.variant-table){padding-left:1.5rem;padding-right:1.5rem}:host(.is-rounded){border-bottom-left-radius:0;border-bottom-right-radius:0}@media (min-width:64rem){:host(.is-rounded){border-bottom-left-radius:.75rem;border-bottom-right-radius:.75rem}}
|
|
1
|
+
.rounded-b-none{border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}.px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}.py-6{padding-bottom:1.5rem!important;padding-top:1.5rem!important}*{box-sizing:border-box}:host{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:1.5rem}@media (min-width:40rem){:host{padding-left:2.5rem;padding-right:2.5rem}}@media (min-width:64rem){:host{padding-left:3.5rem;padding-right:3.5rem}}:host(.variant-table){padding-left:1.5rem;padding-right:1.5rem}:host(.is-rounded){border-bottom-left-radius:0;border-bottom-right-radius:0}@media (min-width:64rem){:host(.is-rounded){border-bottom-left-radius:.75rem;border-bottom-right-radius:.75rem}}:host(.no-padding){padding:0}@media (min-width:40rem){.tablet\:px-10{padding-left:2.5rem!important;padding-right:2.5rem!important}}.static{position:static!important}.rounded{border-radius:.25rem!important}
|
|
@@ -3,9 +3,10 @@ export class ModalBody {
|
|
|
3
3
|
constructor() {
|
|
4
4
|
this.variant = 'default';
|
|
5
5
|
this.rounded = false;
|
|
6
|
+
this.padding = true;
|
|
6
7
|
}
|
|
7
8
|
render() {
|
|
8
|
-
return (h(Host, { class: `p-modal-body variant-${this.variant} ${this.rounded && 'is-rounded'}` }, h("slot", null)));
|
|
9
|
+
return (h(Host, { class: `p-modal-body variant-${this.variant} ${this.rounded && 'is-rounded'} ${!this.padding && 'no-padding'}` }, h("slot", null)));
|
|
9
10
|
}
|
|
10
11
|
static get is() { return "p-modal-body"; }
|
|
11
12
|
static get encapsulation() { return "shadow"; }
|
|
@@ -56,6 +57,24 @@ export class ModalBody {
|
|
|
56
57
|
"attribute": "rounded",
|
|
57
58
|
"reflect": false,
|
|
58
59
|
"defaultValue": "false"
|
|
60
|
+
},
|
|
61
|
+
"padding": {
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"mutable": false,
|
|
64
|
+
"complexType": {
|
|
65
|
+
"original": "boolean",
|
|
66
|
+
"resolved": "boolean",
|
|
67
|
+
"references": {}
|
|
68
|
+
},
|
|
69
|
+
"required": false,
|
|
70
|
+
"optional": false,
|
|
71
|
+
"docs": {
|
|
72
|
+
"tags": [],
|
|
73
|
+
"text": "Wether the body should have padding"
|
|
74
|
+
},
|
|
75
|
+
"attribute": "padding",
|
|
76
|
+
"reflect": false,
|
|
77
|
+
"defaultValue": "true"
|
|
59
78
|
}
|
|
60
79
|
};
|
|
61
80
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-body.component.js","sourceRoot":"","sources":["../../../../src/components/atoms/modal-body/modal-body.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,SAAS;;mBAIqB,SAAS;mBAKrB,KAAK;;
|
|
1
|
+
{"version":3,"file":"modal-body.component.js","sourceRoot":"","sources":["../../../../src/components/atoms/modal-body/modal-body.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,SAAS;;mBAIqB,SAAS;mBAKrB,KAAK;mBAKL,IAAI;;EAE/B,MAAM;IACF,OAAO,CACH,EAAC,IAAI,IACD,KAAK,EAAE,wBAAwB,IAAI,CAAC,OAAO,IACvC,IAAI,CAAC,OAAO,IAAI,YACpB,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,YAAY,EAAE;MAEnC,eAAQ,CACL,CACV,CAAC;EACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n tag: 'p-modal-body',\n styleUrl: 'modal-body.component.scss',\n shadow: true,\n})\nexport class ModalBody {\n /**\n * The variant of the modal body\n */\n @Prop() variant: 'default' | 'table' = 'default';\n\n /**\n * Wether the modal body should be rounded at the bottom\n */\n @Prop() rounded: boolean = false;\n\n /**\n * Wether the body should have padding\n */\n @Prop() padding: boolean = true;\n\n render() {\n return (\n <Host\n class={`p-modal-body variant-${this.variant} ${\n this.rounded && 'is-rounded'\n } ${!this.padding && 'no-padding'}`}\n >\n <slot />\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.relative{position:relative!important}.mb-6{margin-bottom:1.5rem!important}.flex{display:flex!important}.h-4{height:1rem!important}.h-\[2px\]{height:2px!important}.w-4{width:1rem!important}.w-full{width:100%!important}.appearance-none{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-between{justify-content:space-between!important}.rounded-round{border-radius:100%!important}.border-0{border-width:0!important}*{box-sizing:border-box}:host{align-items:center;display:flex;flex-direction:column;gap:1.5rem;justify-content:space-between;margin-bottom:1.5rem;width:100%}:host .p-input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;position:relative}:host .p-input[type=range]::-moz-range-track,:host .p-input[type=range]::-webkit-slider-runnable-track{--tw-bg-opacity:1;background-color:rgb(218 230 240/var(--tw-bg-opacity));height:2px}:host .p-input[type=range]::-moz-range-thumb,:host .p-input[type=range]::-webkit-slider-thumb{--tw-bg-opacity:1;background-color:rgb(82 138 250/var(--tw-bg-opacity));border-radius:100%;border-width:0;height:1rem;width:1rem}.static{position:static!important}.hidden{display:none!important}.h-\[17\.5rem\]{height:17.5rem!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.resize{resize:both!important}.gap-2{gap:.5rem!important}.rounded{border-radius:.25rem!important}.border-b{border-bottom-width:1px!important}.border-solid{border-style:solid!important}.border-mystic-medium{--tw-border-opacity:1!important;border-color:rgb(227 236 243/var(--tw-border-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.px-14{padding-left:3.5rem!important;padding-right:3.5rem!important}.text-storm-vague{--tw-text-opacity:1!important;color:rgb(152 154 183/var(--tw-text-opacity))!important}@media (min-width:40rem){.tablet\:max-w-xs{max-width:20rem!important}.tablet\:px-1{padding-left:.25rem!important;padding-right:.25rem!important}}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { Host, h, } from "@stencil/core";
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import "cropperjs";
|
|
4
|
+
export class Cropper {
|
|
5
|
+
constructor() {
|
|
6
|
+
this._maxScale = 0;
|
|
7
|
+
this._minScale = 0;
|
|
8
|
+
this.variant = 'user';
|
|
9
|
+
this.value = undefined;
|
|
10
|
+
this.returnType = 'base64';
|
|
11
|
+
this._loaded = false;
|
|
12
|
+
this._currentScale = 0;
|
|
13
|
+
}
|
|
14
|
+
onResize() {
|
|
15
|
+
if (this._resizeDebounceTimeout) {
|
|
16
|
+
clearTimeout(this._resizeDebounceTimeout);
|
|
17
|
+
}
|
|
18
|
+
this._resizeDebounceTimeout = setTimeout(() => {
|
|
19
|
+
this._selectionRef.$center();
|
|
20
|
+
this._imageRef.$center();
|
|
21
|
+
}, 200);
|
|
22
|
+
}
|
|
23
|
+
componentDidLoad() {
|
|
24
|
+
setTimeout(() => {
|
|
25
|
+
this._loaded = true;
|
|
26
|
+
}, 200);
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
return (h(Host, { class: "p-cropper" }, this._loaded && (h("cropper-canvas", { class: "h-[17.5rem] w-full border-0 border-b border-solid border-mystic-medium bg-white", onAction: () => this._onAction() }, h("cropper-image", { src: this.value, alt: "Picture", ref: (ref) => this._setImageRef(ref), scalable: true, crossorigin: "anonymous" }), h("cropper-shade", { class: clsx({
|
|
30
|
+
'rounded-round': this.variant === 'user',
|
|
31
|
+
rounded: this.variant === 'company',
|
|
32
|
+
}), "theme-color": "rgba(255, 255, 255, 0.5)", hidden: true }), h("cropper-selection", { "initial-coverage": "0.7", "aspect-ratio": "1", ref: (ref) => (this._selectionRef = ref) }), h("cropper-handle", { action: "move", plain: true }))), h("div", { class: "flex w-full items-center gap-2 px-14 text-storm-vague tablet:max-w-xs tablet:px-1" }, h("p-icon", { variant: "minus" }), h("input", { class: "p-input w-full", type: "range", min: "0", max: "100", value: this._currentScale, onInput: (ev) => this._onInput(ev.target.value), step: "0.5" }), h("p-icon", { variant: "plus" }))));
|
|
33
|
+
}
|
|
34
|
+
_setImageRef(ref) {
|
|
35
|
+
if (this._imageRef) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this._imageRef = ref;
|
|
39
|
+
this._imageRef.$ready((image) => setTimeout(() => this._setInitialState(image), 200));
|
|
40
|
+
}
|
|
41
|
+
_setInitialState(image) {
|
|
42
|
+
let scale;
|
|
43
|
+
if (image.naturalWidth > image.naturalHeight) {
|
|
44
|
+
// set scale by height
|
|
45
|
+
scale = 200 / image.naturalHeight;
|
|
46
|
+
}
|
|
47
|
+
if (image.naturalHeight >= image.naturalWidth) {
|
|
48
|
+
// set scale by width
|
|
49
|
+
scale = 200 / image.naturalWidth;
|
|
50
|
+
}
|
|
51
|
+
const current = this._imageRef.$getTransform();
|
|
52
|
+
this._minScale = scale;
|
|
53
|
+
this._maxScale = current[0];
|
|
54
|
+
this._selectionRef.$resize('nw-resize', 200, 200, 1);
|
|
55
|
+
this._selectionRef.$center();
|
|
56
|
+
this._setScale(scale);
|
|
57
|
+
this._toCanvas();
|
|
58
|
+
}
|
|
59
|
+
_onAction() {
|
|
60
|
+
this._setCurrentScale();
|
|
61
|
+
this._toCanvas();
|
|
62
|
+
}
|
|
63
|
+
_setScale(scale, setCenter = true, setCurrentScale = true) {
|
|
64
|
+
const transform = this._imageRef.$getTransform();
|
|
65
|
+
this._imageRef.$setTransform([
|
|
66
|
+
scale,
|
|
67
|
+
0,
|
|
68
|
+
0,
|
|
69
|
+
scale,
|
|
70
|
+
transform[4],
|
|
71
|
+
transform[5],
|
|
72
|
+
]);
|
|
73
|
+
if (setCenter) {
|
|
74
|
+
this._imageRef.$center();
|
|
75
|
+
}
|
|
76
|
+
if (setCurrentScale) {
|
|
77
|
+
this._setCurrentScale();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
_setCurrentScale() {
|
|
81
|
+
const transform = this._imageRef.$getTransform();
|
|
82
|
+
const current = transform[0];
|
|
83
|
+
if (current < this._minScale) {
|
|
84
|
+
this._setScale(this._minScale, true, false);
|
|
85
|
+
this._currentScale = 0;
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (current > this._maxScale) {
|
|
89
|
+
this._setScale(this._maxScale, true, false);
|
|
90
|
+
this._currentScale = 100;
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (current === this._minScale) {
|
|
94
|
+
this._currentScale = 0;
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (current === this._maxScale) {
|
|
98
|
+
this._currentScale = 100;
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const minMaxDiff = this._maxScale - this._minScale;
|
|
102
|
+
const currentDiff = current - this._minScale;
|
|
103
|
+
const percentage = (currentDiff / minMaxDiff) * 100;
|
|
104
|
+
this._currentScale = percentage;
|
|
105
|
+
}
|
|
106
|
+
_onInput(value) {
|
|
107
|
+
const transform = this._imageRef.$getTransform();
|
|
108
|
+
const current = transform[0];
|
|
109
|
+
const minMaxDiff = this._maxScale - this._minScale;
|
|
110
|
+
const toSet = minMaxDiff * (value / 100);
|
|
111
|
+
if (toSet === current) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
this._setScale(toSet + this._minScale, false, false);
|
|
115
|
+
this._currentScale = value;
|
|
116
|
+
this._toCanvas();
|
|
117
|
+
}
|
|
118
|
+
_toCanvas() {
|
|
119
|
+
if (this._toCanvasDebounceTimeout) {
|
|
120
|
+
clearTimeout(this._toCanvasDebounceTimeout);
|
|
121
|
+
}
|
|
122
|
+
this._toCanvasDebounceTimeout = setTimeout(async () => {
|
|
123
|
+
const canvas = await this._selectionRef.$toCanvas();
|
|
124
|
+
if (this.returnType === 'canvas') {
|
|
125
|
+
this.valueChange.emit(canvas);
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const data = canvas.toDataURL('image/png');
|
|
129
|
+
this.valueChange.emit(data);
|
|
130
|
+
}, 200);
|
|
131
|
+
}
|
|
132
|
+
static get is() { return "p-cropper"; }
|
|
133
|
+
static get encapsulation() { return "shadow"; }
|
|
134
|
+
static get originalStyleUrls() {
|
|
135
|
+
return {
|
|
136
|
+
"$": ["cropper.component.scss"]
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
static get styleUrls() {
|
|
140
|
+
return {
|
|
141
|
+
"$": ["cropper.component.css"]
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
static get properties() {
|
|
145
|
+
return {
|
|
146
|
+
"variant": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"mutable": false,
|
|
149
|
+
"complexType": {
|
|
150
|
+
"original": "'user' | 'company'",
|
|
151
|
+
"resolved": "\"company\" | \"user\"",
|
|
152
|
+
"references": {}
|
|
153
|
+
},
|
|
154
|
+
"required": false,
|
|
155
|
+
"optional": false,
|
|
156
|
+
"docs": {
|
|
157
|
+
"tags": [],
|
|
158
|
+
"text": "Variant of the image that's being cropped"
|
|
159
|
+
},
|
|
160
|
+
"attribute": "variant",
|
|
161
|
+
"reflect": true,
|
|
162
|
+
"defaultValue": "'user'"
|
|
163
|
+
},
|
|
164
|
+
"value": {
|
|
165
|
+
"type": "any",
|
|
166
|
+
"mutable": false,
|
|
167
|
+
"complexType": {
|
|
168
|
+
"original": "any",
|
|
169
|
+
"resolved": "any",
|
|
170
|
+
"references": {}
|
|
171
|
+
},
|
|
172
|
+
"required": false,
|
|
173
|
+
"optional": false,
|
|
174
|
+
"docs": {
|
|
175
|
+
"tags": [],
|
|
176
|
+
"text": "The image to crop (url or base64)"
|
|
177
|
+
},
|
|
178
|
+
"attribute": "value",
|
|
179
|
+
"reflect": false
|
|
180
|
+
},
|
|
181
|
+
"returnType": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"mutable": false,
|
|
184
|
+
"complexType": {
|
|
185
|
+
"original": "'canvas' | 'base64'",
|
|
186
|
+
"resolved": "\"base64\" | \"canvas\"",
|
|
187
|
+
"references": {}
|
|
188
|
+
},
|
|
189
|
+
"required": false,
|
|
190
|
+
"optional": false,
|
|
191
|
+
"docs": {
|
|
192
|
+
"tags": [],
|
|
193
|
+
"text": "The return type of the onchange"
|
|
194
|
+
},
|
|
195
|
+
"attribute": "return-type",
|
|
196
|
+
"reflect": false,
|
|
197
|
+
"defaultValue": "'base64'"
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
static get states() {
|
|
202
|
+
return {
|
|
203
|
+
"_loaded": {},
|
|
204
|
+
"_currentScale": {}
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
static get events() {
|
|
208
|
+
return [{
|
|
209
|
+
"method": "valueChange",
|
|
210
|
+
"name": "valueChange",
|
|
211
|
+
"bubbles": false,
|
|
212
|
+
"cancelable": true,
|
|
213
|
+
"composed": true,
|
|
214
|
+
"docs": {
|
|
215
|
+
"tags": [],
|
|
216
|
+
"text": "Event when the value changes"
|
|
217
|
+
},
|
|
218
|
+
"complexType": {
|
|
219
|
+
"original": "any",
|
|
220
|
+
"resolved": "any",
|
|
221
|
+
"references": {}
|
|
222
|
+
}
|
|
223
|
+
}];
|
|
224
|
+
}
|
|
225
|
+
static get listeners() {
|
|
226
|
+
return [{
|
|
227
|
+
"name": "resize",
|
|
228
|
+
"method": "onResize",
|
|
229
|
+
"target": "window",
|
|
230
|
+
"capture": false,
|
|
231
|
+
"passive": true
|
|
232
|
+
}];
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
//# sourceMappingURL=cropper.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cropper.component.js","sourceRoot":"","sources":["../../../../src/components/molecules/cropper/cropper.component.tsx"],"names":[],"mappings":"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","sourcesContent":["import {\n Component,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n h,\n} from '@stencil/core';\nimport { clsx } from 'clsx';\nimport 'cropperjs';\nimport { CropperImage, CropperSelection } from 'cropperjs';\n\n@Component({\n tag: 'p-cropper',\n styleUrl: 'cropper.component.scss',\n shadow: true,\n})\nexport class Cropper {\n /**\n * Variant of the image that's being cropped\n */\n @Prop({ reflect: true }) variant: 'user' | 'company' = 'user';\n\n /**\n * The image to crop (url or base64)\n */\n @Prop() value: any;\n\n /**\n * The return type of the onchange\n */\n @Prop() returnType: 'canvas' | 'base64' = 'base64';\n\n /**\n * Event when the value changes\n */\n @Event({\n bubbles: false,\n })\n valueChange: EventEmitter<any>;\n\n private _imageRef: CropperImage;\n private _selectionRef: CropperSelection;\n\n private _maxScale = 0;\n private _minScale = 0;\n\n private _resizeDebounceTimeout: NodeJS.Timer;\n private _toCanvasDebounceTimeout: NodeJS.Timer;\n\n @State()\n private _loaded = false;\n\n @State()\n private _currentScale = 0;\n\n @Listen('resize', { target: 'window' })\n onResize() {\n if (this._resizeDebounceTimeout) {\n clearTimeout(this._resizeDebounceTimeout);\n }\n\n this._resizeDebounceTimeout = setTimeout(() => {\n this._selectionRef.$center();\n this._imageRef.$center();\n }, 200);\n }\n\n componentDidLoad() {\n setTimeout(() => {\n this._loaded = true;\n }, 200);\n }\n\n render() {\n return (\n <Host class=\"p-cropper\">\n {this._loaded && (\n <cropper-canvas\n class=\"h-[17.5rem] w-full border-0 border-b border-solid border-mystic-medium bg-white\"\n onAction={() => this._onAction()}\n >\n <cropper-image\n src={this.value}\n alt=\"Picture\"\n ref={(ref) =>\n this._setImageRef(ref as CropperImage)\n }\n scalable\n crossorigin=\"anonymous\"\n />\n <cropper-shade\n class={clsx({\n 'rounded-round': this.variant === 'user',\n rounded: this.variant === 'company',\n })}\n theme-color=\"rgba(255, 255, 255, 0.5)\"\n hidden\n />\n <cropper-selection\n initial-coverage=\"0.7\"\n aspect-ratio=\"1\"\n ref={(ref) =>\n (this._selectionRef = ref as CropperSelection)\n }\n />\n\n <cropper-handle action=\"move\" plain></cropper-handle>\n </cropper-canvas>\n )}\n\n <div class=\"flex w-full items-center gap-2 px-14 text-storm-vague tablet:max-w-xs tablet:px-1\">\n <p-icon variant=\"minus\" />\n <input\n class=\"p-input w-full\"\n type=\"range\"\n min=\"0\"\n max=\"100\"\n value={this._currentScale}\n onInput={(ev) =>\n this._onInput((ev.target as HTMLInputElement).value)\n }\n step=\"0.5\"\n />\n <p-icon variant=\"plus\" />\n </div>\n </Host>\n );\n }\n\n private _setImageRef(ref: CropperImage) {\n if (this._imageRef) {\n return;\n }\n\n this._imageRef = ref;\n this._imageRef.$ready((image) =>\n setTimeout(() => this._setInitialState(image), 200)\n );\n }\n\n private _setInitialState(image) {\n let scale: number;\n if (image.naturalWidth > image.naturalHeight) {\n // set scale by height\n scale = 200 / image.naturalHeight;\n }\n\n if (image.naturalHeight >= image.naturalWidth) {\n // set scale by width\n scale = 200 / image.naturalWidth;\n }\n\n const current = this._imageRef.$getTransform();\n\n this._minScale = scale;\n this._maxScale = current[0];\n\n this._selectionRef.$resize('nw-resize', 200, 200, 1);\n this._selectionRef.$center();\n\n this._setScale(scale);\n this._toCanvas();\n }\n\n private _onAction() {\n this._setCurrentScale();\n this._toCanvas();\n }\n\n private _setScale(\n scale: number,\n setCenter: boolean = true,\n setCurrentScale: boolean = true\n ) {\n const transform = this._imageRef.$getTransform();\n this._imageRef.$setTransform([\n scale,\n 0,\n 0,\n scale,\n transform[4],\n transform[5],\n ]);\n\n if (setCenter) {\n this._imageRef.$center();\n }\n\n if (setCurrentScale) {\n this._setCurrentScale();\n }\n }\n\n private _setCurrentScale() {\n const transform = this._imageRef.$getTransform();\n const current = transform[0];\n\n if (current < this._minScale) {\n this._setScale(this._minScale, true, false);\n this._currentScale = 0;\n return;\n }\n\n if (current > this._maxScale) {\n this._setScale(this._maxScale, true, false);\n this._currentScale = 100;\n return;\n }\n\n if (current === this._minScale) {\n this._currentScale = 0;\n return;\n }\n\n if (current === this._maxScale) {\n this._currentScale = 100;\n return;\n }\n\n const minMaxDiff = this._maxScale - this._minScale;\n const currentDiff = current - this._minScale;\n\n const percentage = (currentDiff / minMaxDiff) * 100;\n this._currentScale = percentage;\n }\n\n private _onInput(value) {\n const transform = this._imageRef.$getTransform();\n const current = transform[0];\n const minMaxDiff = this._maxScale - this._minScale;\n\n const toSet = minMaxDiff * (value / 100);\n\n if (toSet === current) {\n return;\n }\n\n this._setScale(toSet + this._minScale, false, false);\n this._currentScale = value;\n\n this._toCanvas();\n }\n\n private _toCanvas() {\n if (this._toCanvasDebounceTimeout) {\n clearTimeout(this._toCanvasDebounceTimeout);\n }\n\n this._toCanvasDebounceTimeout = setTimeout(async () => {\n const canvas = await this._selectionRef.$toCanvas();\n if (this.returnType === 'canvas') {\n this.valueChange.emit(canvas);\n return;\n }\n\n const data = canvas.toDataURL('image/png');\n this.valueChange.emit(data);\n }, 200);\n }\n}\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('p-cropper', () => {
|
|
3
|
+
it('renders', async () => {
|
|
4
|
+
const page = await newE2EPage();
|
|
5
|
+
await page.setContent('<p-cropper></p-cropper>');
|
|
6
|
+
const element = await page.find('p-cropper');
|
|
7
|
+
expect(element).toHaveClass('hydrated');
|
|
8
|
+
});
|
|
9
|
+
it('renders changes to the content', async () => {
|
|
10
|
+
const page = await newE2EPage();
|
|
11
|
+
await page.setContent('<p-cropper></p-cropper>');
|
|
12
|
+
// const component = await page.find('p-button');
|
|
13
|
+
const element = await page.find('p-cropper');
|
|
14
|
+
expect(element.textContent).toEqual(``);
|
|
15
|
+
// component.setProperty('name', 'World');
|
|
16
|
+
// await page.waitForChanges();
|
|
17
|
+
// expect(element.textContent).toEqual(`Hello, World!`);
|
|
18
|
+
// component.setProperty('name', 'Bob');
|
|
19
|
+
// await page.waitForChanges();
|
|
20
|
+
// expect(element.textContent).toEqual(`Hello, Bob!`);
|
|
21
|
+
// component.setProperty('name', 'Earl');
|
|
22
|
+
// await page.waitForChanges();
|
|
23
|
+
// expect(element.textContent).toEqual(`Hello, Earl!`);
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=cropper.component.e2e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cropper.component.e2e.js","sourceRoot":"","sources":["../../../../../src/components/molecules/cropper/test/cropper.component.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;EACvB,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACrB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAEhC,MAAM,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAC;IACjD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7C,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;EAC5C,CAAC,CAAC,CAAC;EAEH,EAAE,CAAC,gCAAgC,EAAE,KAAK,IAAI,EAAE;IAC5C,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAEhC,MAAM,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAC;IACjD,iDAAiD;IACjD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7C,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAExC,0CAA0C;IAC1C,+BAA+B;IAC/B,wDAAwD;IAExD,wCAAwC;IACxC,+BAA+B;IAC/B,sDAAsD;IAEtD,yCAAyC;IACzC,+BAA+B;IAC/B,uDAAuD;EAC3D,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from '@stencil/core/testing';\n\ndescribe('p-cropper', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n\n await page.setContent('<p-cropper></p-cropper>');\n const element = await page.find('p-cropper');\n expect(element).toHaveClass('hydrated');\n });\n\n it('renders changes to the content', async () => {\n const page = await newE2EPage();\n\n await page.setContent('<p-cropper></p-cropper>');\n // const component = await page.find('p-button');\n const element = await page.find('p-cropper');\n expect(element.textContent).toEqual(``);\n\n // component.setProperty('name', 'World');\n // await page.waitForChanges();\n // expect(element.textContent).toEqual(`Hello, World!`);\n\n // component.setProperty('name', 'Bob');\n // await page.waitForChanges();\n // expect(element.textContent).toEqual(`Hello, Bob!`);\n\n // component.setProperty('name', 'Earl');\n // await page.waitForChanges();\n // expect(element.textContent).toEqual(`Hello, Earl!`);\n });\n});\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { Cropper } from "../cropper.component";
|
|
3
|
+
describe('p-cropper', () => {
|
|
4
|
+
it('renders', async () => {
|
|
5
|
+
const { root } = await newSpecPage({
|
|
6
|
+
components: [Cropper],
|
|
7
|
+
html: '<p-cropper></p-cropper>',
|
|
8
|
+
});
|
|
9
|
+
expect(root).toEqualHtml(`
|
|
10
|
+
<p-cropper class="p-cropper">
|
|
11
|
+
<mock:shadow-root>
|
|
12
|
+
</mock:shadow-root>
|
|
13
|
+
</p-cropper>
|
|
14
|
+
`);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=cropper.component.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cropper.component.spec.js","sourceRoot":"","sources":["../../../../../src/components/molecules/cropper/test/cropper.component.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;EACvB,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACrB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC;MAC/B,UAAU,EAAE,CAAC,OAAO,CAAC;MACrB,IAAI,EAAE,yBAAyB;KAClC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;KAK5B,CAAC,CAAC;EACH,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { Cropper } from '../cropper.component';\n\ndescribe('p-cropper', () => {\n it('renders', async () => {\n const { root } = await newSpecPage({\n components: [Cropper],\n html: '<p-cropper></p-cropper>',\n });\n expect(root).toEqualHtml(`\n <p-cropper class=\"p-cropper\">\n <mock:shadow-root>\n </mock:shadow-root>\n </p-cropper>\n `);\n });\n});\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, Host } from "@stencil/core";
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
2
|
export class Modal {
|
|
3
3
|
constructor() {
|
|
4
4
|
this._hasFooterSlot = false;
|
|
@@ -12,6 +12,7 @@ export class Modal {
|
|
|
12
12
|
this.showMobileFooter = false;
|
|
13
13
|
this.backdropClickClose = true;
|
|
14
14
|
this.scrollLock = true;
|
|
15
|
+
this.padding = true;
|
|
15
16
|
this._closing = false;
|
|
16
17
|
}
|
|
17
18
|
componentWillLoad() {
|
|
@@ -28,7 +29,7 @@ export class Modal {
|
|
|
28
29
|
const footerContent = h("slot", { name: "footer" });
|
|
29
30
|
return (h(Host, { class: "p-modal" }, h("p-backdrop", { applyBlur: this.applyBlur, onClicked: (ev) => this._backdropClick(ev.detail), closing: this._closing, scrollLock: this.scrollLock }, h("p-modal-container", { size: this.size, closing: this._closing }, (((_a = this.header) === null || _a === void 0 ? void 0 : _a.length) || this._hasHeaderSlot) && (h("p-modal-header", { showClose: this.showClose, onClose: (ev) => this.close(ev.detail) }, this._hasHeaderSlot
|
|
30
31
|
? headerContent
|
|
31
|
-
: this.header)), h("p-modal-body", { variant: this.variant, rounded: !this._hasFooterSlot }, bodyContent), this._hasFooterSlot && (h("p-modal-footer", null, footerContent))))));
|
|
32
|
+
: this.header)), h("p-modal-body", { variant: this.variant, rounded: !this._hasFooterSlot, padding: this.padding }, bodyContent), this._hasFooterSlot && (h("p-modal-footer", null, footerContent))))));
|
|
32
33
|
}
|
|
33
34
|
_backdropClick(ev) {
|
|
34
35
|
if (!this.backdropClickClose) {
|
|
@@ -209,6 +210,24 @@ export class Modal {
|
|
|
209
210
|
"attribute": "scroll-lock",
|
|
210
211
|
"reflect": false,
|
|
211
212
|
"defaultValue": "true"
|
|
213
|
+
},
|
|
214
|
+
"padding": {
|
|
215
|
+
"type": "boolean",
|
|
216
|
+
"mutable": false,
|
|
217
|
+
"complexType": {
|
|
218
|
+
"original": "boolean",
|
|
219
|
+
"resolved": "boolean",
|
|
220
|
+
"references": {}
|
|
221
|
+
},
|
|
222
|
+
"required": false,
|
|
223
|
+
"optional": false,
|
|
224
|
+
"docs": {
|
|
225
|
+
"tags": [],
|
|
226
|
+
"text": "Wether the body should have padding"
|
|
227
|
+
},
|
|
228
|
+
"attribute": "padding",
|
|
229
|
+
"reflect": false,
|
|
230
|
+
"defaultValue": "true"
|
|
212
231
|
}
|
|
213
232
|
};
|
|
214
233
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.component.js","sourceRoot":"","sources":["../../../../src/components/organisms/modal/modal.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,IAAI,EACJ,KAAK,
|
|
1
|
+
{"version":3,"file":"modal.component.js","sourceRoot":"","sources":["../../../../src/components/organisms/modal/modal.component.tsx"],"names":[],"mappings":"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","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n} from '@stencil/core';\n\n@Component({\n tag: 'p-modal',\n shadow: true,\n})\nexport class Modal {\n /**\n * The size of the modal container\n */\n @Prop() size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\n\n /**\n * The variant of the modal body\n */\n @Prop() variant: 'default' | 'table' = 'default';\n\n /**\n * The Header of the modal\n */\n @Prop() header?: string;\n\n /**\n * Wether to show the modal or not\n */\n @Prop() show: boolean = false;\n\n /**\n * Wether to apply blur to the backdrop\n */\n @Prop() applyBlur: boolean = false;\n\n /**\n * Wether to show the close button in the header\n */\n @Prop() showClose = true;\n\n /**\n * Wether to show the footer on mobile\n */\n @Prop() showMobileFooter = false;\n\n /**\n * Wether to hide the modal when the backdrop is clicked\n */\n @Prop() backdropClickClose = true;\n\n /**\n * Wether we should scroll lock the body\n */\n @Prop() scrollLock: boolean = true;\n\n /**\n * Wether the body should have padding\n */\n @Prop() padding: boolean = true;\n\n /**\n * Close click event\n */\n @Event({\n bubbles: false,\n })\n closeClicked: EventEmitter<MouseEvent>;\n\n /**\n * Closed event\n */\n @Event({\n bubbles: false,\n })\n closed: EventEmitter<null>;\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n private _hasFooterSlot = false;\n private _hasHeaderSlot = false;\n\n @State() private _closing = false;\n\n componentWillLoad() {\n this._hasFooterSlot = !!this._el.querySelector(\n ':scope > [slot=\"footer\"]'\n );\n this._hasHeaderSlot = !!this._el.querySelector(\n ':scope > [slot=\"header\"]'\n );\n }\n\n render() {\n if (!this.show) {\n return;\n }\n\n const headerContent = <slot name=\"header\" />;\n const bodyContent = <slot name=\"content\" />;\n const footerContent = <slot name=\"footer\" />;\n\n return (\n <Host class=\"p-modal\">\n <p-backdrop\n applyBlur={this.applyBlur}\n onClicked={(ev) => this._backdropClick(ev.detail)}\n closing={this._closing}\n scrollLock={this.scrollLock}\n >\n <p-modal-container size={this.size} closing={this._closing}>\n {(this.header?.length || this._hasHeaderSlot) && (\n <p-modal-header\n showClose={this.showClose}\n onClose={(ev) => this.close(ev.detail)}\n >\n {this._hasHeaderSlot\n ? headerContent\n : this.header}\n </p-modal-header>\n )}\n <p-modal-body\n variant={this.variant}\n rounded={!this._hasFooterSlot}\n padding={this.padding}\n >\n {bodyContent}\n </p-modal-body>\n {this._hasFooterSlot && (\n <p-modal-footer>{footerContent}</p-modal-footer>\n )}\n </p-modal-container>\n </p-backdrop>\n </Host>\n );\n }\n\n private _backdropClick(ev: MouseEvent) {\n if (!this.backdropClickClose) {\n return;\n }\n\n this.close(ev);\n }\n\n public close(ev: MouseEvent) {\n this.closeClicked.emit(ev);\n\n this._closing = true;\n\n setTimeout(() => {\n this.show = false;\n this._closing = false;\n\n this.closed.emit();\n }, 550);\n }\n}\n"]}
|