@sme.up/ketchup 11.0.0-SNAPSHOT-20241017090851 → 11.0.0-SNAPSHOT-20241017151034
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/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-activity-timeline.cjs.entry.js +1 -1
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +6 -6
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js.map +1 -1
- package/dist/cjs/kup-box.cjs.entry.js +1 -1
- package/dist/cjs/kup-calendar.cjs.entry.js +26 -25
- package/dist/cjs/kup-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/kup-cell.cjs.entry.js +43 -3
- package/dist/cjs/kup-cell.cjs.entry.js.map +1 -1
- package/dist/cjs/{kup-data-table-helper-cf31cb4e.js → kup-data-table-helper-52444d44.js} +2 -2
- package/dist/cjs/{kup-data-table-helper-cf31cb4e.js.map → kup-data-table-helper-52444d44.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/calendar.js +30 -29
- package/dist/collection/components/kup-calendar/kup-calendar-declarations.js.map +1 -1
- package/dist/collection/components/kup-calendar/kup-calendar.js +51 -25
- package/dist/collection/components/kup-calendar/kup-calendar.js.map +1 -1
- package/dist/collection/components/kup-tree/kup-tree-declarations.js +1 -1
- package/dist/collection/components/kup-tree/kup-tree-declarations.js.map +1 -1
- package/dist/collection/components/kup-tree/kup-tree.js +5 -5
- package/dist/collection/components/kup-tree/kup-tree.js.map +1 -1
- package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.js +42 -4
- package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.js.map +1 -1
- package/dist/components/kup-autocomplete2.js +6 -6
- package/dist/components/kup-autocomplete2.js.map +1 -1
- package/dist/components/kup-calendar.js +27 -25
- package/dist/components/kup-calendar.js.map +1 -1
- package/dist/components/kup-cell.js +44 -4
- package/dist/components/kup-cell.js.map +1 -1
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-activity-timeline.entry.js +1 -1
- package/dist/esm/kup-autocomplete_27.entry.js +6 -6
- package/dist/esm/kup-autocomplete_27.entry.js.map +1 -1
- package/dist/esm/kup-box.entry.js +1 -1
- package/dist/esm/kup-calendar.entry.js +26 -25
- package/dist/esm/kup-calendar.entry.js.map +1 -1
- package/dist/esm/kup-cell.entry.js +44 -4
- package/dist/esm/kup-cell.entry.js.map +1 -1
- package/dist/esm/{kup-data-table-helper-6b828446.js → kup-data-table-helper-74b29c0e.js} +2 -2
- package/dist/esm/{kup-data-table-helper-6b828446.js.map → kup-data-table-helper-74b29c0e.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js.map +1 -1
- package/dist/ketchup/{p-556618b0.entry.js → p-1b4dda8d.entry.js} +2 -2
- package/dist/ketchup/{p-f57c4edf.entry.js → p-40b3c165.entry.js} +3 -3
- package/dist/ketchup/{p-f57c4edf.entry.js.map → p-40b3c165.entry.js.map} +1 -1
- package/dist/ketchup/{p-35802f68.entry.js → p-6f138b8c.entry.js} +2 -2
- package/dist/ketchup/{p-c8ec502a.entry.js → p-aadfd358.entry.js} +2 -2
- package/dist/ketchup/p-aadfd358.entry.js.map +1 -0
- package/dist/ketchup/{p-454b6065.js → p-e9aaa7d5.js} +2 -2
- package/dist/ketchup/p-e9aaa7d5.js.map +1 -0
- package/dist/ketchup/p-f0f42ad4.entry.js +2 -0
- package/dist/ketchup/p-f0f42ad4.entry.js.map +1 -0
- package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +5 -5
- package/dist/types/components/kup-calendar/kup-calendar.d.ts +6 -1
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +3 -3
- package/dist/types/components.d.ts +12 -2
- package/package.json +1 -1
- package/dist/ketchup/p-454b6065.js.map +0 -1
- package/dist/ketchup/p-c8ec502a.entry.js.map +0 -1
- package/dist/ketchup/p-deea2b0f.entry.js +0 -2
- package/dist/ketchup/p-deea2b0f.entry.js.map +0 -1
- /package/dist/ketchup/{p-556618b0.entry.js.map → p-1b4dda8d.entry.js.map} +0 -0
- /package/dist/ketchup/{p-35802f68.entry.js.map → p-6f138b8c.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kup-calendar.js","sourceRoot":"","sources":["../../../src/components/kup-calendar/kup-calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,KAAK,EAEL,WAAW,EACX,YAAY,EACZ,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,QAAQ,GAIX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,aAAa,MAAM,uBAAuB,CAAC;AAClD,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAC1D,OAAO,UAAU,MAAM,oBAAoB,CAAC;AAC5C,OAAO,cAAc,MAAM,wBAAwB,CAAC;AACpD,OAAO,QAAQ,MAAM,kCAAkC,CAAC;AACxD,OAAO,QAAQ,MAAM,+BAA+B,CAAC;AACrD,OAAO,QAAQ,MAAM,+BAA+B,CAAC;AACrD,OAAO,QAAQ,MAAM,+BAA+B,CAAC;AACrD,OAAO,QAAQ,MAAM,+BAA+B,CAAC;AACrD,OAAO,QAAQ,MAAM,+BAA+B,CAAC;AACrD,OAAO,QAAQ,MAAM,kCAAkC,CAAC;AACxD,OAAO,EAEH,kBAAkB,GACrB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAKH,kB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n forceUpdate,\n getAssetPath,\n h,\n Host,\n Method,\n Prop,\n Watch,\n} from '@stencil/core';\nimport {\n Calendar,\n EventInput,\n EventSourceInput,\n LocaleInput,\n} from '@fullcalendar/core';\nimport dayGridPlugin from '@fullcalendar/daygrid';\nimport interactionPlugin from '@fullcalendar/interaction';\nimport listPlugin from '@fullcalendar/list';\nimport timeGridPlugin from '@fullcalendar/timegrid';\nimport enLocale from '@fullcalendar/core/locales/en-gb';\nimport esLocale from '@fullcalendar/core/locales/es';\nimport frLocale from '@fullcalendar/core/locales/fr';\nimport itLocale from '@fullcalendar/core/locales/it';\nimport plLocale from '@fullcalendar/core/locales/pl';\nimport ruLocale from '@fullcalendar/core/locales/ru';\nimport zhLocale from '@fullcalendar/core/locales/zh-cn';\nimport {\n KupManager,\n kupManagerInstance,\n} from '../../managers/kup-manager/kup-manager';\nimport { getColumnByName } from '../../utils/cell-utils';\nimport { componentWrapperId } from '../../variables/GenericVariables';\nimport { FButton } from '../../f-components/f-button/f-button';\nimport { getProps, setProps } from '../../utils/utils';\nimport { GenericObject, KupComponent } from '../../types/GenericTypes';\nimport {\n KupCalendarData,\n KupCalendarDateClickEventPayload,\n KupCalendarEventClickEventPayload,\n KupCalendarEventDropEventPayload,\n KupCalendarOptions,\n KupCalendarProps,\n KupCalendarViewChangeEventPayload,\n KupCalendarViewTypes,\n} from './kup-calendar-declarations';\nimport { FChip } from '../../f-components/f-chip/f-chip';\nimport {\n FChipsProps,\n FChipType,\n} from '../../f-components/f-chip/f-chip-declarations';\nimport { KupLanguageGeneric } from '../../managers/kup-language/kup-language-declarations';\nimport {\n KupDatesFormats,\n KupDatesLocales,\n} from '../../managers/kup-dates/kup-dates-declarations';\nimport {\n KupDataColumn,\n KupDataRow,\n} from '../../managers/kup-data/kup-data-declarations';\nimport { KupChipNode } from '../kup-chip/kup-chip-declarations';\n\n@Component({\n tag: 'kup-calendar',\n styleUrl: 'kup-calendar.scss',\n shadow: true,\n})\nexport class KupCalendar {\n /**\n * References the root HTML element of the component (<kup-calendar>).\n */\n @Element() rootElement: HTMLElement;\n\n /*-------------------------------------------------*/\n /* P r o p s */\n /*-------------------------------------------------*/\n\n /**\n * Sets the initial date of the calendar. Must be in ISO format (YYYY-MM-DD).\n * @default null\n */\n @Prop() currentDate: string = null;\n /**\n * Custom style of the component.\n * @default \"\"\n * @see https://smeup.github.io/ketchup/#/customization\n */\n @Prop() customStyle: string = '';\n /**\n * Actual data of the calendar.\n * @default null\n */\n @Prop() data: KupCalendarData = null;\n /**\n * When disabled, the navigation toolbar won't be displayed.\n * @default false\n */\n @Prop() hideNavigation = false;\n /**\n * When true, events are editable.\n * @default true\n */\n @Prop() editableEvents: boolean = true;\n /**\n * Type of the view.\n * @default KupCalendarViewTypes.MONTH\n */\n @Prop({ mutable: true }) viewType: KupCalendarViewTypes =\n KupCalendarViewTypes.MONTH;\n\n /*-------------------------------------------------*/\n /* I n t e r n a l V a r i a b l e s */\n /*-------------------------------------------------*/\n\n private calendar: Calendar;\n private calendarContainer: HTMLDivElement = null;\n private kupManager: KupManager = kupManagerInstance();\n private navTitle: HTMLDivElement = null;\n private resizeTimeout: number = null;\n private dateCol: string = null;\n private descrCol: string = null;\n private endCol: string = null;\n private iconCol: string = null;\n private imageCol: string = null;\n private startCol: string = null;\n private styleCol: string = null;\n\n /*-------------------------------------------------*/\n /* E v e n t s */\n /*-------------------------------------------------*/\n\n /**\n * When an event is clicked.\n */\n @Event({\n eventName: 'kup-calendar-eventclick',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupCalendarEventClick: EventEmitter<KupCalendarEventClickEventPayload>;\n /**\n * When a date is clicked.\n */\n @Event({\n eventName: 'kup-calendar-dateclick',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupCalendarDateClick: EventEmitter<KupCalendarDateClickEventPayload>;\n /**\n * When a date is dropped.\n */\n @Event({\n eventName: 'kup-calendar-eventdrop',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupCalendarEventDrop: EventEmitter<KupCalendarEventDropEventPayload>;\n /**\n * When the navigation change\n */\n @Event({\n eventName: 'kup-calendar-viewchange',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupCalendarViewChange: EventEmitter<KupCalendarViewChangeEventPayload>;\n\n /*-------------------------------------------------*/\n /* W a t c h e r s */\n /*-------------------------------------------------*/\n\n @Watch('data')\n @Watch('currentDate')\n setCalendarData() {\n if (!this.calendarContainer) {\n return;\n }\n if (this.calendar) {\n this.calendar.destroy();\n }\n for (\n let index = 0;\n this.data && this.data.columns && index < this.data.columns.length;\n index++\n ) {\n const column = this.data.columns[index];\n switch (column.calendarOption) {\n case KupCalendarOptions.DATE:\n this.dateCol = column.name;\n break;\n case KupCalendarOptions.DESCR:\n this.descrCol = column.name;\n break;\n case KupCalendarOptions.END:\n this.endCol = column.name;\n break;\n case KupCalendarOptions.ICON:\n this.iconCol = column.name;\n break;\n case KupCalendarOptions.IMAGE:\n this.imageCol = column.name;\n break;\n case KupCalendarOptions.START:\n this.startCol = column.name;\n break;\n case KupCalendarOptions.STYLE:\n this.styleCol = column.name;\n break;\n }\n }\n this.calendar = new Calendar(this.calendarContainer, {\n dateClick: ({ date }) => {\n this.kupCalendarDateClick.emit({\n comp: this,\n id: this.rootElement.id,\n date: date,\n });\n },\n editable: true,\n eventClick: ({ event }) => {\n this.kupCalendarEventClick.emit({\n comp: this,\n id: this.rootElement.id,\n row: event.extendedProps.row,\n });\n },\n eventDidMount: (info) => {\n if (this.iconCol) {\n const row: KupDataRow = info.event.extendedProps.row;\n const cell = row.cells[this.iconCol];\n if (cell && cell.value) {\n const wrapper = document.createElement('div');\n wrapper.classList.add('icon-wrapper');\n\n cell.value.split(';').forEach((icon) => {\n const span = document.createElement('span');\n span.className = 'custom-icon';\n const path: string = getAssetPath(\n `./assets/svg/${icon}.svg`\n );\n span.style.mask = `url('${path}') no-repeat center`;\n span.style.webkitMask = `url('${path}') no-repeat center`;\n wrapper.appendChild(span);\n });\n\n info.el.appendChild(wrapper);\n }\n }\n\n if (this.imageCol) {\n const row: KupDataRow = info.event.extendedProps.row;\n const cell = row.cells[this.imageCol];\n if (cell && cell.value) {\n const wrapper = document.createElement('div');\n wrapper.classList.add('image-wrapper');\n\n cell.value.split(';').forEach((icon) => {\n const img = document.createElement('img');\n img.src = icon;\n wrapper.appendChild(img);\n });\n\n info.el.appendChild(wrapper);\n }\n }\n\n if (this.styleCol) {\n const row: KupDataRow = info.event.extendedProps.row;\n const cell = row.cells[this.styleCol];\n const eventCell = info.el.children[0] as HTMLElement;\n const parent = eventCell.parentElement;\n if (cell && cell.style) {\n Object.keys(cell.style).forEach((k) => {\n parent.style[k] = cell.style[k];\n });\n }\n }\n },\n eventDrop: ({ event, oldEvent }) => {\n this.kupCalendarEventDrop.emit({\n comp: this,\n id: this.rootElement.id,\n fromDate: {\n start: oldEvent.start,\n end: oldEvent.end,\n },\n toDate: {\n start: event.start,\n end: event.end,\n },\n row: oldEvent.extendedProps?.row,\n });\n },\n events: this.getEvents(),\n headerToolbar: false,\n //initialDate: this.currentDate ? this.currentDate : new Date().toISOString().substring(0, 10),\n initialDate: this.currentDate,\n initialView: this.viewType,\n locale: this.getLocale(),\n locales: [\n esLocale,\n frLocale,\n itLocale,\n plLocale,\n ruLocale,\n zhLocale,\n ],\n plugins: [\n dayGridPlugin,\n interactionPlugin,\n listPlugin,\n timeGridPlugin,\n ],\n });\n this.calendar.render();\n }\n\n /*-------------------------------------------------*/\n /* P u b l i c M e t h o d s */\n /*-------------------------------------------------*/\n\n /**\n * Used to retrieve component's props values.\n * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.\n * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.\n */\n @Method()\n async getProps(descriptions?: boolean): Promise<GenericObject> {\n return getProps(this, KupCalendarProps, descriptions);\n }\n /**\n * This method is used to trigger a new render of the component.\n */\n @Method()\n async refresh(): Promise<void> {\n forceUpdate(this);\n }\n /**\n * This method is invoked by KupManager whenever the component changes size.\n */\n @Method()\n async resizeCallback(): Promise<void> {\n window.clearTimeout(this.resizeTimeout);\n this.resizeTimeout = window.setTimeout(() => {\n this.refresh();\n }, 300);\n }\n /**\n * Sets the props to the component.\n * @param {GenericObject} props - Object containing props that will be set to the component.\n */\n @Method()\n async setProps(props: GenericObject): Promise<void> {\n setProps(this, KupCalendarProps, props);\n }\n\n /*-------------------------------------------------*/\n /* P r i v a t e M e t h o d s */\n /*-------------------------------------------------*/\n\n private changeView(view: KupCalendarViewTypes) {\n this.viewType = view;\n this.calendar.changeView(view);\n this.emitNavEvent();\n }\n\n private getColumns(): KupDataColumn[] {\n if (this.data && this.data.rows) {\n return this.data.columns;\n }\n\n return [];\n }\n\n private getLocale(): LocaleInput {\n switch (this.kupManager.dates.locale) {\n case KupDatesLocales.CHINESE:\n return zhLocale;\n case KupDatesLocales.FRENCH:\n return frLocale;\n case KupDatesLocales.ITALIAN:\n return itLocale;\n case KupDatesLocales.POLISH:\n return plLocale;\n case KupDatesLocales.RUSSIAN:\n return ruLocale;\n case KupDatesLocales.SPANISH:\n return esLocale;\n default:\n return enLocale;\n }\n }\n\n private getRows(): KupDataRow[] {\n if (this.data && this.data.rows) {\n return this.data.rows;\n }\n\n return [];\n }\n\n private setChipProps(): FChipsProps {\n const props: FChipsProps = {\n data: [],\n onClick: [],\n type: FChipType.CHOICE,\n wrapperClass: 'navigation__choice',\n };\n for (const key in KupCalendarViewTypes) {\n const view: KupCalendarViewTypes = KupCalendarViewTypes[key];\n const chipData: KupChipNode = {\n checked: this.viewType === view ? true : false,\n value: this.kupManager.language.translate(\n KupLanguageGeneric[key]\n ),\n id: key,\n };\n props.data.push(chipData);\n props.onClick.push(() => this.changeView(view));\n }\n return props;\n }\n\n private getEvents(): EventSourceInput {\n const isHourRange =\n this.startCol &&\n this.endCol &&\n getColumnByName(this.getColumns(), this.startCol) &&\n getColumnByName(this.getColumns(), this.endCol);\n\n return this.getRows().map((row) => {\n const cell = row.cells[this.dateCol];\n let startDate = this.kupManager.dates.toDayjs(cell.value);\n let endDate = this.kupManager.dates.toDayjs(cell.value);\n\n if (isHourRange) {\n const startCell = row.cells[this.startCol];\n const endCell = row.cells[this.endCol];\n\n if (startCell && endCell) {\n const dayjsStart = this.kupManager.dates.toDayjs(\n startCell.value,\n KupDatesFormats.ISO_TIME\n );\n const dayjsEnd = this.kupManager.dates.toDayjs(\n endCell.value,\n KupDatesFormats.ISO_TIME\n );\n\n startDate = startDate.hour(dayjsStart.hour());\n startDate = startDate.minute(dayjsStart.minute());\n startDate = startDate.second(dayjsStart.second());\n\n endDate = endDate.hour(dayjsEnd.hour());\n endDate = endDate.minute(dayjsEnd.minute());\n endDate = endDate.second(dayjsEnd.second());\n }\n }\n\n const el: EventInput = {\n allDay: isHourRange ? false : true,\n editable: this.editableEvents,\n end: endDate.toISOString(),\n extendedProps: {\n row,\n },\n start: startDate.toISOString(),\n title: row.cells[this.descrCol].value,\n };\n\n return el;\n });\n }\n\n private onPrev() {\n this.calendar.prev();\n this.updateCalendar();\n this.emitNavEvent();\n }\n\n private onNext() {\n this.calendar.next();\n this.updateCalendar();\n this.emitNavEvent();\n }\n\n private onToday() {\n this.calendar.today();\n this.updateCalendar();\n }\n\n private emitNavEvent() {\n // see https://fullcalendar.io/docs/view-object\n const to: Date = this.kupManager.dates\n .subtract(this.calendar.view.currentEnd, 1, 'day')\n .toDate();\n\n this.kupCalendarViewChange.emit({\n comp: this,\n id: this.rootElement.id,\n from: this.calendar.view.currentStart,\n to,\n });\n }\n\n private updateCalendar() {\n if (this.calendar) {\n this.calendar.setOption('locale', this.getLocale());\n this.navTitle.innerText = this.calendar.getCurrentData().viewTitle;\n this.calendar.updateSize();\n }\n }\n\n /*-------------------------------------------------*/\n /* L i f e c y c l e H o o k s */\n /*-------------------------------------------------*/\n\n componentWillLoad() {\n this.kupManager.dates.register(this);\n this.kupManager.debug.logLoad(this, false);\n this.kupManager.language.register(this);\n this.kupManager.theme.register(this);\n }\n\n componentDidLoad() {\n this.setCalendarData();\n this.updateCalendar();\n this.kupManager.resize.observe(this.rootElement);\n this.kupManager.debug.logLoad(this, true);\n }\n\n componentWillRender() {\n this.kupManager.debug.logRender(this, false);\n }\n\n componentDidRender() {\n this.updateCalendar();\n this.kupManager.debug.logRender(this, true);\n }\n\n render() {\n return (\n <Host>\n <style>\n {this.kupManager.theme.setKupStyle(\n this.rootElement as KupComponent\n )}\n </style>\n <div id={componentWrapperId}>\n <div class=\"navigation\">\n {!this.hideNavigation ? (\n <div class=\"navigation__left\">\n <FButton\n icon=\"chevron_left\"\n onClick={() => this.onPrev()}\n title={this.kupManager.language.translate(\n KupLanguageGeneric.PREVIOUS\n )}\n wrapperClass=\"navigation__prev\"\n />\n <FButton\n icon=\"calendar\"\n onClick={() => this.onToday()}\n title={this.kupManager.language.translate(\n KupLanguageGeneric.TODAY\n )}\n wrapperClass=\"navigation__today\"\n />\n <FButton\n icon=\"chevron_right\"\n onClick={() => this.onNext()}\n title={this.kupManager.language.translate(\n KupLanguageGeneric.NEXT\n )}\n wrapperClass=\"navigation__next\"\n />\n </div>\n ) : null}\n <div\n class={`navigation__title ${\n this.hideNavigation\n ? 'navigation__title--centered'\n : ''\n }`}\n ref={(el) => {\n this.navTitle = el;\n }}\n ></div>\n {!this.hideNavigation ? (\n <div class=\"navigation__right\">\n <FChip {...this.setChipProps()}></FChip>\n </div>\n ) : null}\n </div>\n <div\n class=\"calendar\"\n ref={(el) => (this.calendarContainer = el)}\n ></div>\n </div>\n </Host>\n );\n }\n\n disconnectedCallback() {\n if (this.calendar) {\n this.calendar.destroy();\n }\n this.kupManager.dates.unregister(this);\n this.kupManager.language.unregister(this);\n this.kupManager.resize.unobserve(this.rootElement);\n this.kupManager.theme.unregister(this);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"kup-calendar.js","sourceRoot":"","sources":["../../../src/components/kup-calendar/kup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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n forceUpdate,\n getAssetPath,\n h,\n Host,\n Method,\n Prop,\n Watch,\n} from '@stencil/core';\nimport {\n Calendar,\n EventInput,\n EventSourceInput,\n LocaleInput,\n} from '@fullcalendar/core';\nimport dayGridPlugin from '@fullcalendar/daygrid';\nimport interactionPlugin from '@fullcalendar/interaction';\nimport listPlugin from '@fullcalendar/list';\nimport timeGridPlugin from '@fullcalendar/timegrid';\nimport enLocale from '@fullcalendar/core/locales/en-gb';\nimport esLocale from '@fullcalendar/core/locales/es';\nimport frLocale from '@fullcalendar/core/locales/fr';\nimport itLocale from '@fullcalendar/core/locales/it';\nimport plLocale from '@fullcalendar/core/locales/pl';\nimport ruLocale from '@fullcalendar/core/locales/ru';\nimport zhLocale from '@fullcalendar/core/locales/zh-cn';\nimport {\n KupManager,\n kupManagerInstance,\n} from '../../managers/kup-manager/kup-manager';\nimport { getColumnByName } from '../../utils/cell-utils';\nimport { componentWrapperId } from '../../variables/GenericVariables';\nimport { FButton } from '../../f-components/f-button/f-button';\nimport { getProps, setProps } from '../../utils/utils';\nimport { GenericObject, KupComponent } from '../../types/GenericTypes';\nimport {\n KupCalendarColumnsProp,\n KupCalendarData,\n KupCalendarDateClickEventPayload,\n KupCalendarEventClickEventPayload,\n KupCalendarEventDropEventPayload,\n KupCalendarOptions,\n KupCalendarProps,\n KupCalendarViewChangeEventPayload,\n KupCalendarViewTypes,\n} from './kup-calendar-declarations';\nimport { FChip } from '../../f-components/f-chip/f-chip';\nimport {\n FChipsProps,\n FChipType,\n} from '../../f-components/f-chip/f-chip-declarations';\nimport { KupLanguageGeneric } from '../../managers/kup-language/kup-language-declarations';\nimport {\n KupDatesFormats,\n KupDatesLocales,\n} from '../../managers/kup-dates/kup-dates-declarations';\nimport {\n KupDataColumn,\n KupDataRow,\n} from '../../managers/kup-data/kup-data-declarations';\nimport { KupChipNode } from '../kup-chip/kup-chip-declarations';\n\n@Component({\n tag: 'kup-calendar',\n styleUrl: 'kup-calendar.scss',\n shadow: true,\n})\nexport class KupCalendar {\n /**\n * References the root HTML element of the component (<kup-calendar>).\n */\n @Element() rootElement: HTMLElement;\n\n /*-------------------------------------------------*/\n /* P r o p s */\n /*-------------------------------------------------*/\n\n /**\n * Sets the initial date of the calendar. Must be in ISO format (YYYY-MM-DD).\n * @default null\n */\n @Prop() currentDate: string = null;\n /**\n * Custom style of the component.\n * @default \"\"\n * @see https://smeup.github.io/ketchup/#/customization\n */\n @Prop() customStyle: string = '';\n /**\n * Actual data of the calendar.\n * @default null\n */\n @Prop() data: KupCalendarData = null;\n /**\n * Sets the data to be used to render each event in the calendar\n * @default {KupCalendarOptions:false}\n */\n @Prop() calendarColumns: KupCalendarColumnsProp = {\n [KupCalendarOptions.DATE]: false,\n [KupCalendarOptions.DESCR]: false,\n [KupCalendarOptions.END]: false,\n [KupCalendarOptions.ICON]: false,\n [KupCalendarOptions.IMAGE]: false,\n [KupCalendarOptions.START]: false,\n [KupCalendarOptions.STYLE]: false,\n };\n /**\n * When disabled, the navigation toolbar won't be displayed.\n * @default false\n */\n @Prop() hideNavigation = false;\n /**\n * When true, events are editable.\n * @default true\n */\n @Prop() editableEvents: boolean = true;\n /**\n * Type of the view.\n * @default KupCalendarViewTypes.MONTH\n */\n @Prop({ mutable: true }) viewType: KupCalendarViewTypes =\n KupCalendarViewTypes.MONTH;\n\n /*-------------------------------------------------*/\n /* I n t e r n a l V a r i a b l e s */\n /*-------------------------------------------------*/\n\n private calendar: Calendar;\n private calendarContainer: HTMLDivElement = null;\n private kupManager: KupManager = kupManagerInstance();\n private navTitle: HTMLDivElement = null;\n private resizeTimeout: number = null;\n private dateCol: string = null;\n private descrCol: string = null;\n private endCol: string = null;\n private iconCol: string = null;\n private imageCol: string = null;\n private startCol: string = null;\n private styleCol: string = null;\n\n /*-------------------------------------------------*/\n /* E v e n t s */\n /*-------------------------------------------------*/\n\n /**\n * When an event is clicked.\n */\n @Event({\n eventName: 'kup-calendar-eventclick',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupCalendarEventClick: EventEmitter<KupCalendarEventClickEventPayload>;\n /**\n * When a date is clicked.\n */\n @Event({\n eventName: 'kup-calendar-dateclick',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupCalendarDateClick: EventEmitter<KupCalendarDateClickEventPayload>;\n /**\n * When a date is dropped.\n */\n @Event({\n eventName: 'kup-calendar-eventdrop',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupCalendarEventDrop: EventEmitter<KupCalendarEventDropEventPayload>;\n /**\n * When the navigation change\n */\n @Event({\n eventName: 'kup-calendar-viewchange',\n composed: true,\n cancelable: false,\n bubbles: true,\n })\n kupCalendarViewChange: EventEmitter<KupCalendarViewChangeEventPayload>;\n\n /*-------------------------------------------------*/\n /* W a t c h e r s */\n /*-------------------------------------------------*/\n\n @Watch('data')\n @Watch('currentDate')\n setCalendarData() {\n if (!this.calendarContainer) {\n return;\n }\n if (this.calendar) {\n this.calendar.destroy();\n }\n for (\n let index = 0;\n this.data && this.data.columns && index < this.data.columns.length;\n index++\n ) {\n const column = this.data.columns[index];\n const columnOptionsMap = {\n date: { option: KupCalendarOptions.DATE, prop: 'dateCol' },\n descr: { option: KupCalendarOptions.DESCR, prop: 'descrCol' },\n end: { option: KupCalendarOptions.END, prop: 'endCol' },\n icon: { option: KupCalendarOptions.ICON, prop: 'iconCol' },\n image: { option: KupCalendarOptions.IMAGE, prop: 'imageCol' },\n start: { option: KupCalendarOptions.START, prop: 'startCol' },\n style: { option: KupCalendarOptions.STYLE, prop: 'styleCol' }\n };\n\n Object.entries(this.calendarColumns).forEach(([key, value]) => {\n const optionConfig = columnOptionsMap[key];\n if (value && column.name === optionConfig.option) {\n this[optionConfig.prop] = column.name;\n }\n });\n }\n\n this.calendar = new Calendar(this.calendarContainer, {\n dateClick: ({ date }) => {\n this.kupCalendarDateClick.emit({\n comp: this,\n id: this.rootElement.id,\n date: date,\n });\n },\n editable: true,\n eventClick: ({ event }) => {\n this.kupCalendarEventClick.emit({\n comp: this,\n id: this.rootElement.id,\n row: event.extendedProps.row,\n });\n },\n eventDidMount: (info) => {\n if (this.iconCol) {\n const row: KupDataRow = info.event.extendedProps.row;\n const cell = row.cells[this.iconCol];\n if (cell && cell.value) {\n const wrapper = document.createElement('div');\n wrapper.classList.add('icon-wrapper');\n\n cell.value.split(';').forEach((icon) => {\n const span = document.createElement('span');\n span.className = 'custom-icon';\n const path: string = getAssetPath(\n `./assets/svg/${icon}.svg`\n );\n span.style.mask = `url('${path}') no-repeat center`;\n span.style.webkitMask = `url('${path}') no-repeat center`;\n wrapper.appendChild(span);\n });\n\n info.el.appendChild(wrapper);\n }\n }\n\n if (this.imageCol) {\n const row: KupDataRow = info.event.extendedProps.row;\n const cell = row.cells[this.imageCol];\n if (cell && cell.value) {\n const wrapper = document.createElement('div');\n wrapper.classList.add('image-wrapper');\n\n cell.value.split(';').forEach((icon) => {\n const img = document.createElement('img');\n img.src = icon;\n wrapper.appendChild(img);\n });\n\n info.el.appendChild(wrapper);\n }\n }\n\n if (this.styleCol) {\n const row: KupDataRow = info.event.extendedProps.row;\n const cell = row.cells[this.styleCol];\n const eventCell = info.el.children[0] as HTMLElement;\n const parent = eventCell.parentElement;\n if (cell && cell.style) {\n Object.keys(cell.style).forEach((k) => {\n parent.style[k] = cell.style[k];\n });\n }\n }\n },\n eventDrop: ({ event, oldEvent }) => {\n this.kupCalendarEventDrop.emit({\n comp: this,\n id: this.rootElement.id,\n fromDate: {\n start: oldEvent.start,\n end: oldEvent.end,\n },\n toDate: {\n start: event.start,\n end: event.end,\n },\n row: oldEvent.extendedProps?.row,\n });\n },\n events: this.getEvents(),\n headerToolbar: false,\n //initialDate: this.currentDate ? this.currentDate : new Date().toISOString().substring(0, 10),\n initialDate: this.currentDate,\n initialView: this.viewType,\n locale: this.getLocale(),\n locales: [\n esLocale,\n frLocale,\n itLocale,\n plLocale,\n ruLocale,\n zhLocale,\n ],\n plugins: [\n dayGridPlugin,\n interactionPlugin,\n listPlugin,\n timeGridPlugin,\n ],\n });\n this.calendar.render();\n }\n\n /*-------------------------------------------------*/\n /* P u b l i c M e t h o d s */\n /*-------------------------------------------------*/\n\n /**\n * Used to retrieve component's props values.\n * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.\n * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.\n */\n @Method()\n async getProps(descriptions?: boolean): Promise<GenericObject> {\n return getProps(this, KupCalendarProps, descriptions);\n }\n /**\n * This method is used to trigger a new render of the component.\n */\n @Method()\n async refresh(): Promise<void> {\n forceUpdate(this);\n }\n /**\n * This method is invoked by KupManager whenever the component changes size.\n */\n @Method()\n async resizeCallback(): Promise<void> {\n window.clearTimeout(this.resizeTimeout);\n this.resizeTimeout = window.setTimeout(() => {\n this.refresh();\n }, 300);\n }\n /**\n * Sets the props to the component.\n * @param {GenericObject} props - Object containing props that will be set to the component.\n */\n @Method()\n async setProps(props: GenericObject): Promise<void> {\n setProps(this, KupCalendarProps, props);\n }\n\n /*-------------------------------------------------*/\n /* P r i v a t e M e t h o d s */\n /*-------------------------------------------------*/\n\n private changeView(view: KupCalendarViewTypes) {\n this.viewType = view;\n this.calendar.changeView(view);\n this.emitNavEvent();\n }\n\n private getColumns(): KupDataColumn[] {\n if (this.data && this.data.rows) {\n return this.data.columns;\n }\n\n return [];\n }\n\n private getLocale(): LocaleInput {\n switch (this.kupManager.dates.locale) {\n case KupDatesLocales.CHINESE:\n return zhLocale;\n case KupDatesLocales.FRENCH:\n return frLocale;\n case KupDatesLocales.ITALIAN:\n return itLocale;\n case KupDatesLocales.POLISH:\n return plLocale;\n case KupDatesLocales.RUSSIAN:\n return ruLocale;\n case KupDatesLocales.SPANISH:\n return esLocale;\n default:\n return enLocale;\n }\n }\n\n private getRows(): KupDataRow[] {\n if (this.data && this.data.rows) {\n return this.data.rows;\n }\n\n return [];\n }\n\n private setChipProps(): FChipsProps {\n const props: FChipsProps = {\n data: [],\n onClick: [],\n type: FChipType.CHOICE,\n wrapperClass: 'navigation__choice',\n };\n for (const key in KupCalendarViewTypes) {\n const view: KupCalendarViewTypes = KupCalendarViewTypes[key];\n const chipData: KupChipNode = {\n checked: this.viewType === view ? true : false,\n value: this.kupManager.language.translate(\n KupLanguageGeneric[key]\n ),\n id: key,\n };\n props.data.push(chipData);\n props.onClick.push(() => this.changeView(view));\n }\n return props;\n }\n\n private getEvents(): EventSourceInput {\n const isHourRange =\n this.startCol &&\n this.endCol &&\n getColumnByName(this.getColumns(), this.startCol) &&\n getColumnByName(this.getColumns(), this.endCol);\n\n return this.getRows().map((row) => {\n const cell = row.cells[this.dateCol];\n let startDate = this.kupManager.dates.toDayjs(cell.value);\n let endDate = this.kupManager.dates.toDayjs(cell.value);\n\n if (isHourRange) {\n const startCell = row.cells[this.startCol];\n const endCell = row.cells[this.endCol];\n\n if (startCell && endCell) {\n const dayjsStart = this.kupManager.dates.toDayjs(\n startCell.value,\n KupDatesFormats.ISO_TIME\n );\n const dayjsEnd = this.kupManager.dates.toDayjs(\n endCell.value,\n KupDatesFormats.ISO_TIME\n );\n\n startDate = startDate.hour(dayjsStart.hour());\n startDate = startDate.minute(dayjsStart.minute());\n startDate = startDate.second(dayjsStart.second());\n\n endDate = endDate.hour(dayjsEnd.hour());\n endDate = endDate.minute(dayjsEnd.minute());\n endDate = endDate.second(dayjsEnd.second());\n }\n }\n\n const el: EventInput = {\n allDay: isHourRange ? false : true,\n editable: this.editableEvents,\n end: endDate.toISOString(),\n extendedProps: {\n row,\n },\n start: startDate.toISOString(),\n title: row.cells[this.descrCol].value,\n };\n\n return el;\n });\n }\n\n private onPrev() {\n this.calendar.prev();\n this.updateCalendar();\n this.emitNavEvent();\n }\n\n private onNext() {\n this.calendar.next();\n this.updateCalendar();\n this.emitNavEvent();\n }\n\n private onToday() {\n this.calendar.today();\n this.updateCalendar();\n }\n\n private emitNavEvent() {\n // see https://fullcalendar.io/docs/view-object\n const to: Date = this.kupManager.dates\n .subtract(this.calendar.view.currentEnd, 1, 'day')\n .toDate();\n\n this.kupCalendarViewChange.emit({\n comp: this,\n id: this.rootElement.id,\n from: this.calendar.view.currentStart,\n to,\n });\n }\n\n private updateCalendar() {\n if (this.calendar) {\n this.calendar.setOption('locale', this.getLocale());\n this.navTitle.innerText = this.calendar.getCurrentData().viewTitle;\n this.calendar.updateSize();\n }\n }\n\n /*-------------------------------------------------*/\n /* L i f e c y c l e H o o k s */\n /*-------------------------------------------------*/\n\n componentWillLoad() {\n this.kupManager.dates.register(this);\n this.kupManager.debug.logLoad(this, false);\n this.kupManager.language.register(this);\n this.kupManager.theme.register(this);\n }\n\n componentDidLoad() {\n this.setCalendarData();\n this.updateCalendar();\n this.kupManager.resize.observe(this.rootElement);\n this.kupManager.debug.logLoad(this, true);\n }\n\n componentWillRender() {\n this.kupManager.debug.logRender(this, false);\n }\n\n componentDidRender() {\n this.updateCalendar();\n this.kupManager.debug.logRender(this, true);\n }\n\n render() {\n return (\n <Host>\n <style>\n {this.kupManager.theme.setKupStyle(\n this.rootElement as KupComponent\n )}\n </style>\n <div id={componentWrapperId}>\n <div class=\"navigation\">\n {!this.hideNavigation ? (\n <div class=\"navigation__left\">\n <FButton\n icon=\"chevron_left\"\n onClick={() => this.onPrev()}\n title={this.kupManager.language.translate(\n KupLanguageGeneric.PREVIOUS\n )}\n wrapperClass=\"navigation__prev\"\n />\n <FButton\n icon=\"calendar\"\n onClick={() => this.onToday()}\n title={this.kupManager.language.translate(\n KupLanguageGeneric.TODAY\n )}\n wrapperClass=\"navigation__today\"\n />\n <FButton\n icon=\"chevron_right\"\n onClick={() => this.onNext()}\n title={this.kupManager.language.translate(\n KupLanguageGeneric.NEXT\n )}\n wrapperClass=\"navigation__next\"\n />\n </div>\n ) : null}\n <div\n class={`navigation__title ${\n this.hideNavigation\n ? 'navigation__title--centered'\n : ''\n }`}\n ref={(el) => {\n this.navTitle = el;\n }}\n ></div>\n {!this.hideNavigation ? (\n <div class=\"navigation__right\">\n <FChip {...this.setChipProps()}></FChip>\n </div>\n ) : null}\n </div>\n <div\n class=\"calendar\"\n ref={(el) => (this.calendarContainer = el)}\n ></div>\n </div>\n </Host>\n );\n }\n\n disconnectedCallback() {\n if (this.calendar) {\n this.calendar.destroy();\n }\n this.kupManager.dates.unregister(this);\n this.kupManager.language.unregister(this);\n this.kupManager.resize.unobserve(this.rootElement);\n this.kupManager.theme.unregister(this);\n }\n}\n"]}
|
|
@@ -17,8 +17,8 @@ export var KupTreeProps;
|
|
|
17
17
|
KupTreeProps["globalFilter"] = "When set to true it activates the global filter.";
|
|
18
18
|
KupTreeProps["globalFilterValue"] = "The value of the global filter.";
|
|
19
19
|
KupTreeProps["globalFilterMode"] = "The mode of the global filter.";
|
|
20
|
-
KupTreeProps["removableColumns"] = "Sets the possibility to remove the selected column.";
|
|
21
20
|
KupTreeProps["preventXScroll"] = "Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.";
|
|
21
|
+
KupTreeProps["removableColumns"] = "Sets the possibility to remove the selected column.";
|
|
22
22
|
KupTreeProps["ripple"] = "When enabled displays Material's ripple effect on nodes (only when no columns are displayed).";
|
|
23
23
|
KupTreeProps["scrollOnHover"] = "Activates the scroll on hover function.";
|
|
24
24
|
KupTreeProps["showColumns"] = "Shows the tree data as a table.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kup-tree-declarations.js","sourceRoot":"","sources":["../../../src/components/kup-tree/kup-tree-declarations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"kup-tree-declarations.js","sourceRoot":"","sources":["../../../src/components/kup-tree/kup-tree-declarations.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,MAAM,CAAN,IAAY,YA2BX;AA3BD,WAAY,YAAY;IACpB,4GAA4F,CAAA;IAC5F,sFAAsE,CAAA;IACtE,8DAA8C,CAAA;IAC9C,4GAA4F,CAAA;IAC5F,mHAAmG,CAAA;IACnG,0oBAA0nB,CAAA;IAC1nB,oEAAoD,CAAA;IACpD,yIAAyH,CAAA;IACzH,6KAA6J,CAAA;IAC7J,4DAA4C,CAAA;IAC5C,iFAAiE,CAAA;IACjE,qEAAqD,CAAA;IACrD,mEAAmD,CAAA;IACnD,mOAAmN,CAAA;IACnN,wFAAwE,CAAA;IACxE,wHAAwG,CAAA;IACxG,yEAAyD,CAAA;IACzD,+DAA+C,CAAA;IAC/C,4EAA4D,CAAA;IAC5D,iEAAiD,CAAA;IACjD,wGAAwF,CAAA;IACxF,2DAA2C,CAAA;IAC3C,4BAAY,CAAA;IACZ,0BAAU,CAAA;IACV,8DAA8C,CAAA;IAC9C,kWAAkV,CAAA;AACtV,CAAC,EA3BW,YAAY,KAAZ,YAAY,QA2BvB;AAWD;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAC;AAiBhD,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC5B,6CAAqB,CAAA;IACrB,qCAAa,CAAA;AACjB,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B","sourcesContent":["import {\n KupDataCell,\n KupDataColumn,\n KupDataNode,\n} from '../../managers/kup-data/kup-data-declarations';\nimport type { PointerEvent } from '@interactjs/types/index';\nimport { GenericMap, KupEventPayload } from '../../types/GenericTypes';\nimport { KupCardEventPayload } from '../kup-card/kup-card-declarations';\n/**\n * Props of the kup-tree component.\n * Used to export every prop in an object.\n */\nexport enum KupTreeProps {\n asAccordion = 'When enabled, the first level of depth will give an accordion look to nodes.',\n columns = 'The columns of the tree when tree visualization is active.',\n customStyle = 'Custom style of the component.',\n data = 'The json data used to populate the tree view: the basic, always visible tree nodes.',\n density = \"The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.\",\n dynamicExpansionCallback = 'Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.',\n enableExtraColumns = 'Enables adding extra columns.',\n expanded = 'Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.',\n expansionMode = \"Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.\",\n filters = 'List of filters set by the user.',\n globalFilter = 'When set to true it activates the global filter.',\n globalFilterValue = 'The value of the global filter.',\n globalFilterMode = 'The mode of the global filter.',\n preventXScroll = 'Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.',\n removableColumns = 'Sets the possibility to remove the selected column.',\n ripple = \"When enabled displays Material's ripple effect on nodes (only when no columns are displayed).\",\n scrollOnHover = 'Activates the scroll on hover function.',\n showColumns = 'Shows the tree data as a table.',\n showFilters = 'When set to true enables the column filters.',\n showFooter = 'When set to true shows the footer.',\n showHeader = 'Flag: shows the header of the tree when the tree is displayed as a table.',\n showIcons = 'Shows the icons of the nodes.',\n stateId = '',\n store = '',\n totals = 'Defines the current totals options.',\n useDynamicExpansion = 'When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server.',\n}\n\nexport interface KupTreeNode extends KupDataNode {\n expandable?: boolean;\n iconColor?: string;\n style?: GenericMap;\n visible?: boolean;\n}\n\nexport type TreeNodePath = number[];\n\n/**\n * The name of the constant used by the tree component to identify the main tree in column menu\n * @constant\n */\nexport const treeMainColumnName = 'TREE_COLUMN';\n\n/**\n * Contains all the data of an event.\n */\nexport interface KupTreeEventHandlerDetails {\n area: string;\n cell: KupDataCell;\n column: KupDataColumn;\n filterRemove: HTMLSpanElement;\n originalEvent: PointerEvent;\n row: KupTreeNode;\n td: HTMLElement;\n th: HTMLElement;\n tr: HTMLElement;\n}\n\nexport enum KupTreeExpansionMode {\n DROPDOWN = 'dropdown',\n NODE = 'node',\n}\n\nexport interface KupTreeNodeCollapseEventPayload extends KupEventPayload {\n treeNodePath: TreeNodePath;\n treeNode: KupDataNode;\n}\n\nexport interface KupTreeNodeExpandEventPayload\n extends KupTreeNodeCollapseEventPayload {\n usesDynamicExpansion?: boolean;\n dynamicExpansionRequireChildren?: boolean;\n}\n\nexport interface KupTreeNodeSelectedEventPayload\n extends KupTreeNodeCollapseEventPayload {\n columnName: string;\n}\n\nexport interface KupTreeNodeButtonClickEventPayload\n extends KupTreeNodeCollapseEventPayload {\n column: KupDataColumn;\n columnName: string;\n}\n\nexport interface KupTreeContextMenuEventPayload extends KupEventPayload {\n details: KupTreeEventHandlerDetails;\n}\n\nexport interface KupTreeColumnMenuEventPayload extends KupEventPayload {\n card: HTMLKupCardElement;\n event: CustomEvent<KupCardEventPayload | KupEventPayload>;\n open: boolean;\n}\n\nexport interface KupTreeDynamicMassExpansionEventPayload\n extends KupEventPayload {\n treeNodePath?: TreeNodePath;\n treeNode?: KupDataNode;\n expandAll?: boolean;\n}\n\nexport interface KupTreeColumnRemoveEventPayload extends KupEventPayload {\n column: KupDataColumn;\n}\n"]}
|
|
@@ -1362,17 +1362,17 @@ export class KupTree {
|
|
|
1362
1362
|
this.data &&
|
|
1363
1363
|
this.data.length &&
|
|
1364
1364
|
this.data.length > 0) {
|
|
1365
|
-
filterField = (h("div", { key: '
|
|
1365
|
+
filterField = (h("div", { key: '845f0a6bef83bfaaa76aad5845ee5af6768a1a09', id: "global-filter" }, h("kup-text-field", { key: 'c5aaaa7c98e5dfce92c2e6c11f75747fd69f550e', fullWidth: true, label: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), icon: KupThemeIconValues.SEARCH, initialValue: this.globalFilterValue, "onkup-textfield-input": (event) => {
|
|
1366
1366
|
window.clearTimeout(this.globalFilterTimeout);
|
|
1367
1367
|
this.globalFilterTimeout = window.setTimeout(() => this.onGlobalFilterChange(event), 600);
|
|
1368
1368
|
} })));
|
|
1369
1369
|
}
|
|
1370
|
-
return (h(Host, { key: '
|
|
1371
|
-
el) }, h("table", { key: '
|
|
1370
|
+
return (h(Host, { key: 'c41109b7db78f7cde7dc4ba9cec7263e4d31786f' }, h("style", { key: '0a4bfe1f6335c08087476992a330ef8c26fc2efc' }, __classPrivateFieldGet(this, _KupTree_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '2353e8b40be7585ef6313a9c06fff87b17a9d6d4', id: componentWrapperId, class: wrapperClass }, filterField, h("div", { key: '7799575e8dd9ff74c412449340f7e3fbf9ecd8f9', class: "wrapper", ref: (el) => (this.treeWrapperRef =
|
|
1371
|
+
el) }, h("table", { key: 'a499a4bc1b3e66e91c6dd108bc75277823036d84', class: "kup-tree", "data-show-columns": this.showColumns, onContextMenu: (e) => {
|
|
1372
1372
|
e.preventDefault();
|
|
1373
|
-
} }, h("thead", { key: '
|
|
1373
|
+
} }, h("thead", { key: '17ec2f81534c1159aedeb3417e6410a0a518d0ed', class: {
|
|
1374
1374
|
'header--is-visible': visibleHeader,
|
|
1375
|
-
} }, h("tr", { key: '
|
|
1375
|
+
} }, h("tr", { key: 'b3211ca1c1faf601cf9d7dcb083ef47b78f39b66' }, visibleHeader ? this.renderHeader() : null)), h("tbody", { key: 'c71420599b7f63a288e20564ceb0c73ca0f704ce' }, treeNodes), (this.showFooter || this.hasTotals()) &&
|
|
1376
1376
|
this.columns
|
|
1377
1377
|
? this.renderFooter()
|
|
1378
1378
|
: null)))));
|