@aquera/nile-elements 0.1.36-beta-1.3 → 0.1.36-beta-1.4
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/README.md +12 -75
- package/demo/index.css +4 -7
- package/demo/index.html +38 -20
- package/demo/variables.css +0 -13
- package/demo/variables_v2.css +0 -13
- package/dist/{fixture-76051ef1.esm.js → fixture-178ed8d2.esm.js} +1 -1
- package/dist/{fixture-948ae33c.cjs.js → fixture-bb486165.cjs.js} +2 -2
- package/dist/{fixture-948ae33c.cjs.js.map → fixture-bb486165.cjs.js.map} +1 -1
- package/dist/{fixture-e6fdfbfa.esm.js → fixture-c4e75e04.esm.js} +1 -1
- package/dist/{fixture-7bfb866e.cjs.js → fixture-d7bf42eb.cjs.js} +2 -2
- package/dist/{fixture-7bfb866e.cjs.js.map → fixture-d7bf42eb.cjs.js.map} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/internal/animate.cjs.js +1 -1
- package/dist/internal/animate.cjs.js.map +1 -1
- package/dist/internal/animate.esm.js +1 -1
- package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
- package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
- package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
- package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.test.esm.js +1 -1
- package/dist/nile-button/nile-button.test.cjs.js +1 -1
- package/dist/nile-button/nile-button.test.esm.js +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
- package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
- package/dist/nile-card/nile-card.test.cjs.js +1 -1
- package/dist/nile-card/nile-card.test.esm.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.esm.js +8 -17
- package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.test.esm.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
- package/dist/nile-error-message/nile-error-message.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.cjs.js.map +1 -1
- package/dist/nile-error-message/nile-error-message.css.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.css.cjs.js.map +1 -1
- package/dist/nile-error-message/nile-error-message.css.esm.js +4 -6
- package/dist/nile-error-message/nile-error-message.esm.js +4 -4
- package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
- package/dist/nile-error-notification/nile-error-notification.css.cjs.js +1 -1
- package/dist/nile-error-notification/nile-error-notification.css.cjs.js.map +1 -1
- package/dist/nile-error-notification/nile-error-notification.css.esm.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.cjs.js.map +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js.map +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.esm.js +17 -40
- package/dist/nile-filter-chip/nile-filter-chip.esm.js +15 -24
- package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js.map +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +16 -16
- package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
- package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
- package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
- package/dist/nile-hero/nile-hero.test.esm.js +1 -1
- package/dist/nile-icon/icons/svg/accessreview.cjs.js +1 -1
- package/dist/nile-icon/icons/svg/accessreview.cjs.js.map +1 -1
- package/dist/nile-icon/icons/svg/accessreview.esm.js +1 -1
- package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
- package/dist/nile-icon/nile-icon.test.esm.js +1 -1
- package/dist/nile-input/nile-input.test.cjs.js +1 -1
- package/dist/nile-input/nile-input.test.esm.js +1 -1
- package/dist/nile-link/nile-link.test.cjs.js +1 -1
- package/dist/nile-link/nile-link.test.esm.js +1 -1
- package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
- package/dist/nile-loader/nile-loader.test.esm.js +1 -1
- package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.test.esm.js +1 -1
- package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.test.esm.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.css.cjs.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.css.cjs.js.map +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.css.esm.js +0 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
- package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
- package/dist/nile-radio/nile-radio.test.esm.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +1 -1
- package/dist/nile-select/nile-select.test.cjs.js +1 -1
- package/dist/nile-select/nile-select.test.esm.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
- package/dist/nile-table/nile-table.cjs.js.map +1 -1
- package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
- package/dist/nile-tooltip/index.cjs.js +1 -1
- package/dist/nile-tooltip/index.esm.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.esm.js +45 -78
- package/dist/nile-tooltip/nile-tooltip.esm.js +28 -23
- package/dist/nile-tooltip/nile-tooltip.test.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.test.esm.js +1 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +0 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-chip/nile-chip.js +0 -9
- package/dist/src/nile-chip/nile-chip.js.map +1 -1
- package/dist/src/nile-error-message/nile-error-message.css.js +4 -6
- package/dist/src/nile-error-message/nile-error-message.css.js.map +1 -1
- package/dist/src/nile-error-message/nile-error-message.d.ts +0 -4
- package/dist/src/nile-error-message/nile-error-message.js +0 -20
- package/dist/src/nile-error-message/nile-error-message.js.map +1 -1
- package/dist/src/nile-error-notification/nile-error-notification.css.js +1 -1
- package/dist/src/nile-error-notification/nile-error-notification.css.js.map +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js +17 -40
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js.map +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.d.ts +3 -4
- package/dist/src/nile-filter-chip/nile-filter-chip.js +12 -25
- package/dist/src/nile-filter-chip/nile-filter-chip.js.map +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.test.js +12 -12
- package/dist/src/nile-filter-chip/nile-filter-chip.test.js.map +1 -1
- package/dist/src/nile-icon/icons/svg/accessreview.d.ts +1 -1
- package/dist/src/nile-icon/icons/svg/accessreview.js +1 -1
- package/dist/src/nile-icon/icons/svg/accessreview.js.map +1 -1
- package/dist/src/nile-new-error/index.d.ts +1 -0
- package/dist/src/nile-new-error/index.js +2 -0
- package/dist/src/nile-new-error/index.js.map +1 -0
- package/dist/src/{nile-file-preview/nile-file-preview.css.d.ts → nile-new-error/nile-new-error.css.d.ts} +1 -1
- package/dist/src/nile-new-error/nile-new-error.css.js +38 -0
- package/dist/src/nile-new-error/nile-new-error.css.js.map +1 -0
- package/dist/src/nile-new-error/nile-new-error.d.ts +36 -0
- package/dist/src/nile-new-error/nile-new-error.js +74 -0
- package/dist/src/nile-new-error/nile-new-error.js.map +1 -0
- package/dist/src/nile-progress-bar/nile-progress-bar.css.js +0 -1
- package/dist/src/nile-progress-bar/nile-progress-bar.css.js.map +1 -1
- package/dist/src/nile-select/nile-select.js +1 -1
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-table/nile-table.js.map +1 -1
- package/dist/src/nile-tooltip/nile-tooltip.css.js +43 -76
- package/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
- package/dist/src/nile-tooltip/nile-tooltip.d.ts +46 -24
- package/dist/src/nile-tooltip/nile-tooltip.js +232 -235
- package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
- package/dist/src/nile-virtual-list/index.d.ts +1 -0
- package/dist/src/nile-virtual-list/index.js +2 -0
- package/dist/src/{nile-file-preview → nile-virtual-list}/index.js.map +1 -1
- package/dist/src/{nile-file-upload/nile-file-upload.css.d.ts → nile-virtual-list/nile-virtual-list.css.d.ts} +1 -1
- package/dist/src/nile-virtual-list/nile-virtual-list.css.js +25 -0
- package/dist/src/nile-virtual-list/nile-virtual-list.css.js.map +1 -0
- package/dist/src/nile-virtual-list/nile-virtual-list.d.ts +28 -0
- package/dist/src/nile-virtual-list/nile-virtual-list.js +69 -0
- package/dist/src/nile-virtual-list/nile-virtual-list.js.map +1 -0
- package/dist/src/nile-virtual-scroll/index.d.ts +1 -0
- package/dist/src/nile-virtual-scroll/index.js +2 -0
- package/dist/src/nile-virtual-scroll/index.js.map +1 -0
- package/dist/src/{nile-pagination/nile-pagination.css.d.ts → nile-virtual-scroll/nile-virtual-scroll.css.d.ts} +2 -2
- package/dist/src/{nile-rich-text-editor/nile-rich-text-editor.css.js → nile-virtual-scroll/nile-virtual-scroll.css.js} +3 -3
- package/dist/src/nile-virtual-scroll/nile-virtual-scroll.css.js.map +1 -0
- package/dist/src/nile-virtual-scroll/nile-virtual-scroll.d.ts +54 -0
- package/dist/src/nile-virtual-scroll/nile-virtual-scroll.js +196 -0
- package/dist/src/nile-virtual-scroll/nile-virtual-scroll.js.map +1 -0
- package/dist/src/nile-virtual-scroll/nile-virtual-scroll.utils.d.ts +23 -0
- package/dist/src/nile-virtual-scroll/nile-virtual-scroll.utils.js +48 -0
- package/dist/src/nile-virtual-scroll/nile-virtual-scroll.utils.js.map +1 -0
- package/dist/src/nile-virtual-select/event-handlers.d.ts +19 -0
- package/dist/src/nile-virtual-select/event-handlers.js +153 -0
- package/dist/src/nile-virtual-select/event-handlers.js.map +1 -0
- package/dist/src/nile-virtual-select/index.d.ts +1 -0
- package/dist/src/nile-virtual-select/index.js +2 -0
- package/dist/src/nile-virtual-select/index.js.map +1 -0
- package/dist/src/nile-virtual-select/models.d.ts +33 -0
- package/dist/src/nile-virtual-select/models.js +5 -0
- package/dist/src/nile-virtual-select/models.js.map +1 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.css.d.ts +12 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js +463 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +1 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +239 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.js +1287 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.js.map +1 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.test.js +2 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.test.js.map +1 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.utils.js +2 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.utils.js.map +1 -0
- package/dist/src/nile-virtual-select/option-utils.d.ts +15 -0
- package/dist/src/nile-virtual-select/option-utils.js +59 -0
- package/dist/src/nile-virtual-select/option-utils.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/plop-templates/lit/index.ts.hbs +1 -1
- package/plop-templates/lit/lit.css.ts.hbs +1 -1
- package/plop-templates/lit/lit.ts.hbs +3 -7
- package/plopfile.js +1 -32
- package/src/index.ts +1 -2
- package/src/nile-chip/nile-chip.ts +0 -9
- package/src/nile-error-message/nile-error-message.css.ts +4 -6
- package/src/nile-error-message/nile-error-message.ts +0 -18
- package/src/nile-error-notification/nile-error-notification.css.ts +1 -1
- package/src/nile-icon/icons/svg/accessreview.ts +1 -1
- package/src/nile-progress-bar/nile-progress-bar.css.ts +0 -1
- package/src/nile-select/nile-select.ts +1 -1
- package/src/nile-table/nile-table.ts +2 -2
- package/src/nile-tooltip/nile-tooltip.css.ts +44 -77
- package/src/nile-tooltip/nile-tooltip.ts +230 -268
- package/vscode-html-custom-data.json +95 -144
- package/dist/_commonjsHelpers-e8f8776f.cjs.js +0 -2
- package/dist/_commonjsHelpers-e8f8776f.cjs.js.map +0 -1
- package/dist/_commonjsHelpers-f94d783e.esm.js +0 -1
- package/dist/axe.min-61450170.cjs.js +0 -12
- package/dist/axe.min-61450170.cjs.js.map +0 -1
- package/dist/axe.min-640ded4a.esm.js +0 -12
- package/dist/fixture-205f11fa.cjs.js +0 -395
- package/dist/fixture-205f11fa.cjs.js.map +0 -1
- package/dist/fixture-2b5b3aba.esm.js +0 -569
- package/dist/lit-html-39a6718c.esm.js +0 -6
- package/dist/lit-html-9b3af046.cjs.js +0 -6
- package/dist/lit-html-9b3af046.cjs.js.map +0 -1
- package/dist/nile-file-preview/index.cjs.js +0 -2
- package/dist/nile-file-preview/index.cjs.js.map +0 -1
- package/dist/nile-file-preview/index.esm.js +0 -1
- package/dist/nile-file-preview/nile-file-preview.cjs.js +0 -2
- package/dist/nile-file-preview/nile-file-preview.cjs.js.map +0 -1
- package/dist/nile-file-preview/nile-file-preview.css.cjs.js +0 -2
- package/dist/nile-file-preview/nile-file-preview.css.cjs.js.map +0 -1
- package/dist/nile-file-preview/nile-file-preview.css.esm.js +0 -521
- package/dist/nile-file-preview/nile-file-preview.esm.js +0 -3
- package/dist/nile-file-preview/nile-file-preview.template.cjs.js +0 -2
- package/dist/nile-file-preview/nile-file-preview.template.cjs.js.map +0 -1
- package/dist/nile-file-preview/nile-file-preview.template.esm.js +0 -117
- package/dist/nile-file-preview/nile-file-preview.test.cjs.js +0 -2
- package/dist/nile-file-preview/nile-file-preview.test.cjs.js.map +0 -1
- package/dist/nile-file-preview/nile-file-preview.test.esm.js +0 -1
- package/dist/nile-file-preview/types/file-preview.enums.cjs.js +0 -2
- package/dist/nile-file-preview/types/file-preview.enums.cjs.js.map +0 -1
- package/dist/nile-file-preview/types/file-preview.enums.esm.js +0 -1
- package/dist/nile-file-preview/types/file-preview.interface.cjs.js +0 -2
- package/dist/nile-file-preview/types/file-preview.interface.cjs.js.map +0 -1
- package/dist/nile-file-preview/types/file-preview.interface.esm.js +0 -1
- package/dist/nile-file-preview/types/index.cjs.js +0 -2
- package/dist/nile-file-preview/types/index.cjs.js.map +0 -1
- package/dist/nile-file-preview/types/index.esm.js +0 -1
- package/dist/nile-file-preview/utils/file-preview.util.cjs.js +0 -2
- package/dist/nile-file-preview/utils/file-preview.util.cjs.js.map +0 -1
- package/dist/nile-file-preview/utils/file-preview.util.esm.js +0 -1
- package/dist/nile-file-preview/utils/index.cjs.js +0 -2
- package/dist/nile-file-preview/utils/index.cjs.js.map +0 -1
- package/dist/nile-file-preview/utils/index.esm.js +0 -1
- package/dist/nile-file-upload/index.cjs.js +0 -2
- package/dist/nile-file-upload/index.cjs.js.map +0 -1
- package/dist/nile-file-upload/index.esm.js +0 -1
- package/dist/nile-file-upload/nile-file-upload.cjs.js +0 -2
- package/dist/nile-file-upload/nile-file-upload.cjs.js.map +0 -1
- package/dist/nile-file-upload/nile-file-upload.css.cjs.js +0 -2
- package/dist/nile-file-upload/nile-file-upload.css.cjs.js.map +0 -1
- package/dist/nile-file-upload/nile-file-upload.css.esm.js +0 -535
- package/dist/nile-file-upload/nile-file-upload.esm.js +0 -3
- package/dist/nile-file-upload/nile-file-upload.template.cjs.js +0 -10
- package/dist/nile-file-upload/nile-file-upload.template.cjs.js.map +0 -1
- package/dist/nile-file-upload/nile-file-upload.template.esm.js +0 -155
- package/dist/nile-file-upload/nile-file-upload.test.cjs.js +0 -2
- package/dist/nile-file-upload/nile-file-upload.test.cjs.js.map +0 -1
- package/dist/nile-file-upload/nile-file-upload.test.esm.js +0 -1
- package/dist/nile-file-upload/types/file-upload.enums.cjs.js +0 -2
- package/dist/nile-file-upload/types/file-upload.enums.cjs.js.map +0 -1
- package/dist/nile-file-upload/types/file-upload.enums.esm.js +0 -1
- package/dist/nile-file-upload/types/file-upload.type.cjs.js +0 -2
- package/dist/nile-file-upload/types/file-upload.type.cjs.js.map +0 -1
- package/dist/nile-file-upload/types/file-upload.type.esm.js +0 -1
- package/dist/nile-file-upload/types/index.cjs.js +0 -2
- package/dist/nile-file-upload/types/index.cjs.js.map +0 -1
- package/dist/nile-file-upload/types/index.esm.js +0 -1
- package/dist/nile-file-upload/utils/drag-drop.util.cjs.js +0 -2
- package/dist/nile-file-upload/utils/drag-drop.util.cjs.js.map +0 -1
- package/dist/nile-file-upload/utils/drag-drop.util.esm.js +0 -1
- package/dist/nile-file-upload/utils/file-validation.util.cjs.js +0 -2
- package/dist/nile-file-upload/utils/file-validation.util.cjs.js.map +0 -1
- package/dist/nile-file-upload/utils/file-validation.util.esm.js +0 -1
- package/dist/nile-rich-text-editor/index.cjs.js +0 -2
- package/dist/nile-rich-text-editor/index.cjs.js.map +0 -1
- package/dist/nile-rich-text-editor/index.esm.js +0 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js +0 -10
- package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js.map +0 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js +0 -2
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js.map +0 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.esm.js +0 -5
- package/dist/nile-rich-text-editor/nile-rich-text-editor.esm.js +0 -28
- package/dist/nile-rich-text-editor/nile-rich-text-editor.template.cjs.js +0 -2
- package/dist/nile-rich-text-editor/nile-rich-text-editor.template.cjs.js.map +0 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.template.esm.js +0 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.test.cjs.js +0 -2
- package/dist/nile-rich-text-editor/nile-rich-text-editor.test.cjs.js.map +0 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.test.esm.js +0 -1
- package/dist/nile-rich-text-editor/sub-components/nile-rich-text-editor.cjs.js +0 -2
- package/dist/nile-rich-text-editor/sub-components/nile-rich-text-editor.cjs.js.map +0 -1
- package/dist/nile-rich-text-editor/sub-components/nile-rich-text-editor.esm.js +0 -1
- package/dist/nile-rich-text-editor/types/index.cjs.js +0 -2
- package/dist/nile-rich-text-editor/types/index.cjs.js.map +0 -1
- package/dist/nile-rich-text-editor/types/index.esm.js +0 -1
- package/dist/nile-rich-text-editor/types/rich-text-editor.type.cjs.js +0 -2
- package/dist/nile-rich-text-editor/types/rich-text-editor.type.cjs.js.map +0 -1
- package/dist/nile-rich-text-editor/types/rich-text-editor.type.esm.js +0 -1
- package/dist/nile-rich-text-editor/utils/nile-rich-text-editor.utils.cjs.js +0 -2
- package/dist/nile-rich-text-editor/utils/nile-rich-text-editor.utils.cjs.js.map +0 -1
- package/dist/nile-rich-text-editor/utils/nile-rich-text-editor.utils.esm.js +0 -1
- package/dist/src/nile-file-preview/index.d.ts +0 -1
- package/dist/src/nile-file-preview/index.js +0 -2
- package/dist/src/nile-file-preview/nile-file-preview.css.js +0 -533
- package/dist/src/nile-file-preview/nile-file-preview.css.js.map +0 -1
- package/dist/src/nile-file-preview/nile-file-preview.d.ts +0 -48
- package/dist/src/nile-file-preview/nile-file-preview.js +0 -149
- package/dist/src/nile-file-preview/nile-file-preview.js.map +0 -1
- package/dist/src/nile-file-preview/nile-file-preview.template.d.ts +0 -11
- package/dist/src/nile-file-preview/nile-file-preview.template.js +0 -144
- package/dist/src/nile-file-preview/nile-file-preview.template.js.map +0 -1
- package/dist/src/nile-file-preview/nile-file-preview.test.d.ts +0 -7
- package/dist/src/nile-file-preview/nile-file-preview.test.js +0 -30
- package/dist/src/nile-file-preview/nile-file-preview.test.js.map +0 -1
- package/dist/src/nile-file-preview/types/file-preview.enums.d.ts +0 -23
- package/dist/src/nile-file-preview/types/file-preview.enums.js +0 -28
- package/dist/src/nile-file-preview/types/file-preview.enums.js.map +0 -1
- package/dist/src/nile-file-preview/types/file-preview.interface.d.ts +0 -4
- package/dist/src/nile-file-preview/types/file-preview.interface.js +0 -2
- package/dist/src/nile-file-preview/types/file-preview.interface.js.map +0 -1
- package/dist/src/nile-file-preview/types/index.d.ts +0 -2
- package/dist/src/nile-file-preview/types/index.js +0 -3
- package/dist/src/nile-file-preview/types/index.js.map +0 -1
- package/dist/src/nile-file-preview/types/nile-file-preview.enums.d.ts +0 -26
- package/dist/src/nile-file-preview/types/nile-file-preview.enums.js +0 -31
- package/dist/src/nile-file-preview/types/nile-file-preview.enums.js.map +0 -1
- package/dist/src/nile-file-preview/types/nile-file-preview.interface.d.ts +0 -4
- package/dist/src/nile-file-preview/types/nile-file-preview.interface.js +0 -2
- package/dist/src/nile-file-preview/types/nile-file-preview.interface.js.map +0 -1
- package/dist/src/nile-file-preview/utils/file-preview.util.d.ts +0 -3
- package/dist/src/nile-file-preview/utils/file-preview.util.js +0 -29
- package/dist/src/nile-file-preview/utils/file-preview.util.js.map +0 -1
- package/dist/src/nile-file-preview/utils/index.d.ts +0 -1
- package/dist/src/nile-file-preview/utils/index.js +0 -2
- package/dist/src/nile-file-preview/utils/index.js.map +0 -1
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.d.ts +0 -4
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.js +0 -45
- package/dist/src/nile-file-preview/utils/nile-file-preview.util.js.map +0 -1
- package/dist/src/nile-file-upload/index.d.ts +0 -1
- package/dist/src/nile-file-upload/index.js +0 -2
- package/dist/src/nile-file-upload/index.js.map +0 -1
- package/dist/src/nile-file-upload/nile-file-upload.css.js +0 -547
- package/dist/src/nile-file-upload/nile-file-upload.css.js.map +0 -1
- package/dist/src/nile-file-upload/nile-file-upload.d.ts +0 -45
- package/dist/src/nile-file-upload/nile-file-upload.js +0 -148
- package/dist/src/nile-file-upload/nile-file-upload.js.map +0 -1
- package/dist/src/nile-file-upload/nile-file-upload.template.d.ts +0 -11
- package/dist/src/nile-file-upload/nile-file-upload.template.js +0 -163
- package/dist/src/nile-file-upload/nile-file-upload.template.js.map +0 -1
- package/dist/src/nile-file-upload/nile-file-upload.test.d.ts +0 -7
- package/dist/src/nile-file-upload/nile-file-upload.test.js +0 -30
- package/dist/src/nile-file-upload/nile-file-upload.test.js.map +0 -1
- package/dist/src/nile-file-upload/types/file-upload.enums.d.ts +0 -28
- package/dist/src/nile-file-upload/types/file-upload.enums.js +0 -35
- package/dist/src/nile-file-upload/types/file-upload.enums.js.map +0 -1
- package/dist/src/nile-file-upload/types/file-upload.type.d.ts +0 -4
- package/dist/src/nile-file-upload/types/file-upload.type.js +0 -2
- package/dist/src/nile-file-upload/types/file-upload.type.js.map +0 -1
- package/dist/src/nile-file-upload/types/index.d.ts +0 -2
- package/dist/src/nile-file-upload/types/index.js +0 -3
- package/dist/src/nile-file-upload/types/index.js.map +0 -1
- package/dist/src/nile-file-upload/utils/drag-drop.util.d.ts +0 -19
- package/dist/src/nile-file-upload/utils/drag-drop.util.js +0 -77
- package/dist/src/nile-file-upload/utils/drag-drop.util.js.map +0 -1
- package/dist/src/nile-file-upload/utils/file-validation.util.d.ts +0 -9
- package/dist/src/nile-file-upload/utils/file-validation.util.js +0 -58
- package/dist/src/nile-file-upload/utils/file-validation.util.js.map +0 -1
- package/dist/src/nile-pagination/index.d.ts +0 -1
- package/dist/src/nile-pagination/index.js +0 -2
- package/dist/src/nile-pagination/index.js.map +0 -1
- package/dist/src/nile-pagination/nile-pagination.css.js +0 -156
- package/dist/src/nile-pagination/nile-pagination.css.js.map +0 -1
- package/dist/src/nile-pagination/nile-pagination.d.ts +0 -36
- package/dist/src/nile-pagination/nile-pagination.js +0 -170
- package/dist/src/nile-pagination/nile-pagination.js.map +0 -1
- package/dist/src/nile-pagination/nile-pagination.template.d.ts +0 -3
- package/dist/src/nile-pagination/nile-pagination.template.js +0 -5
- package/dist/src/nile-pagination/nile-pagination.template.js.map +0 -1
- package/dist/src/nile-pagination/nile-pagination.test.d.ts +0 -7
- package/dist/src/nile-pagination/nile-pagination.test.js +0 -30
- package/dist/src/nile-pagination/nile-pagination.test.js.map +0 -1
- package/dist/src/nile-pagination/sub-components/nile-pagination.js +0 -2
- package/dist/src/nile-pagination/sub-components/nile-pagination.js.map +0 -1
- package/dist/src/nile-pagination/types/index.js +0 -2
- package/dist/src/nile-pagination/types/index.js.map +0 -1
- package/dist/src/nile-pagination/types/pagination.type.d.ts +0 -3
- package/dist/src/nile-pagination/types/pagination.type.js +0 -5
- package/dist/src/nile-pagination/types/pagination.type.js.map +0 -1
- package/dist/src/nile-pagination/utils/nile-pagination.utils.d.ts +0 -0
- package/dist/src/nile-pagination/utils/nile-pagination.utils.js +0 -2
- package/dist/src/nile-pagination/utils/nile-pagination.utils.js.map +0 -1
- package/dist/src/nile-rich-text-editor/index.d.ts +0 -1
- package/dist/src/nile-rich-text-editor/index.js +0 -2
- package/dist/src/nile-rich-text-editor/index.js.map +0 -1
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.d.ts +0 -12
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js.map +0 -1
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.d.ts +0 -10
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js +0 -62
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js.map +0 -1
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.template.d.ts +0 -3
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.template.js +0 -5
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.template.js.map +0 -1
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.test.d.ts +0 -7
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.test.js +0 -30
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.test.js.map +0 -1
- package/dist/src/nile-rich-text-editor/quill/quill.d.ts +0 -8
- package/dist/src/nile-rich-text-editor/quill/quill.js +0 -19
- package/dist/src/nile-rich-text-editor/quill/quill.js.map +0 -1
- package/dist/src/nile-rich-text-editor/sub-components/nile-rich-text-editor.d.ts +0 -0
- package/dist/src/nile-rich-text-editor/sub-components/nile-rich-text-editor.js +0 -2
- package/dist/src/nile-rich-text-editor/sub-components/nile-rich-text-editor.js.map +0 -1
- package/dist/src/nile-rich-text-editor/types/index.d.ts +0 -0
- package/dist/src/nile-rich-text-editor/types/index.js +0 -2
- package/dist/src/nile-rich-text-editor/types/index.js.map +0 -1
- package/dist/src/nile-rich-text-editor/types/rich-text-editor.type.d.ts +0 -3
- package/dist/src/nile-rich-text-editor/types/rich-text-editor.type.js +0 -5
- package/dist/src/nile-rich-text-editor/types/rich-text-editor.type.js.map +0 -1
- package/dist/src/nile-rich-text-editor/utils/nile-rich-text-editor.utils.d.ts +0 -0
- package/dist/src/nile-rich-text-editor/utils/nile-rich-text-editor.utils.js +0 -2
- package/dist/src/nile-rich-text-editor/utils/nile-rich-text-editor.utils.js.map +0 -1
- package/plop-templates/lit/lit.template.ts.hbs +0 -3
- package/plop-templates/lit/lit.test.ts.hbs +0 -38
- package/plop-templates/lit/sub-components/index.ts.hbs +0 -4
- package/plop-templates/lit/types/index.ts.hbs +0 -0
- package/plop-templates/lit/types/type.ts.hbs +0 -3
- package/plop-templates/lit/utils/lit.utils.ts.hbs +0 -4
- package/src/nile-filter-chip/index.ts +0 -1
- package/src/nile-filter-chip/nile-filter-chip.css.ts +0 -138
- package/src/nile-filter-chip/nile-filter-chip.test.ts +0 -92
- package/src/nile-filter-chip/nile-filter-chip.ts +0 -136
- package/src/nile-tooltip/nile-tooltip-utils.ts +0 -271
- package/src/nile-tooltip/nile-tooltip.test.ts +0 -168
- /package/dist/src/{nile-pagination/sub-components/nile-pagination.d.ts → nile-virtual-select/nile-virtual-select.test.d.ts} +0 -0
- /package/dist/src/{nile-pagination/types/index.d.ts → nile-virtual-select/nile-virtual-select.utils.d.ts} +0 -0
@@ -1,45 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright Aquera Inc 2025
|
3
|
-
*
|
4
|
-
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
6
|
-
*/
|
7
|
-
import { ChangedPropsInterface } from './types/file-upload.type';
|
8
|
-
import NileElement from '../internal/nile-element';
|
9
|
-
import { CSSResultArray, TemplateResult } from 'lit';
|
10
|
-
import { FileUploadState, FileUploadVariant } from './types/file-upload.enums';
|
11
|
-
/**
|
12
|
-
* Nile file-upload component.
|
13
|
-
*
|
14
|
-
* @tag nile-file-upload
|
15
|
-
*
|
16
|
-
*/
|
17
|
-
export declare class NileFileUpload extends NileElement {
|
18
|
-
/**
|
19
|
-
* The styles for nile-file-upload
|
20
|
-
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
21
|
-
*/
|
22
|
-
static get styles(): CSSResultArray;
|
23
|
-
size: number;
|
24
|
-
error: boolean;
|
25
|
-
errorMessage: string;
|
26
|
-
allowMultiple: boolean;
|
27
|
-
allowDuplicates: boolean;
|
28
|
-
uploadedFiles: File[];
|
29
|
-
title: string;
|
30
|
-
subtitle: string;
|
31
|
-
state: FileUploadState;
|
32
|
-
variant: FileUploadVariant;
|
33
|
-
input: HTMLInputElement;
|
34
|
-
private dragHandler;
|
35
|
-
connectedCallback(): void;
|
36
|
-
firstUpdated(changedProps: ChangedPropsInterface): void;
|
37
|
-
updated(changedProps: ChangedPropsInterface): void;
|
38
|
-
private browseFiles;
|
39
|
-
setState: (newState: FileUploadState) => void;
|
40
|
-
render(): TemplateResult;
|
41
|
-
private getState;
|
42
|
-
private getHorizontalState;
|
43
|
-
private getVerticalState;
|
44
|
-
disconnectedCallback(): void;
|
45
|
-
}
|
@@ -1,148 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright Aquera Inc 2025
|
3
|
-
*
|
4
|
-
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
6
|
-
*/
|
7
|
-
import { __decorate } from "tslib";
|
8
|
-
import { styles } from './nile-file-upload.css';
|
9
|
-
import NileElement from '../internal/nile-element';
|
10
|
-
import { DragHandler } from './utils/drag-drop.util';
|
11
|
-
import { getDragHandler } from './nile-file-upload.template';
|
12
|
-
import { FileUploadDefaults } from './types/file-upload.enums';
|
13
|
-
import { html } from 'lit';
|
14
|
-
import { customElement, property, query } from 'lit/decorators.js';
|
15
|
-
import { FileUploadState, FileUploadVariant, FileUploadEvent } from './types/file-upload.enums';
|
16
|
-
import { setUpDragHandler, addGlobalListeners, addInternalListeners } from './utils/file-validation.util';
|
17
|
-
import { getHorizontalDefaultState, getHorizontalDisabledtState, getHorizontalDragState, getVerticalDefaultState, getVerticalDisabledState, getVerticalDragState, } from './nile-file-upload.template';
|
18
|
-
/**
|
19
|
-
* Nile file-upload component.
|
20
|
-
*
|
21
|
-
* @tag nile-file-upload
|
22
|
-
*
|
23
|
-
*/
|
24
|
-
let NileFileUpload = class NileFileUpload extends NileElement {
|
25
|
-
constructor() {
|
26
|
-
super(...arguments);
|
27
|
-
this.size = 0;
|
28
|
-
this.error = false;
|
29
|
-
this.errorMessage = "";
|
30
|
-
this.allowMultiple = true;
|
31
|
-
this.allowDuplicates = true;
|
32
|
-
this.uploadedFiles = [];
|
33
|
-
this.title = FileUploadDefaults.TITLE;
|
34
|
-
this.subtitle = FileUploadDefaults.SUBTITLE;
|
35
|
-
this.state = FileUploadState.DEFAULT;
|
36
|
-
this.variant = FileUploadVariant.HORIZONTAL;
|
37
|
-
this.setState = (newState) => {
|
38
|
-
this.state = newState;
|
39
|
-
};
|
40
|
-
}
|
41
|
-
/**
|
42
|
-
* The styles for nile-file-upload
|
43
|
-
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
44
|
-
*/
|
45
|
-
static get styles() {
|
46
|
-
return [styles];
|
47
|
-
}
|
48
|
-
connectedCallback() {
|
49
|
-
super.connectedCallback();
|
50
|
-
this.emit(FileUploadEvent.NILE_INIT);
|
51
|
-
}
|
52
|
-
firstUpdated(changedProps) {
|
53
|
-
super.firstUpdated(changedProps);
|
54
|
-
this.dragHandler = new DragHandler();
|
55
|
-
getDragHandler(this.dragHandler);
|
56
|
-
setUpDragHandler(this, this.dragHandler);
|
57
|
-
addInternalListeners(this, this.dragHandler);
|
58
|
-
addGlobalListeners(this.dragHandler);
|
59
|
-
}
|
60
|
-
updated(changedProps) {
|
61
|
-
super.updated(changedProps);
|
62
|
-
if (changedProps.has('uploadedFiles')) {
|
63
|
-
this.emit(FileUploadEvent.NILE_CHANGE, { files: this.uploadedFiles });
|
64
|
-
}
|
65
|
-
else if (changedProps.has('state')) {
|
66
|
-
this.dragHandler.updateState(this.state);
|
67
|
-
}
|
68
|
-
}
|
69
|
-
browseFiles() {
|
70
|
-
this.emit(FileUploadEvent.NILE_BROWSE);
|
71
|
-
this.input.click();
|
72
|
-
}
|
73
|
-
render() {
|
74
|
-
return html `
|
75
|
-
${this.getState()}
|
76
|
-
`;
|
77
|
-
}
|
78
|
-
getState() {
|
79
|
-
return this.variant === FileUploadVariant.HORIZONTAL
|
80
|
-
? this.getHorizontalState()
|
81
|
-
: this.getVerticalState();
|
82
|
-
}
|
83
|
-
getHorizontalState() {
|
84
|
-
switch (this.state) {
|
85
|
-
case FileUploadState.DEFAULT:
|
86
|
-
return getHorizontalDefaultState(this.browseFiles, this.title, this.subtitle, this.errorMessage, this.state);
|
87
|
-
case FileUploadState.DISABLED:
|
88
|
-
return getHorizontalDisabledtState(this.browseFiles, this.title, this.subtitle);
|
89
|
-
case FileUploadState.DRAG:
|
90
|
-
return getHorizontalDragState();
|
91
|
-
default:
|
92
|
-
return getHorizontalDefaultState(this.browseFiles, this.title, this.subtitle, this.errorMessage, this.state);
|
93
|
-
}
|
94
|
-
}
|
95
|
-
getVerticalState() {
|
96
|
-
switch (this.state) {
|
97
|
-
case FileUploadState.DEFAULT:
|
98
|
-
return getVerticalDefaultState(this.browseFiles, this.title, this.subtitle, this.errorMessage, this.state);
|
99
|
-
case FileUploadState.DISABLED:
|
100
|
-
return getVerticalDisabledState(this.browseFiles, this.title, this.subtitle);
|
101
|
-
case FileUploadState.DRAG:
|
102
|
-
return getVerticalDragState();
|
103
|
-
default:
|
104
|
-
return getVerticalDefaultState(this.browseFiles, this.title, this.subtitle, this.errorMessage, this.state);
|
105
|
-
}
|
106
|
-
}
|
107
|
-
disconnectedCallback() {
|
108
|
-
this.emit(FileUploadEvent.NILE_DESTROY);
|
109
|
-
}
|
110
|
-
};
|
111
|
-
__decorate([
|
112
|
-
property({ type: Number })
|
113
|
-
], NileFileUpload.prototype, "size", void 0);
|
114
|
-
__decorate([
|
115
|
-
property({ type: Boolean })
|
116
|
-
], NileFileUpload.prototype, "error", void 0);
|
117
|
-
__decorate([
|
118
|
-
property({ type: String })
|
119
|
-
], NileFileUpload.prototype, "errorMessage", void 0);
|
120
|
-
__decorate([
|
121
|
-
property({ type: Boolean })
|
122
|
-
], NileFileUpload.prototype, "allowMultiple", void 0);
|
123
|
-
__decorate([
|
124
|
-
property({ type: Boolean })
|
125
|
-
], NileFileUpload.prototype, "allowDuplicates", void 0);
|
126
|
-
__decorate([
|
127
|
-
property({ type: Array })
|
128
|
-
], NileFileUpload.prototype, "uploadedFiles", void 0);
|
129
|
-
__decorate([
|
130
|
-
property({ type: String })
|
131
|
-
], NileFileUpload.prototype, "title", void 0);
|
132
|
-
__decorate([
|
133
|
-
property({ type: String })
|
134
|
-
], NileFileUpload.prototype, "subtitle", void 0);
|
135
|
-
__decorate([
|
136
|
-
property({ type: String })
|
137
|
-
], NileFileUpload.prototype, "state", void 0);
|
138
|
-
__decorate([
|
139
|
-
property({ type: String })
|
140
|
-
], NileFileUpload.prototype, "variant", void 0);
|
141
|
-
__decorate([
|
142
|
-
query('input')
|
143
|
-
], NileFileUpload.prototype, "input", void 0);
|
144
|
-
NileFileUpload = __decorate([
|
145
|
-
customElement('nile-file-upload')
|
146
|
-
], NileFileUpload);
|
147
|
-
export { NileFileUpload };
|
148
|
-
//# sourceMappingURL=nile-file-upload.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"nile-file-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\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { styles } from './nile-file-upload.css';\nimport { ChangedPropsInterface } from './types/file-upload.type'\nimport NileElement from '../internal/nile-element';\nimport { DragHandler } from './utils/drag-drop.util';\nimport { getDragHandler } from './nile-file-upload.template'\nimport { FileUploadDefaults } from './types/file-upload.enums';\nimport { LitElement, html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { FileUploadState, FileUploadVariant, FileUploadError, FileUploadEvent } from './types/file-upload.enums';\nimport { setUpDragHandler, addGlobalListeners, addInternalListeners } from './utils/file-validation.util';\nimport {\n getHorizontalDefaultState,\n getHorizontalDisabledtState,\n getHorizontalDragState,\n getVerticalDefaultState,\n getVerticalDisabledState,\n getVerticalDragState,\n} from './nile-file-upload.template';\n\n/**\n * Nile file-upload component.\n *\n * @tag nile-file-upload\n *\n */\n@customElement('nile-file-upload')\nexport class NileFileUpload extends NileElement {\n /**\n * The styles for nile-file-upload\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Number }) size: number = 0;\n @property({ type: Boolean}) error: boolean = false;\n @property({ type: String }) errorMessage: string = \"\";\n @property({ type: Boolean}) allowMultiple: boolean = true;\n @property({ type: Boolean}) allowDuplicates: boolean = true;\n @property({ type: Array }) uploadedFiles: File[] = [];\n @property({ type: String }) title: string = FileUploadDefaults.TITLE;\n @property({ type: String }) subtitle: string = FileUploadDefaults.SUBTITLE;\n @property({ type: String }) state: FileUploadState = FileUploadState.DEFAULT; \n @property({ type: String }) variant: FileUploadVariant = FileUploadVariant.HORIZONTAL;\n @query('input') input!: HTMLInputElement;\n \n private dragHandler!: DragHandler;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.emit(FileUploadEvent.NILE_INIT);\n }\n\n firstUpdated(changedProps: ChangedPropsInterface): void {\n super.firstUpdated(changedProps);\n\n this.dragHandler = new DragHandler();\n getDragHandler(this.dragHandler);\n setUpDragHandler(this, this.dragHandler);\n addInternalListeners(this, this.dragHandler);\n addGlobalListeners(this.dragHandler);\n }\n\n updated(changedProps: ChangedPropsInterface): void {\n super.updated(changedProps);\n\n if (changedProps.has('uploadedFiles')) {\n this.emit(FileUploadEvent.NILE_CHANGE, { files: this.uploadedFiles });\n } else if (changedProps.has('state')) {\n this.dragHandler.updateState(this.state);\n }\n }\n\n private browseFiles(): void {\n this.emit(FileUploadEvent.NILE_BROWSE);\n this.input.click();\n }\n\n public setState = (newState: FileUploadState): void => {\n this.state = newState;\n }\n\n render(): TemplateResult {\n return html`\n ${this.getState()}\n `;\n }\n\n private getState(): TemplateResult {\n return this.variant === FileUploadVariant.HORIZONTAL\n ? this.getHorizontalState()\n : this.getVerticalState();\n }\n\n private getHorizontalState(): TemplateResult {\n switch(this.state) {\n case FileUploadState.DEFAULT:\n return getHorizontalDefaultState(this.browseFiles, this.title, this.subtitle, this.errorMessage, this.state);\n\n case FileUploadState.DISABLED:\n return getHorizontalDisabledtState(this.browseFiles, this.title, this.subtitle);\n\n case FileUploadState.DRAG:\n return getHorizontalDragState();\n\n default:\n return getHorizontalDefaultState(this.browseFiles, this.title, this.subtitle, this.errorMessage, this.state);\n }\n }\n\n private getVerticalState(): TemplateResult {\n switch(this.state) {\n case FileUploadState.DEFAULT:\n return getVerticalDefaultState(this.browseFiles, this.title, this.subtitle, this.errorMessage, this.state);\n\n case FileUploadState.DISABLED:\n return getVerticalDisabledState(this.browseFiles, this.title, this.subtitle);\n\n case FileUploadState.DRAG:\n return getVerticalDragState();\n\n default:\n return getVerticalDefaultState(this.browseFiles, this.title, this.subtitle, this.errorMessage, this.state);\n }\n }\n\n disconnectedCallback(): void {\n this.emit(FileUploadEvent.NILE_DESTROY);\n }\n}\n"]}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import { TemplateResult } from 'lit';
|
2
|
-
import './nile-file-upload.css';
|
3
|
-
import { DragHandler } from './utils/drag-drop.util';
|
4
|
-
import { FileUploadState } from './types/file-upload.enums';
|
5
|
-
export declare const getDragHandler: (dragHandler: DragHandler) => void;
|
6
|
-
export declare const getHorizontalDefaultState: (browseFiles: Function, title: string, subtitle: string, errorMessage: string, state: FileUploadState) => TemplateResult;
|
7
|
-
export declare const getHorizontalDisabledtState: (browseFiles: Function, title: string, subtitle: string) => TemplateResult;
|
8
|
-
export declare const getHorizontalDragState: () => TemplateResult;
|
9
|
-
export declare const getVerticalDefaultState: (browseFiles: Function, title: string, subtitle: string, errorMessage: string, state: FileUploadState) => TemplateResult;
|
10
|
-
export declare const getVerticalDisabledState: (browseFiles: Function, title: string, subtitle: string) => TemplateResult;
|
11
|
-
export declare const getVerticalDragState: () => TemplateResult;
|
@@ -1,163 +0,0 @@
|
|
1
|
-
import { html } from 'lit';
|
2
|
-
import './nile-file-upload.css';
|
3
|
-
import { classMap } from 'lit-html/directives/class-map.js';
|
4
|
-
let dragHandlerInstance;
|
5
|
-
export const getDragHandler = (dragHandler) => {
|
6
|
-
dragHandlerInstance = dragHandler;
|
7
|
-
};
|
8
|
-
export const getHorizontalDefaultState = (browseFiles, title, subtitle, errorMessage, state) => html `
|
9
|
-
<div>
|
10
|
-
<div class=${classMap({ 'hover-border': state === "hover", 'horizontal-div': true })}>
|
11
|
-
<div class="inner-div">
|
12
|
-
<slot name="icon">
|
13
|
-
<nile-icon name="upload" size="24"></nile-icon>
|
14
|
-
</slot>
|
15
|
-
<div class="content">
|
16
|
-
<slot name="title">
|
17
|
-
<h4>${title}</h4>
|
18
|
-
</slot>
|
19
|
-
<slot name="subtitle">
|
20
|
-
<p>${subtitle}</p>
|
21
|
-
</slot>
|
22
|
-
</div>
|
23
|
-
</div>
|
24
|
-
<input
|
25
|
-
type="file"
|
26
|
-
@change=${(e) => dragHandlerInstance.handleFiles(e)}
|
27
|
-
multiple
|
28
|
-
/>
|
29
|
-
<nile-button @click=${browseFiles} variant="tertiary">
|
30
|
-
Browse File
|
31
|
-
</nile-button>
|
32
|
-
</div>
|
33
|
-
${errorMessage ?
|
34
|
-
html `<div class="upload-error">
|
35
|
-
<nile-icon name="warning" size="12" color="red"></nile-icon>
|
36
|
-
<span>${errorMessage}</span>
|
37
|
-
</div>` :
|
38
|
-
html ``}
|
39
|
-
</div>
|
40
|
-
`;
|
41
|
-
export const getHorizontalDisabledtState = (browseFiles, title, subtitle) => html `
|
42
|
-
<div
|
43
|
-
class="horizontal-div disabled"
|
44
|
-
>
|
45
|
-
<div class="inner-div">
|
46
|
-
<slot name="icon">
|
47
|
-
<nile-icon name="upload" size="24"></nile-icon>
|
48
|
-
</slot>
|
49
|
-
<div class="content">
|
50
|
-
<slot name="title">
|
51
|
-
<h4>${title}</h4>
|
52
|
-
</slot>
|
53
|
-
<slot name="subtitle">
|
54
|
-
<p>${subtitle}</p>
|
55
|
-
</slot>
|
56
|
-
</div>
|
57
|
-
</div>
|
58
|
-
<input
|
59
|
-
type="file"
|
60
|
-
@change=${(e) => dragHandlerInstance.handleFiles(e)}
|
61
|
-
multiple
|
62
|
-
/>
|
63
|
-
<nile-button @click=${browseFiles} variant="tertiary">
|
64
|
-
Browse File
|
65
|
-
</nile-button>
|
66
|
-
</div>
|
67
|
-
`;
|
68
|
-
export const getHorizontalDragState = () => html `
|
69
|
-
<div class="horizontal-div dragging">
|
70
|
-
<div class="icons-container">
|
71
|
-
<nile-icon
|
72
|
-
color="var(--nile-colors-blue-500)"
|
73
|
-
name="general"
|
74
|
-
size="20"
|
75
|
-
class="general-icon"
|
76
|
-
></nile-icon>
|
77
|
-
<nile-icon
|
78
|
-
color="var(--nile-colors-blue-500)"
|
79
|
-
name="image"
|
80
|
-
size="24"
|
81
|
-
class="image-icon"
|
82
|
-
></nile-icon>
|
83
|
-
</div>
|
84
|
-
<p>Drop files here to upload</p>
|
85
|
-
</div>
|
86
|
-
`;
|
87
|
-
// Vertical States
|
88
|
-
export const getVerticalDefaultState = (browseFiles, title, subtitle, errorMessage, state) => html `
|
89
|
-
<div>
|
90
|
-
<div class=${classMap({ 'hover-border': state === "hover", 'vertical-div': true })}>
|
91
|
-
<slot name="icon">
|
92
|
-
<nile-icon name="upload" size="24"></nile-icon>
|
93
|
-
</slot>
|
94
|
-
<div class="content-container">
|
95
|
-
<slot name="title">
|
96
|
-
<h4>${title}</h4>
|
97
|
-
</slot>
|
98
|
-
<slot name="title">
|
99
|
-
<p>${subtitle}</p>
|
100
|
-
</slot>
|
101
|
-
</div>
|
102
|
-
<input
|
103
|
-
type="file"
|
104
|
-
@change=${(e) => dragHandlerInstance.handleFiles(e)}
|
105
|
-
multiple
|
106
|
-
/>
|
107
|
-
<nile-button @click=${browseFiles} variant="tertiary">
|
108
|
-
Browse File
|
109
|
-
</nile-button>
|
110
|
-
</div>
|
111
|
-
${errorMessage ?
|
112
|
-
html `<div class="upload-error">
|
113
|
-
<nile-icon name="warning" size="12" color="red"></nile-icon>
|
114
|
-
<span>${errorMessage}</span>
|
115
|
-
</div>` :
|
116
|
-
html ``}
|
117
|
-
</div>
|
118
|
-
`;
|
119
|
-
export const getVerticalDisabledState = (browseFiles, title, subtitle) => html `
|
120
|
-
<div
|
121
|
-
class="vertical-deafult vertical-div disable"
|
122
|
-
>
|
123
|
-
<slot name="icon">
|
124
|
-
<nile-icon name="upload" size="24"></nile-icon>
|
125
|
-
</slot>
|
126
|
-
<div class="content-container">
|
127
|
-
<slot name="title">
|
128
|
-
<h4>${title}</h4>
|
129
|
-
</slot>
|
130
|
-
<slot name="title">
|
131
|
-
<p>${subtitle}o</p>
|
132
|
-
</slot>
|
133
|
-
</div>
|
134
|
-
<input
|
135
|
-
type="file"
|
136
|
-
@change=${(e) => dragHandlerInstance.handleFiles(e)}
|
137
|
-
multiple
|
138
|
-
/>
|
139
|
-
<nile-button @click=${browseFiles} variant="tertiary">
|
140
|
-
Browse File
|
141
|
-
</nile-button>
|
142
|
-
</div>
|
143
|
-
`;
|
144
|
-
export const getVerticalDragState = () => html `
|
145
|
-
<div class="vertical-div vertical-drag">
|
146
|
-
<div class="icons-container">
|
147
|
-
<nile-icon
|
148
|
-
color="var(--nile-colors-blue-500)"
|
149
|
-
name="general"
|
150
|
-
size="20"
|
151
|
-
class="general-icon"
|
152
|
-
></nile-icon>
|
153
|
-
<nile-icon
|
154
|
-
color="var(--nile-colors-blue-500)"
|
155
|
-
name="image"
|
156
|
-
size="24"
|
157
|
-
class="image-icon"
|
158
|
-
></nile-icon>
|
159
|
-
</div>
|
160
|
-
<p>Drop files here to upload</p>
|
161
|
-
</div>
|
162
|
-
`;
|
163
|
-
//# sourceMappingURL=nile-file-upload.template.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"nile-file-upload.template.js","sourceRoot":"","sources":["../../../src/nile-file-upload/nile-file-upload.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAC3C,OAAO,wBAAwB,CAAC;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAG5D,IAAI,mBAAgC,CAAC;AAErC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,WAAwB,EAAQ,EAAE;IAC/D,mBAAmB,GAAG,WAAW,CAAC;AACpC,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,WAAqB,EACrB,KAAa,EACb,QAAgB,EAChB,YAAoB,EACpB,KAAsB,EACN,EAAE,CAAC,IAAI,CAAA;;iBAER,QAAQ,CAAC,EAAE,cAAc,EAAE,KAAK,KAAK,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC;;;;;;;kBAOtE,KAAK;;;iBAGN,QAAQ;;;;;;kBAMP,CAAC,CAAoB,EAAE,EAAE,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC;;;4BAGlD,WAAW;;;;MAIjC,YAAY,CAAC,CAAC;IACd,IAAI,CAAA;;gBAEM,YAAY;aACf,CAAC,CAAC;IACT,IAAI,CA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","sourcesContent":["import { html, TemplateResult } from 'lit';\nimport './nile-file-upload.css';\nimport { DragHandler } from './utils/drag-drop.util';\nimport { classMap } from 'lit-html/directives/class-map.js';\nimport { FileUploadState } from './types/file-upload.enums';\n\nlet dragHandlerInstance: DragHandler;\n\nexport const getDragHandler = (dragHandler: DragHandler): void => {\n dragHandlerInstance = dragHandler;\n}\n\nexport const getHorizontalDefaultState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n errorMessage: string,\n state: FileUploadState\n): TemplateResult => html`\n <div>\n <div class=${classMap({ 'hover-border': state === \"hover\", 'horizontal-div': true })}>\n <div class=\"inner-div\">\n <slot name=\"icon\">\n <nile-icon name=\"upload\" size=\"24\"></nile-icon>\n </slot>\n <div class=\"content\">\n <slot name=\"title\">\n <h4>${title}</h4>\n </slot>\n <slot name=\"subtitle\">\n <p>${subtitle}</p>\n </slot>\n </div>\n </div>\n <input\n type=\"file\"\n @change=${(e: Event | DragEvent) => dragHandlerInstance.handleFiles(e)}\n multiple\n />\n <nile-button @click=${browseFiles} variant=\"tertiary\">\n Browse File\n </nile-button>\n </div>\n ${errorMessage ?\n html`<div class=\"upload-error\">\n <nile-icon name=\"warning\" size=\"12\" color=\"red\"></nile-icon>\n <span>${errorMessage}</span>\n </div>` :\n html``\n }\n </div>\n`;\n\nexport const getHorizontalDisabledtState = (\n browseFiles: Function,\n title: string,\n subtitle: string\n): TemplateResult => html`\n <div\n class=\"horizontal-div disabled\"\n >\n <div class=\"inner-div\">\n <slot name=\"icon\">\n <nile-icon name=\"upload\" size=\"24\"></nile-icon>\n </slot>\n <div class=\"content\">\n <slot name=\"title\">\n <h4>${title}</h4>\n </slot>\n <slot name=\"subtitle\">\n <p>${subtitle}</p>\n </slot>\n </div>\n </div>\n <input\n type=\"file\"\n @change=${(e: Event | DragEvent) => dragHandlerInstance.handleFiles(e)}\n multiple\n />\n <nile-button @click=${browseFiles} variant=\"tertiary\">\n Browse File\n </nile-button>\n </div>\n`;\n\nexport const getHorizontalDragState = (): TemplateResult => html`\n <div class=\"horizontal-div dragging\">\n <div class=\"icons-container\">\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"general\"\n size=\"20\"\n class=\"general-icon\"\n ></nile-icon>\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"image\"\n size=\"24\"\n class=\"image-icon\"\n ></nile-icon>\n </div>\n <p>Drop files here to upload</p>\n </div>\n`;\n\n// Vertical States\nexport const getVerticalDefaultState = (\n browseFiles: Function,\n title: string,\n subtitle: string,\n errorMessage: string,\n state: FileUploadState\n): TemplateResult => html`\n <div>\n <div class=${classMap({ 'hover-border': state === \"hover\", 'vertical-div': true })}>\n <slot name=\"icon\">\n <nile-icon name=\"upload\" size=\"24\"></nile-icon>\n </slot>\n <div class=\"content-container\">\n <slot name=\"title\">\n <h4>${title}</h4>\n </slot>\n <slot name=\"title\">\n <p>${subtitle}</p>\n </slot>\n </div>\n <input\n type=\"file\"\n @change=${(e: Event | DragEvent) => dragHandlerInstance.handleFiles(e)}\n multiple\n />\n <nile-button @click=${browseFiles} variant=\"tertiary\">\n Browse File\n </nile-button>\n </div>\n ${errorMessage ?\n html`<div class=\"upload-error\">\n <nile-icon name=\"warning\" size=\"12\" color=\"red\"></nile-icon>\n <span>${errorMessage}</span>\n </div>` :\n html``\n }\n </div>\n`;\n\nexport const getVerticalDisabledState = (\n browseFiles: Function,\n title: string,\n subtitle: string\n): TemplateResult => html`\n <div\n class=\"vertical-deafult vertical-div disable\"\n >\n <slot name=\"icon\">\n <nile-icon name=\"upload\" size=\"24\"></nile-icon>\n </slot>\n <div class=\"content-container\">\n <slot name=\"title\">\n <h4>${title}</h4>\n </slot>\n <slot name=\"title\">\n <p>${subtitle}o</p>\n </slot>\n </div>\n <input\n type=\"file\"\n @change=${(e: Event | DragEvent) => dragHandlerInstance.handleFiles(e)}\n multiple\n />\n <nile-button @click=${browseFiles} variant=\"tertiary\">\n Browse File\n </nile-button>\n </div>\n`;\n\nexport const getVerticalDragState = (): TemplateResult => html`\n <div class=\"vertical-div vertical-drag\">\n <div class=\"icons-container\">\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"general\"\n size=\"20\"\n class=\"general-icon\"\n ></nile-icon>\n <nile-icon\n color=\"var(--nile-colors-blue-500)\"\n name=\"image\"\n size=\"24\"\n class=\"image-icon\"\n ></nile-icon>\n </div>\n <p>Drop files here to upload</p>\n </div>\n`;"]}
|
@@ -1,30 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright Aquera Inc 2025
|
3
|
-
*
|
4
|
-
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
6
|
-
*/
|
7
|
-
import { fixture, assert, expect, html } from '@open-wc/testing';
|
8
|
-
import './nile-file-upload'; // Just import to register the element
|
9
|
-
describe('<nile-file-upload>', () => {
|
10
|
-
let element;
|
11
|
-
beforeEach(async () => {
|
12
|
-
element = await fixture(html `<nile-file-upload></nile-file-upload>`);
|
13
|
-
});
|
14
|
-
it('passes accessibility test', async () => {
|
15
|
-
await expect(element).to.be.accessible();
|
16
|
-
});
|
17
|
-
it('renders with the correct tag name', () => {
|
18
|
-
expect(element.tagName.toLowerCase()).to.equal('nile-file-upload');
|
19
|
-
});
|
20
|
-
it('renders with slot content when provided', async () => {
|
21
|
-
const testContent = 'Test Content';
|
22
|
-
element = await fixture(html `<nile-file-upload>${testContent}</nile-file-upload>`);
|
23
|
-
const slot = element.shadowRoot.querySelector('slot');
|
24
|
-
assert.exists(slot, 'Slot should exist');
|
25
|
-
const assignedNodes = slot.assignedNodes({ flatten: true });
|
26
|
-
expect(assignedNodes.length).to.be.greaterThan(0);
|
27
|
-
expect(assignedNodes[0].textContent?.trim()).to.equal(testContent);
|
28
|
-
});
|
29
|
-
});
|
30
|
-
//# sourceMappingURL=nile-file-upload.test.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"nile-file-upload.test.js","sourceRoot":"","sources":["../../../src/n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C;QAClD,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n \nimport { fixture, assert, expect, html } from '@open-wc/testing';\nimport './nile-file-upload'; // Just import to register the element\n\ndescribe('<nile-file-upload>', () => {\n let element: HTMLElement;\n\n beforeEach(async () => {\n element = await fixture(html`<nile-file-upload></nile-file-upload>`);\n });\n\n it('passes accessibility test', async () => {\n await expect(element).to.be.accessible();\n });\n\n it('renders with the correct tag name', () => {\n expect(element.tagName.toLowerCase()).to.equal('nile-file-upload');\n });\n\n it('renders with slot content when provided', async () => {\n const testContent = 'Test Content';\n element = await fixture(html`<nile-file-upload>${testContent}</nile-file-upload>`);\n \n const slot = (element.shadowRoot!.querySelector('slot') as HTMLSlotElement);\n assert.exists(slot, 'Slot should exist');\n\n const assignedNodes = slot.assignedNodes({ flatten: true });\n expect(assignedNodes.length).to.be.greaterThan(0);\n expect(assignedNodes[0].textContent?.trim()).to.equal(testContent);\n });\n});"]}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
export declare enum FileUploadState {
|
2
|
-
DEFAULT = "default",
|
3
|
-
DISABLED = "disabled",
|
4
|
-
HOVER = "hover",
|
5
|
-
DRAG = "drag"
|
6
|
-
}
|
7
|
-
export declare enum FileUploadVariant {
|
8
|
-
HORIZONTAL = "horizontal",
|
9
|
-
VERTICAL = "vertical"
|
10
|
-
}
|
11
|
-
export declare enum FileUploadError {
|
12
|
-
INVALID_FORMAT = "Invalid file format! Upload valid file.",
|
13
|
-
SIZE_LIMIT = "File exceeds size limit! Upload smaller size.",
|
14
|
-
MULTIPLE_NOT_ALLOWED = "Please Upload Single File!",
|
15
|
-
DUPLICATES_NOT_ALLOWED = "Duplicate Files Are Not Allowed!"
|
16
|
-
}
|
17
|
-
export declare enum FileUploadEvent {
|
18
|
-
NILE_INIT = "nile-init",
|
19
|
-
NILE_BROWSE = "nile-browse",
|
20
|
-
NILE_DRAG = "nile-drag",
|
21
|
-
NILE_CHANGE = "nile-change",
|
22
|
-
NILE_DESTROY = "nile-destroy"
|
23
|
-
}
|
24
|
-
export declare enum FileUploadDefaults {
|
25
|
-
TITLE = "Drag and drop to upload",
|
26
|
-
SUBTITLE = "PNG, JPG or SVG (upto 1MB) | 1:1 ratio",
|
27
|
-
ERROR_MESSAGE = "Invalid File Format."
|
28
|
-
}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
export var FileUploadState;
|
2
|
-
(function (FileUploadState) {
|
3
|
-
FileUploadState["DEFAULT"] = "default";
|
4
|
-
FileUploadState["DISABLED"] = "disabled";
|
5
|
-
FileUploadState["HOVER"] = "hover";
|
6
|
-
FileUploadState["DRAG"] = "drag";
|
7
|
-
})(FileUploadState || (FileUploadState = {}));
|
8
|
-
export var FileUploadVariant;
|
9
|
-
(function (FileUploadVariant) {
|
10
|
-
FileUploadVariant["HORIZONTAL"] = "horizontal";
|
11
|
-
FileUploadVariant["VERTICAL"] = "vertical";
|
12
|
-
})(FileUploadVariant || (FileUploadVariant = {}));
|
13
|
-
export var FileUploadError;
|
14
|
-
(function (FileUploadError) {
|
15
|
-
FileUploadError["INVALID_FORMAT"] = "Invalid file format! Upload valid file.";
|
16
|
-
FileUploadError["SIZE_LIMIT"] = "File exceeds size limit! Upload smaller size.";
|
17
|
-
FileUploadError["MULTIPLE_NOT_ALLOWED"] = "Please Upload Single File!";
|
18
|
-
FileUploadError["DUPLICATES_NOT_ALLOWED"] = "Duplicate Files Are Not Allowed!";
|
19
|
-
})(FileUploadError || (FileUploadError = {}));
|
20
|
-
export var FileUploadEvent;
|
21
|
-
(function (FileUploadEvent) {
|
22
|
-
FileUploadEvent["NILE_INIT"] = "nile-init";
|
23
|
-
FileUploadEvent["NILE_BROWSE"] = "nile-browse";
|
24
|
-
FileUploadEvent["NILE_DRAG"] = "nile-drag";
|
25
|
-
FileUploadEvent["NILE_CHANGE"] = "nile-change";
|
26
|
-
FileUploadEvent["NILE_DESTROY"] = "nile-destroy";
|
27
|
-
})(FileUploadEvent || (FileUploadEvent = {}));
|
28
|
-
export var FileUploadDefaults;
|
29
|
-
(function (FileUploadDefaults) {
|
30
|
-
FileUploadDefaults["TITLE"] = "Drag and drop to upload";
|
31
|
-
FileUploadDefaults["SUBTITLE"] = "PNG, JPG or SVG (upto 1MB) | 1:1 ratio";
|
32
|
-
FileUploadDefaults["ERROR_MESSAGE"] = "Invalid File Format.";
|
33
|
-
})(FileUploadDefaults || (FileUploadDefaults = {}));
|
34
|
-
;
|
35
|
-
//# sourceMappingURL=file-upload.enums.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"file-upload.enums.js","sourceRoot":"","sources":["../../../../src/nile-file-upload/types/file-upload.enums.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;IACrB,kCAAe,CAAA;IACf,gCAAa,CAAA;AACf,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,8CAAyB,CAAA;IACzB,0CAAqB,CAAA;AACvB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,6EAA0D,CAAA;IAC1D,+EAA4D,CAAA;IAC5D,sEAAmD,CAAA;IACnD,8EAA2D,CAAA;AAC7D,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AAED,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,0CAAuB,CAAA;IACvB,8CAA2B,CAAA;IAC3B,0CAAuB,CAAA;IACvB,8CAA2B,CAAA;IAC3B,gDAA6B,CAAA;AAC/B,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B;AAED,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,uDAAiC,CAAA;IACjC,yEAAmD,CAAA;IACnD,4DAAsC,CAAA;AACxC,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B;AAAA,CAAC","sourcesContent":["export enum FileUploadState {\n DEFAULT = 'default',\n DISABLED = 'disabled',\n HOVER = 'hover',\n DRAG = 'drag'\n}\n\nexport enum FileUploadVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical'\n}\n\nexport enum FileUploadError {\n INVALID_FORMAT = \"Invalid file format! Upload valid file.\",\n SIZE_LIMIT = \"File exceeds size limit! Upload smaller size.\",\n MULTIPLE_NOT_ALLOWED = \"Please Upload Single File!\",\n DUPLICATES_NOT_ALLOWED = \"Duplicate Files Are Not Allowed!\"\n}\n\nexport enum FileUploadEvent {\n NILE_INIT = \"nile-init\",\n NILE_BROWSE = \"nile-browse\",\n NILE_DRAG = \"nile-drag\",\n NILE_CHANGE = \"nile-change\",\n NILE_DESTROY = \"nile-destroy\"\n}\n\nexport enum FileUploadDefaults {\n TITLE = 'Drag and drop to upload',\n SUBTITLE = 'PNG, JPG or SVG (upto 1MB) | 1:1 ratio',\n ERROR_MESSAGE = 'Invalid File Format.',\n};"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"file-upload.type.js","sourceRoot":"","sources":["../../../../src/nile-file-upload/types/file-upload.type.ts"],"names":[],"mappings":"","sourcesContent":["import { PropertyValueMap } from 'lit';\n\nexport interface ChangedPropsInterface extends PropertyValueMap<any> {\n [key: string]: unknown;\n}"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/nile-file-upload/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAA","sourcesContent":["export * from './file-upload.enums';\nexport * from './file-upload.type'"]}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import { FileUploadState } from "../types";
|
2
|
-
export declare class DragHandler {
|
3
|
-
private currentState;
|
4
|
-
private stateChangeCallback?;
|
5
|
-
private fileDropCallback?;
|
6
|
-
constructor();
|
7
|
-
updateState(state: FileUploadState): void;
|
8
|
-
onFileDrop(callback: (files: File[]) => void): void;
|
9
|
-
onStateChange(callback: (state: FileUploadState) => void): void;
|
10
|
-
private setState;
|
11
|
-
dragEnter(e: DragEvent): void;
|
12
|
-
dragLeave(e: DragEvent): void;
|
13
|
-
dragOver(e: DragEvent): void;
|
14
|
-
drop(e: DragEvent): void;
|
15
|
-
handleDocumentDrop(e: DragEvent): void;
|
16
|
-
preventDragOver(e: DragEvent): void;
|
17
|
-
preventDrop(e: DragEvent): void;
|
18
|
-
handleFiles(event: Event | DragEvent): void;
|
19
|
-
}
|
@@ -1,77 +0,0 @@
|
|
1
|
-
import { FileUploadState } from "../types";
|
2
|
-
export class DragHandler {
|
3
|
-
constructor() {
|
4
|
-
this.currentState = FileUploadState.DEFAULT;
|
5
|
-
}
|
6
|
-
updateState(state) {
|
7
|
-
this.currentState = state;
|
8
|
-
}
|
9
|
-
onFileDrop(callback) {
|
10
|
-
this.fileDropCallback = callback;
|
11
|
-
}
|
12
|
-
onStateChange(callback) {
|
13
|
-
this.stateChangeCallback = callback;
|
14
|
-
}
|
15
|
-
setState(state) {
|
16
|
-
if (this.currentState === FileUploadState.DISABLED)
|
17
|
-
return;
|
18
|
-
this.currentState = state;
|
19
|
-
this.stateChangeCallback?.(state);
|
20
|
-
}
|
21
|
-
dragEnter(e) {
|
22
|
-
if (this.currentState === FileUploadState.DISABLED)
|
23
|
-
return;
|
24
|
-
e.preventDefault();
|
25
|
-
this.setState(FileUploadState.DRAG);
|
26
|
-
}
|
27
|
-
dragLeave(e) {
|
28
|
-
if (this.currentState === FileUploadState.DISABLED)
|
29
|
-
return;
|
30
|
-
e.preventDefault();
|
31
|
-
this.setState(FileUploadState.DEFAULT);
|
32
|
-
}
|
33
|
-
dragOver(e) {
|
34
|
-
if (this.currentState === FileUploadState.DISABLED)
|
35
|
-
return;
|
36
|
-
e.preventDefault();
|
37
|
-
}
|
38
|
-
drop(e) {
|
39
|
-
if (this.currentState === FileUploadState.DISABLED)
|
40
|
-
return;
|
41
|
-
e.preventDefault();
|
42
|
-
e.stopPropagation();
|
43
|
-
this.setState(FileUploadState.DEFAULT);
|
44
|
-
this.handleFiles(e);
|
45
|
-
}
|
46
|
-
handleDocumentDrop(e) {
|
47
|
-
if (this.currentState === FileUploadState.DISABLED)
|
48
|
-
return;
|
49
|
-
e.preventDefault();
|
50
|
-
e.stopPropagation();
|
51
|
-
this.setState(FileUploadState.DEFAULT);
|
52
|
-
}
|
53
|
-
preventDragOver(e) {
|
54
|
-
e.preventDefault();
|
55
|
-
}
|
56
|
-
preventDrop(e) {
|
57
|
-
e.preventDefault();
|
58
|
-
e.stopPropagation();
|
59
|
-
}
|
60
|
-
handleFiles(event) {
|
61
|
-
if (this.currentState === FileUploadState.DISABLED)
|
62
|
-
return;
|
63
|
-
event.preventDefault?.();
|
64
|
-
let files = null;
|
65
|
-
if ('dataTransfer' in event && event.dataTransfer) {
|
66
|
-
files = event.dataTransfer.files;
|
67
|
-
}
|
68
|
-
if (!files && event.target instanceof HTMLInputElement) {
|
69
|
-
files = event.target.files;
|
70
|
-
}
|
71
|
-
if (files && files.length > 0) {
|
72
|
-
const newFiles = Array.from(files);
|
73
|
-
this.fileDropCallback?.(newFiles);
|
74
|
-
}
|
75
|
-
}
|
76
|
-
}
|
77
|
-
//# sourceMappingURL=drag-drop.util.js.map
|