@platforma-sdk/ui-vue 1.37.7 → 1.37.11
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/.turbo/turbo-build.log +868 -868
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +16 -0
- package/dist/lib/ui/uikit/dist/components/DataTable/BaseCellComponent.vue.js +2 -2
- package/dist/lib/ui/uikit/dist/components/DataTable/TdCell.vue.js +2 -2
- package/dist/lib/ui/uikit/dist/components/DataTable/composition/useResize.js +2 -2
- package/dist/lib/ui/uikit/dist/components/DataTable/composition/useTableColumns.js +6 -6
- package/dist/lib/ui/uikit/dist/components/DataTable/state.js +12 -12
- package/dist/lib/ui/uikit/dist/components/PlAutocomplete/PlAutocomplete.vue.js +12 -12
- package/dist/lib/ui/uikit/dist/components/PlBtnSplit/PlBtnSplit.vue.js +10 -10
- package/dist/lib/ui/uikit/dist/components/PlBtnSplit/PlBtnSplit.vue.js.map +1 -1
- package/dist/lib/ui/uikit/dist/components/PlElementList/PlElementList.vue.js +10 -0
- package/dist/lib/ui/uikit/dist/components/PlElementList/PlElementList.vue2.js +239 -0
- package/dist/lib/ui/uikit/dist/components/PlElementList/PlElementList.vue2.js.map +1 -0
- package/dist/lib/ui/uikit/dist/components/PlElementList/PlElementList.vue3.js +22 -0
- package/dist/{components → lib/ui/uikit/dist/components}/PlElementList/PlElementList.vue3.js.map +1 -1
- package/dist/lib/ui/uikit/dist/components/PlElementList/PlElementListItem.vue.js +10 -0
- package/dist/lib/ui/uikit/dist/components/PlElementList/PlElementListItem.vue2.js +106 -0
- package/dist/lib/ui/uikit/dist/components/PlElementList/PlElementListItem.vue2.js.map +1 -0
- package/dist/lib/ui/uikit/dist/components/PlElementList/PlElementListItem.vue3.js +48 -0
- package/dist/lib/ui/uikit/dist/components/PlElementList/PlElementListItem.vue3.js.map +1 -0
- package/dist/lib/ui/uikit/dist/components/PlElementList/utils.js +17 -0
- package/dist/lib/ui/uikit/dist/components/PlElementList/utils.js.map +1 -0
- package/dist/lib/ui/uikit/dist/components/PlErrorBoundary/PlErrorBoundary.vue.js +5 -5
- package/dist/lib/ui/uikit/dist/components/PlFileDialog/PlFileDialog.vue.js +14 -14
- package/dist/lib/ui/uikit/dist/components/PlFileDialog/Remote.vue.js +8 -8
- package/dist/lib/ui/uikit/dist/components/PlFileDialog/utils.js +9 -9
- package/dist/lib/ui/uikit/dist/components/PlLogView/PlLogView.vue.js +9 -9
- package/dist/lib/ui/uikit/dist/composition/useFormState.js +5 -5
- package/dist/lib/ui/uikit/dist/composition/useQuery.js +12 -12
- package/dist/lib/ui/uikit/dist/composition/useWatchFetch.js +4 -4
- package/dist/lib/ui/uikit/dist/index.js +81 -78
- package/dist/lib/ui/uikit/dist/index.js.map +1 -1
- package/dist/lib/ui/uikit/dist/lib/util/helpers/dist/index.js +156 -127
- package/dist/lib/ui/uikit/dist/lib/util/helpers/dist/index.js.map +1 -1
- package/dist/lib/ui/uikit/dist/node_modules/.pnpm/@vueuse_core@13.3.0_vue@3.5.13_typescript@5.6.3_/node_modules/@vueuse/core/index.js +53 -43
- package/dist/lib/ui/uikit/dist/node_modules/.pnpm/@vueuse_core@13.3.0_vue@3.5.13_typescript@5.6.3_/node_modules/@vueuse/core/index.js.map +1 -1
- package/dist/lib/ui/uikit/dist/node_modules/.pnpm/@vueuse_integrations@13.3.0_axios@1.8.1_focus-trap@7.6.0_sortablejs@1.15.6_vue@3.5.13_typescript@5.6.3_/node_modules/@vueuse/integrations/useSortable.js +51 -0
- package/dist/lib/ui/uikit/dist/node_modules/.pnpm/@vueuse_integrations@13.3.0_axios@1.8.1_focus-trap@7.6.0_sortablejs@1.15.6_vue@3.5.13_typescript@5.6.3_/node_modules/@vueuse/integrations/useSortable.js.map +1 -0
- package/dist/lib/ui/uikit/dist/node_modules/.pnpm/@vueuse_shared@13.3.0_vue@3.5.13_typescript@5.6.3_/node_modules/@vueuse/shared/index.js +70 -62
- package/dist/lib/ui/uikit/dist/node_modules/.pnpm/@vueuse_shared@13.3.0_vue@3.5.13_typescript@5.6.3_/node_modules/@vueuse/shared/index.js.map +1 -1
- package/dist/lib/ui/uikit/dist/node_modules/.pnpm/sortablejs@1.15.6/node_modules/sortablejs/modular/sortable.esm.js +1262 -0
- package/dist/lib/ui/uikit/dist/node_modules/.pnpm/sortablejs@1.15.6/node_modules/sortablejs/modular/sortable.esm.js.map +1 -0
- package/dist/lib/ui/uikit/dist/sdk/model/dist/index.js +1 -1
- package/dist/lib/ui/uikit/dist/sdk/model/dist/index.js.map +1 -1
- package/dist/lib/ui/uikit/dist/utils/DropdownOverlay/DropdownOverlay.vue.js +2 -2
- package/dist/lib/util/helpers/dist/index.js +43 -85
- package/dist/lib/util/helpers/dist/index.js.map +1 -1
- package/dist/lib.d.ts +0 -1
- package/dist/lib.d.ts.map +1 -1
- package/dist/lib.js +105 -105
- package/dist/node_modules/.pnpm/@vueuse_core@13.3.0_vue@3.5.13_typescript@5.5.4_/node_modules/@vueuse/core/index.js +30 -31
- package/dist/node_modules/.pnpm/@vueuse_core@13.3.0_vue@3.5.13_typescript@5.5.4_/node_modules/@vueuse/core/index.js.map +1 -1
- package/dist/sdk/model/dist/index.js +1 -1
- package/dist/sdk/model/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/lib.ts +0 -2
- package/dist/components/PlElementList/PlElementList.vue.d.ts +0 -61
- package/dist/components/PlElementList/PlElementList.vue.d.ts.map +0 -1
- package/dist/components/PlElementList/PlElementList.vue.js +0 -10
- package/dist/components/PlElementList/PlElementList.vue2.js +0 -214
- package/dist/components/PlElementList/PlElementList.vue2.js.map +0 -1
- package/dist/components/PlElementList/PlElementList.vue3.js +0 -13
- package/dist/components/PlElementList/PlElementListItem.vue.d.ts +0 -55
- package/dist/components/PlElementList/PlElementListItem.vue.d.ts.map +0 -1
- package/dist/components/PlElementList/PlElementListItem.vue.js +0 -10
- package/dist/components/PlElementList/PlElementListItem.vue2.js +0 -103
- package/dist/components/PlElementList/PlElementListItem.vue2.js.map +0 -1
- package/dist/components/PlElementList/PlElementListItem.vue3.js +0 -37
- package/dist/components/PlElementList/PlElementListItem.vue3.js.map +0 -1
- package/dist/components/PlElementList/index.d.ts +0 -2
- package/dist/components/PlElementList/index.d.ts.map +0 -1
- package/dist/components/PlElementList/utils.d.ts +0 -3
- package/dist/components/PlElementList/utils.d.ts.map +0 -1
- package/dist/components/PlElementList/utils.js +0 -17
- package/dist/components/PlElementList/utils.js.map +0 -1
- package/dist/node_modules/.pnpm/@vueuse_integrations@13.3.0_axios@1.8.1_focus-trap@7.6.0_sortablejs@1.15.6_vue@3.5.13_typescript@5.5.4_/node_modules/@vueuse/integrations/useSortable.js +0 -51
- package/dist/node_modules/.pnpm/@vueuse_integrations@13.3.0_axios@1.8.1_focus-trap@7.6.0_sortablejs@1.15.6_vue@3.5.13_typescript@5.5.4_/node_modules/@vueuse/integrations/useSortable.js.map +0 -1
- package/dist/node_modules/.pnpm/sortablejs@1.15.6/node_modules/sortablejs/modular/sortable.esm.js +0 -1262
- package/dist/node_modules/.pnpm/sortablejs@1.15.6/node_modules/sortablejs/modular/sortable.esm.js.map +0 -1
- package/src/components/PlElementList/PlElementList.vue +0 -287
- package/src/components/PlElementList/PlElementListItem.vue +0 -222
- package/src/components/PlElementList/README.md +0 -123
- package/src/components/PlElementList/index.ts +0 -1
- package/src/components/PlElementList/utils.ts +0 -17
- /package/dist/{components → lib/ui/uikit/dist/components}/PlElementList/PlElementList.vue.js.map +0 -0
- /package/dist/{components → lib/ui/uikit/dist/components}/PlElementList/PlElementListItem.vue.js.map +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlElementList.vue2.js","sources":["../../../../../../../../../lib/ui/uikit/src/components/PlElementList/PlElementList.vue"],"sourcesContent":["<script generic=\"T extends unknown = unknown, K extends number | string = number | string\" lang=\"ts\" setup>\nimport type { ShallowRef } from 'vue';\nimport { computed, shallowRef, watch } from 'vue';\nimport { isNil, shallowHash } from '@milaboratories/helpers';\nimport { useSortable } from '@vueuse/integrations/useSortable';\nimport { type SortableEvent } from 'sortablejs';\nimport { moveElements, optionalUpdateRef } from './utils.ts';\nimport PlElementListItem from './PlElementListItem.vue';\n\nconst itemsRef = defineModel<T[]>('items', { required: true });\nconst draggableSetRef = defineModel<Set<T>>('draggableItems');\nconst removableSetRef = defineModel<Set<T>>('removableItems');\n\nconst expandableSetRef = defineModel<Set<T>>('expandableItems');\nconst expandedSetRef = defineModel<Set<T>>('expandedItems');\n\nconst pinnableSetRef = defineModel<Set<T>>('pinnableItems');\nconst pinnedSetRef = defineModel<Set<T>>('pinnedItems');\n\nconst toggableSetRef = defineModel<Set<T>>('toggableItems');\nconst toggledSetRef = defineModel<Set<T>>('toggledItems');\n\nconst props = withDefaults(\n defineProps<{\n itemClass?: string | string[] | ((item: T, index: number) => string | string[]);\n activeItems?: Set<T>;\n\n enableDragging?: boolean;\n getItemKey?: (item: T) => K;\n onDragEnd?: (oldIndex: number, newIndex: number) => void | boolean;\n onSort?: (oldIndex: number, newIndex: number) => void | boolean;\n\n enableExpanding?: boolean;\n onExpand?: (item: T, index: number) => void | boolean;\n\n enableRemoving?: boolean;\n onRemove?: (item: T, index: number) => void | boolean;\n\n enableToggling?: boolean;\n onToggle?: (item: T, index: number) => void | boolean;\n\n enablePinning?: boolean;\n onPin?: (item: T, index: number) => void | boolean;\n }>(), {\n itemClass: undefined,\n activeItems: undefined,\n\n enableDragging: undefined,\n enableRemoving: undefined,\n enableExpanding: undefined,\n enableToggling: undefined,\n enablePinning: undefined,\n\n getItemKey: undefined,\n onDragEnd: undefined,\n onSort: undefined,\n onRemove: undefined,\n onExpand: undefined,\n onToggle: undefined,\n onPin: undefined,\n },\n);\n\nconst emits = defineEmits<{\n (e: 'itemClick', item: T): void;\n}>();\n\nconst slots = defineSlots<{\n ['item-title']: (props: { item: T; index: number }) => unknown;\n ['item-content']?: (props: { item: T; index: number }) => unknown;\n}>();\n\nconst dndSortingEnabled = computed((): boolean => {\n return props.enableDragging !== false && !isNil(props.getItemKey);\n});\n\nconst pinnedItemsRef = computed(() => itemsRef.value.filter(isPinned));\nconst hasPinnedItems = computed(() => pinnedItemsRef.value.length > 0);\n\nconst unpinnedItemsRef = computed(() => itemsRef.value.filter((item) => !isPinned(item)));\nconst hasUnpinnedItems = computed(() => unpinnedItemsRef.value.length > 0);\n\nconst domProjectionItemsRef = shallowRef<undefined | T[]>();\nconst pinnedContainerRef = shallowRef<HTMLElement>();\nconst unpinnedContainerRef = shallowRef<HTMLElement>();\n\n// version fix problem with sync between data and rendered values when items have been changed\nconst versionRef = computed<number>((oldVersion) => {\n const currentVersion = shallowHash(...itemsRef.value);\n\n if (domProjectionItemsRef.value === undefined) return oldVersion ?? currentVersion;\n\n const lastSortedVersion = shallowHash(...domProjectionItemsRef.value);\n\n if (currentVersion === lastSortedVersion) return oldVersion ?? currentVersion;\n\n return oldVersion !== currentVersion ? currentVersion : lastSortedVersion;\n});\n\ncreateSortable(hasPinnedItems, pinnedContainerRef, pinnedItemsRef, () => 0);\ncreateSortable(hasUnpinnedItems, unpinnedContainerRef, unpinnedItemsRef, () => pinnedItemsRef.value.length);\n\nfunction createSortable(toggler: ShallowRef<boolean>, elRef: ShallowRef<undefined | HTMLElement>, itemsRef: ShallowRef<T[]>, getOffset: () => number) {\n const sortable = useSortable(elRef, itemsRef, {\n handle: `[data-draggable=\"true\"]`,\n animation: 150,\n forceFallback: true,\n fallbackOnBody: true,\n scrollSensitivity: 80,\n forceAutoScrollFallback: true,\n onUpdate: (evt: SortableEvent) => {\n if (evt.oldIndex == null || evt.newIndex == null) {\n throw new Error('Sortable event has no index');\n }\n if (props.onDragEnd?.(evt.oldIndex, evt.newIndex) !== false) {\n moveItems(getOffset() + evt.oldIndex, getOffset() + evt.newIndex, true);\n }\n },\n });\n watch(toggler, (on) => on ? sortable.start() : sortable.stop());\n\n return sortable;\n}\n\nfunction moveItems(oldIndex: number, newIndex: number, afterUpdateDom: boolean) {\n if (oldIndex === newIndex) return;\n\n if (afterUpdateDom) {\n domProjectionItemsRef.value = moveElements(itemsRef.value.slice(), oldIndex, newIndex);\n }\n\n const preventDefault = props.onSort?.(oldIndex, newIndex) === false;\n\n if (!preventDefault) {\n moveElements(itemsRef.value, oldIndex, newIndex);\n optionalUpdateRef(itemsRef);\n }\n}\n\nfunction isActive(item: T): boolean {\n return props.activeItems?.has(item) ?? false;\n}\n\nfunction isDraggable(item: T): boolean {\n if (props.enableDragging === false) return false;\n return (draggableSetRef.value?.has(item) ?? true);\n}\n\nfunction isToggable(item: T): boolean {\n if (props.enableToggling === false) return false;\n return !isNil(toggledSetRef.value) && (toggableSetRef.value?.has(item) ?? true);\n}\n\nfunction isToggled(item: T): boolean {\n return toggledSetRef.value?.has(item) ?? false;\n}\n\nfunction isPinnable(item: T): boolean {\n if (props.enablePinning === false) return false;\n return !isNil(pinnedSetRef.value) && (pinnableSetRef.value?.has(item) ?? true);\n}\n\nfunction isPinned(item: T): boolean {\n return pinnedSetRef.value?.has(item) ?? false;\n}\n\nfunction isExpandable(item: T): boolean {\n if (props.enableExpanding === false) return false;\n return !isNil(expandedSetRef.value) && (expandableSetRef.value?.has(item) ?? true);\n}\n\nfunction isExpanded(item: T): boolean {\n return expandedSetRef.value?.has(item) ?? false;\n}\n\nfunction isRemovable(item: T): boolean {\n if (props.enableRemoving === false) return false;\n if (removableSetRef.value?.has(item) === false) return false;\n return props.enableRemoving === true || typeof props.onRemove === 'function';\n}\n\nfunction handleExpand(item: T, index: number) {\n if (props.onExpand?.(item, index) === false || isNil(expandedSetRef.value)) return;\n\n const expanded = expandedSetRef.value;\n if (expanded.has(item)) expanded.delete(item);\n else expanded.add(item);\n optionalUpdateRef(expandedSetRef);\n}\n\nfunction handleToggle(item: T, index: number) {\n if (props.onToggle?.(item, index) === false || isNil(toggledSetRef.value)) return;\n\n const toggled = toggledSetRef.value;\n if (toggled.has(item)) toggled.delete(item);\n else toggled.add(item);\n optionalUpdateRef(toggledSetRef);\n}\n\nfunction handlePin(item: T, oldIndex: number) {\n if (oldIndex === -1) {\n throw new Error('Pinnable item not found');\n }\n\n if (props.onPin?.(item, oldIndex) === false || isNil(pinnedSetRef.value)) return;\n\n const pinned = pinnedSetRef.value;\n const alreadyPinned = pinned.has(item);\n if (alreadyPinned) pinned.delete(item);\n else pinned.add(item);\n optionalUpdateRef(pinnedSetRef);\n moveItems(oldIndex, pinned.size + (alreadyPinned ? 0 : -1), false);\n}\n\nfunction handleRemove(item: T, index: number) {\n if (props.onRemove?.(item, index) !== false) {\n itemsRef.value.splice(index, 1);\n optionalUpdateRef(itemsRef);\n\n if (pinnedSetRef.value?.has(item)) {\n pinnedSetRef.value.delete(item);\n optionalUpdateRef(pinnedSetRef);\n }\n\n if (toggledSetRef.value?.has(item)) {\n toggledSetRef.value.delete(item);\n optionalUpdateRef(toggledSetRef);\n }\n }\n}\n\n// version fix problem with sync between data and rendered values\nconst getKey = (item: T, index: number) => {\n if (isNil(props.getItemKey)) return `${versionRef.value}-${index}`;\n return `${versionRef.value}-${props.getItemKey(item)}`;\n};\nconst pinnedKeysRef = computed(() => pinnedItemsRef.value.map(getKey));\nconst unpinnedKeysRef = computed(() => unpinnedItemsRef.value.map(getKey));\n\nconst getItemClass = (item: T, index: number): null | string | string[] => {\n if (typeof props.itemClass === 'function') {\n return props.itemClass(item, index);\n }\n return props.itemClass ?? null;\n};\n\n</script>\n\n<template>\n <div :class=\"$style.root\">\n <div ref=\"pinnedContainerRef\" :class=\"$style.list\">\n <PlElementListItem\n v-for=\"(pinnedItem, pinnedIndex) in pinnedItemsRef\" :key=\"pinnedKeysRef[pinnedIndex]\"\n :class=\"[$style.item, getItemClass(pinnedItem, pinnedIndex)]\"\n\n :index=\"pinnedIndex\"\n :item=\"pinnedItem\"\n :showDragHandle=\"dndSortingEnabled\"\n :isActive=\"isActive(pinnedItem)\"\n :isDraggable=\"isDraggable(pinnedItem)\"\n :isRemovable=\"isRemovable(pinnedItem)\"\n :isToggable=\"isToggable(pinnedItem)\"\n :isToggled=\"isToggled(pinnedItem)\"\n :isPinnable=\"isPinnable(pinnedItem)\"\n :isPinned=\"isPinned(pinnedItem)\"\n :isExpandable=\"isExpandable(pinnedItem)\"\n :isExpanded=\"isExpanded(pinnedItem)\"\n\n @click=\"emits('itemClick', pinnedItem)\"\n @remove=\"handleRemove\"\n @toggle=\"handleToggle\"\n @pin=\"handlePin\"\n @expand=\"handleExpand\"\n >\n <template #title=\"{ item, index }\">\n <slot :index=\"index\" :item=\"item\" name=\"item-title\" />\n </template>\n <template v-if=\"slots['item-content']\" #content=\"{ item, index }\">\n <slot :index=\"index\" :item=\"item\" name=\"item-content\" />\n </template>\n </PlElementListItem>\n </div>\n <div v-if=\"hasUnpinnedItems\" ref=\"unpinnedContainerRef\" :class=\"$style.list\">\n <PlElementListItem\n v-for=\"(unpinnedItem, unpinnedIndex) in unpinnedItemsRef\" :key=\"unpinnedKeysRef[unpinnedIndex]\"\n :class=\"[$style.item, getItemClass(unpinnedItem, unpinnedIndex)]\"\n\n :index=\"unpinnedIndex + (pinnedSetRef?.size ?? 0)\"\n :item=\"unpinnedItem\"\n :showDragHandle=\"dndSortingEnabled\"\n :isActive=\"isActive(unpinnedItem)\"\n :isDraggable=\"isDraggable(unpinnedItem)\"\n :isRemovable=\"isRemovable(unpinnedItem)\"\n :isToggable=\"isToggable(unpinnedItem)\"\n :isToggled=\"isToggled(unpinnedItem)\"\n :isPinnable=\"isPinnable(unpinnedItem)\"\n :isPinned=\"isPinned(unpinnedItem)\"\n :isExpandable=\"isExpandable(unpinnedItem)\"\n :isExpanded=\"isExpanded(unpinnedItem)\"\n\n @click=\"emits('itemClick', unpinnedItem)\"\n @remove=\"handleRemove\"\n @toggle=\"handleToggle\"\n @pin=\"handlePin\"\n @expand=\"handleExpand\"\n >\n <template #title=\"{ item, index }\">\n <slot :index=\"index\" :item=\"item\" name=\"item-title\" />\n </template>\n <template v-if=\"slots['item-content']\" #content=\"{ item, index }\">\n <slot :index=\"index\" :item=\"item\" name=\"item-content\" />\n </template>\n </PlElementListItem>\n </div>\n </div>\n</template>\n\n<style module>\n.root, .list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 180px;\n}\n\n.item {\n width: 100%;\n}\n\n:global(.sortable-ghost) {\n visibility: hidden;\n}\n:global(.sortable-drag) {\n opacity: 1;\n}\n</style>\n"],"names":["itemsRef","_useModel","__props","draggableSetRef","removableSetRef","expandableSetRef","expandedSetRef","pinnableSetRef","pinnedSetRef","toggableSetRef","toggledSetRef","props","emits","__emit","slots","_useSlots","dndSortingEnabled","computed","isNil","pinnedItemsRef","isPinned","hasPinnedItems","unpinnedItemsRef","item","hasUnpinnedItems","domProjectionItemsRef","shallowRef","pinnedContainerRef","unpinnedContainerRef","versionRef","oldVersion","currentVersion","shallowHash","lastSortedVersion","createSortable","toggler","elRef","getOffset","sortable","useSortable","evt","_a","moveItems","watch","on","oldIndex","newIndex","afterUpdateDom","moveElements","optionalUpdateRef","isActive","isDraggable","isToggable","isToggled","isPinnable","isExpandable","isExpanded","isRemovable","handleExpand","index","expanded","handleToggle","toggled","handlePin","pinned","alreadyPinned","handleRemove","_b","_c","getKey","pinnedKeysRef","unpinnedKeysRef","getItemClass"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASMA,UAAAA,IAAWC,EAAgBC,GAAC,OAA2B,GACvDC,KAAkBF,EAAmBC,GAAC,gBAAgB,GACtDE,KAAkBH,EAAmBC,GAAC,gBAAgB,GAEtDG,KAAmBJ,EAAoBC,GAAA,iBAAiB,GACxDI,IAAiBL,EAAmBC,GAAC,eAAe,GAEpDK,KAAiBN,EAAmBC,GAAC,eAAe,GACpDM,IAAeP,EAAmBC,GAAC,aAAa,GAEhDO,KAAiBR,EAAmBC,GAAC,eAAe,GACpDQ,IAAgBT,EAAmBC,GAAC,cAAc,GAElDS,IAAQT,GAyCRU,IAAQC,IAIRC,IAAQC,MAKRC,IAAoBC,EAAS,MAC1BN,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AM,IAAI+C,CAAM,CAAC,GAEnEG,IAAe,CAACjD,GAASoC,MACzB,OAAOhD,EAAM,aAAc,aACtBA,EAAM,UAAUY,GAAMoC,CAAK,IAE7BhD,EAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
try {
|
|
3
|
+
if (typeof document < "u") {
|
|
4
|
+
var t = document.createElement("style");
|
|
5
|
+
t.appendChild(document.createTextNode("._root_1inp1_2,._list_1inp1_2{display:flex;flex-direction:column;gap:8px;min-width:180px}._item_1inp1_9{width:100%}.sortable-ghost{visibility:hidden}.sortable-drag{opacity:1}")), document.head.appendChild(t);
|
|
6
|
+
}
|
|
7
|
+
} catch (i) {
|
|
8
|
+
console.error("vite-plugin-css-injected-by-js", i);
|
|
9
|
+
}
|
|
10
|
+
})();
|
|
11
|
+
const e = "_root_1inp1_2", o = "_list_1inp1_2", n = "_item_1inp1_9", s = {
|
|
12
|
+
root: e,
|
|
13
|
+
list: o,
|
|
14
|
+
item: n
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
s as default,
|
|
18
|
+
n as item,
|
|
19
|
+
o as list,
|
|
20
|
+
e as root
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=PlElementList.vue3.js.map
|
package/dist/{components → lib/ui/uikit/dist/components}/PlElementList/PlElementList.vue3.js.map
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlElementList.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlElementList.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import o from "./PlElementListItem.vue2.js";
|
|
2
|
+
import r from "./PlElementListItem.vue3.js";
|
|
3
|
+
import s from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const t = {
|
|
5
|
+
$style: r
|
|
6
|
+
}, p = /* @__PURE__ */ s(o, [["__cssModules", t]]);
|
|
7
|
+
export {
|
|
8
|
+
p as default
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=PlElementListItem.vue.js.map
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { defineComponent as u, useSlots as B, computed as f, createElementBlock as i, openBlock as a, normalizeClass as t, createElementVNode as r, createCommentVNode as n, createBlock as h, createVNode as c, unref as o, renderSlot as $, withModifiers as m } from "vue";
|
|
2
|
+
import p from "../PlIcon16/PlIcon16.vue.js";
|
|
3
|
+
import b from "../PlIcon24/PlIcon24.vue.js";
|
|
4
|
+
const E = ["data-draggable"], T = /* @__PURE__ */ u({
|
|
5
|
+
__name: "PlElementListItem",
|
|
6
|
+
props: {
|
|
7
|
+
item: {},
|
|
8
|
+
index: {},
|
|
9
|
+
showDragHandle: { type: Boolean },
|
|
10
|
+
isActive: { type: Boolean },
|
|
11
|
+
isDraggable: { type: Boolean },
|
|
12
|
+
isRemovable: { type: Boolean },
|
|
13
|
+
isExpandable: { type: Boolean },
|
|
14
|
+
isExpanded: { type: Boolean },
|
|
15
|
+
isToggable: { type: Boolean },
|
|
16
|
+
isToggled: { type: Boolean },
|
|
17
|
+
isPinnable: { type: Boolean },
|
|
18
|
+
isPinned: { type: Boolean }
|
|
19
|
+
},
|
|
20
|
+
emits: ["expand", "toggle", "pin", "remove"],
|
|
21
|
+
setup(v, { emit: x }) {
|
|
22
|
+
const l = v, k = B(), g = f(() => k.content !== void 0), d = x;
|
|
23
|
+
return (e, s) => (a(), i("div", {
|
|
24
|
+
class: t([e.$style.root, {
|
|
25
|
+
[e.$style.active]: l.isActive,
|
|
26
|
+
[e.$style.pinned]: l.isPinned,
|
|
27
|
+
[e.$style.disabled]: l.isToggled
|
|
28
|
+
}])
|
|
29
|
+
}, [
|
|
30
|
+
r("div", {
|
|
31
|
+
class: t([e.$style.head, {
|
|
32
|
+
[e.$style.clickable]: g.value
|
|
33
|
+
}]),
|
|
34
|
+
onClick: s[3] || (s[3] = (y) => e.isExpandable && d("expand", l.item, l.index))
|
|
35
|
+
}, [
|
|
36
|
+
l.showDragHandle ? (a(), i("div", {
|
|
37
|
+
key: 0,
|
|
38
|
+
class: t([e.$style.action, e.$style.draggable, { [e.$style.disable]: !l.isDraggable }]),
|
|
39
|
+
"data-draggable": l.isDraggable
|
|
40
|
+
}, [
|
|
41
|
+
c(o(p), { name: "drag-dots" })
|
|
42
|
+
], 10, E)) : n("", !0),
|
|
43
|
+
e.isExpandable ? (a(), h(o(p), {
|
|
44
|
+
key: 1,
|
|
45
|
+
class: t([e.$style.contentChevron, { [e.$style.opened]: l.isExpanded }]),
|
|
46
|
+
name: "chevron-down"
|
|
47
|
+
}, null, 8, ["class"])) : n("", !0),
|
|
48
|
+
r("div", {
|
|
49
|
+
class: t(e.$style.title)
|
|
50
|
+
}, [
|
|
51
|
+
$(e.$slots, "title", {
|
|
52
|
+
item: l.item,
|
|
53
|
+
index: l.index
|
|
54
|
+
})
|
|
55
|
+
], 2),
|
|
56
|
+
r("div", {
|
|
57
|
+
class: t([e.$style.actions, e.$style.showOnHover])
|
|
58
|
+
}, [
|
|
59
|
+
l.isToggable ? (a(), i("div", {
|
|
60
|
+
key: 0,
|
|
61
|
+
class: t([e.$style.action, e.$style.clickable, { [e.$style.disable]: !l.isToggable }]),
|
|
62
|
+
onClick: s[0] || (s[0] = m((y) => d("toggle", l.item, l.index), ["stop"]))
|
|
63
|
+
}, [
|
|
64
|
+
c(o(b), {
|
|
65
|
+
name: l.isToggled === !0 ? "view-hide" : "view-show",
|
|
66
|
+
size: "16"
|
|
67
|
+
}, null, 8, ["name"])
|
|
68
|
+
], 2)) : n("", !0),
|
|
69
|
+
l.isPinnable ? (a(), i("div", {
|
|
70
|
+
key: 1,
|
|
71
|
+
class: t([e.$style.action, e.$style.clickable, {
|
|
72
|
+
[e.$style.disable]: !l.isPinnable,
|
|
73
|
+
[e.$style.activated]: l.isPinned
|
|
74
|
+
}]),
|
|
75
|
+
onClick: s[1] || (s[1] = m((y) => d("pin", l.item, l.index), ["stop"]))
|
|
76
|
+
}, [
|
|
77
|
+
c(o(b), {
|
|
78
|
+
name: "pin",
|
|
79
|
+
size: "16"
|
|
80
|
+
})
|
|
81
|
+
], 2)) : n("", !0),
|
|
82
|
+
l.isRemovable ? (a(), i("div", {
|
|
83
|
+
key: 2,
|
|
84
|
+
class: t([e.$style.action, e.$style.clickable]),
|
|
85
|
+
onClick: s[2] || (s[2] = m((y) => d("remove", l.item, l.index), ["stop"]))
|
|
86
|
+
}, [
|
|
87
|
+
c(o(p), { name: "close" })
|
|
88
|
+
], 2)) : n("", !0)
|
|
89
|
+
], 2)
|
|
90
|
+
], 2),
|
|
91
|
+
g.value && l.isExpanded ? (a(), i("div", {
|
|
92
|
+
key: 0,
|
|
93
|
+
class: t(e.$style.body)
|
|
94
|
+
}, [
|
|
95
|
+
$(e.$slots, "content", {
|
|
96
|
+
item: l.item,
|
|
97
|
+
index: l.index
|
|
98
|
+
})
|
|
99
|
+
], 2)) : n("", !0)
|
|
100
|
+
], 2));
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
export {
|
|
104
|
+
T as default
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=PlElementListItem.vue2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlElementListItem.vue2.js","sources":["../../../../../../../../../lib/ui/uikit/src/components/PlElementList/PlElementListItem.vue"],"sourcesContent":["<script generic=\"T extends unknown = unknown\" lang=\"ts\" setup>\nimport { computed } from 'vue';\nimport { PlIcon16 } from '../PlIcon16';\nimport { PlIcon24 } from '../PlIcon24';\n\nconst props = defineProps<{\n item: T;\n index: number;\n showDragHandle: boolean;\n isActive: boolean;\n isDraggable: boolean;\n isRemovable: boolean;\n isExpandable: boolean;\n isExpanded: boolean;\n isToggable: boolean;\n isToggled: boolean;\n isPinnable: boolean;\n isPinned: boolean;\n}>();\n\nconst slots = defineSlots<{\n title: (props: { item: T; index: number }) => unknown;\n content?: (props: { item: T; index: number }) => unknown;\n}>();\nconst hasContentSlot = computed(() => slots['content'] !== undefined);\n\nconst emit = defineEmits<{\n (e: 'expand', item: T, index: number): void;\n (e: 'toggle', item: T, index: number): void;\n (e: 'pin', item: T, index: number): void;\n (e: 'remove', item: T, index: number): void;\n}>();\n</script>\n\n<template>\n <div\n :class=\"[$style.root, {\n [$style.active]: props.isActive,\n [$style.pinned]: props.isPinned,\n [$style.disabled]: props.isToggled,\n }]\"\n >\n <div\n :class=\"[$style.head, {\n [$style.clickable]: hasContentSlot,\n }]\"\n @click=\"isExpandable && emit('expand', props.item, props.index)\"\n >\n <div\n v-if=\"props.showDragHandle\"\n :class=\"[$style.action, $style.draggable, { [$style.disable]: !props.isDraggable } ]\"\n :data-draggable=\"props.isDraggable\"\n >\n <PlIcon16 name=\"drag-dots\" />\n </div>\n <PlIcon16 v-if=\"isExpandable\" :class=\"[$style.contentChevron, { [$style.opened]: props.isExpanded }]\" name=\"chevron-down\" />\n\n <div :class=\"$style.title\">\n <slot name=\"title\" :item=\"props.item\" :index=\"props.index\" />\n </div>\n\n <div :class=\"[$style.actions, $style.showOnHover]\">\n <div\n v-if=\"props.isToggable\"\n :class=\"[$style.action, $style.clickable, { [$style.disable]: !props.isToggable }]\"\n @click.stop=\"emit('toggle', props.item, props.index)\"\n >\n <PlIcon24 :name=\"props.isToggled === true ? 'view-hide' : 'view-show'\" size=\"16\" />\n </div>\n <div\n v-if=\"props.isPinnable\"\n :class=\"[$style.action, $style.clickable, {\n [$style.disable]: !props.isPinnable,\n [$style.activated]: props.isPinned,\n }]\"\n @click.stop=\"emit('pin', props.item, props.index)\"\n >\n <PlIcon24 name=\"pin\" size=\"16\" />\n </div>\n <div\n v-if=\"props.isRemovable\"\n :class=\"[$style.action, $style.clickable]\"\n @click.stop=\"emit('remove', props.item, props.index)\"\n >\n <PlIcon16 name=\"close\" />\n </div>\n </div>\n </div>\n <div v-if=\"hasContentSlot && props.isExpanded\" :class=\"$style.body\">\n <slot name=\"content\" :item=\"props.item\" :index=\"props.index\" />\n </div>\n </div>\n</template>\n\n<style module>\n@use '../../assets/variables.scss' as *;\n\n.root {\n --background: rgba(255, 255, 255, 0.8);\n --border-color: var(--color-div-grey);\n --head-background: unset;\n --box-shadow: none;\n --box-shadow-active: 0 0 0 4px color-mix(in srgb, var(--border-color-focus) 50%, transparent);\n\n &:global(.sortable-drag),\n &:global(.sortable-chosen) {\n --head-background: var(--gradient-light-lime);\n --border-color: var(--border-color-focus);\n --box-shadow: var(--box-shadow-active)\n }\n}\n.root {\n display: flex;\n flex-direction: column;\n justify-content: center;\n border-radius: var(--border-radius);\n border: 1px solid var(--border-color);\n background-color: var(--background);\n transition: box-shadow 0.15s;\n box-shadow: var(--box-shadow);;\n overflow: hidden;\n\n &:hover {\n --border-color: var(--border-color-focus);\n }\n\n &.disabled {\n opacity: 0.6;\n filter: grayscale(1);\n }\n\n &.pinned {\n --background: var(--bg-base-light);\n }\n\n &.active {\n --border-color: var(--border-color-focus);\n --head-background: var(--btn-accent-positive-500);\n }\n}\n\n.head {\n position: relative;\n display: flex;\n align-items: center;\n padding: 8px;\n border-radius: var(--border-radius) var(--border-radius) 0 0;\n background: var(--head-background);\n\n &:hover, &.opened {\n --head-background: var(--gradient-light-lime);\n }\n}\n\n.contentChevron {\n display: block;\n width: 16px;\n height: 16px;\n margin-right: 4px;\n transform: rotate(-90deg);\n transition: transform 0.15s;\n\n &.opened {\n transform: rotate(0deg);\n }\n}\n\n.title {\n display: flex;\n flex-direction: row;\n gap: 8px;\n max-width: calc(100% - 50px);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.body {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 24px;\n border-radius: 0 0 var(--border-radius) var(--border-radius);\n}\n\n.actions {\n position: absolute;\n top: 8px;\n right: 8px;\n display: flex;\n align-items: center;\n background-color: var(--background);\n border-radius: var(--border-radius);\n}\n\n.action {\n width: 24px;\n height: 24px;\n padding: 4px; /* use padding instead of gap on parent, for better accessibility */\n opacity: 0.6;\n border-radius: var(--border-radius);\n transition: all 0.15s;\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n &:hover {\n opacity: 1;\n background-color: var(--bg-elevated-02);\n }\n\n &.activated {\n opacity: 0.8;\n }\n\n &.disable {\n cursor: not-allowed;\n opacity: 0.4;\n }\n}\n\n.clickable {\n cursor: pointer;\n}\n\n.draggable {\n cursor: grab;\n}\n\n.showOnHover {\n opacity: 0;\n transition: opacity 0.15s;\n}\n\n.root:hover .showOnHover {\n opacity: 1;\n}\n</style>\n"],"names":["props","__props","slots","_useSlots","hasContentSlot","computed","emit","__emit"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAKA,UAAMA,IAAQC,GAeRC,IAAQC,EAIRC,GAAAA,IAAiBC,EAAS,MAAMH,EAAM,YAAe,MAAS,GAE9DI,IAAOC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
try {
|
|
3
|
+
if (typeof document < "u") {
|
|
4
|
+
var o = document.createElement("style");
|
|
5
|
+
o.appendChild(document.createTextNode('@use "../../assets/variables.scss" as *;._root_lt147_4{--background: rgba(255, 255, 255, .8);--border-color: var(--color-div-grey);--head-background: unset;--box-shadow: none;--box-shadow-active: 0 0 0 4px color-mix(in srgb, var(--border-color-focus) 50%, transparent)}._root_lt147_4.sortable-drag,._root_lt147_4.sortable-chosen{--head-background: var(--gradient-light-lime);--border-color: var(--border-color-focus);--box-shadow: var(--box-shadow-active) }._root_lt147_4{display:flex;flex-direction:column;justify-content:center;border-radius:var(--border-radius);border:1px solid var(--border-color);background-color:var(--background);transition:box-shadow .15s;box-shadow:var(--box-shadow);overflow:hidden}._root_lt147_4:hover{--border-color: var(--border-color-focus)}._root_lt147_4._disabled_lt147_33{opacity:.6;filter:grayscale(1)}._root_lt147_4._pinned_lt147_38{--background: var(--bg-base-light)}._root_lt147_4._active_lt147_42{--border-color: var(--border-color-focus);--head-background: var(--btn-accent-positive-500)}._head_lt147_48{position:relative;display:flex;align-items:center;padding:8px;border-radius:var(--border-radius) var(--border-radius) 0 0;background:var(--head-background)}._head_lt147_48:hover,._head_lt147_48._opened_lt147_56{--head-background: var(--gradient-light-lime)}._contentChevron_lt147_61{display:block;width:16px;height:16px;margin-right:4px;transform:rotate(-90deg);transition:transform .15s}._contentChevron_lt147_61._opened_lt147_56{transform:rotate(0)}._title_lt147_74{display:flex;flex-direction:row;gap:8px;max-width:calc(100% - 50px);overflow:hidden;text-overflow:ellipsis}._body_lt147_83{display:flex;flex-direction:column;gap:8px;padding:24px;border-radius:0 0 var(--border-radius) var(--border-radius)}._actions_lt147_91{position:absolute;top:8px;right:8px;display:flex;align-items:center;background-color:var(--background);border-radius:var(--border-radius)}._action_lt147_91{width:24px;height:24px;padding:4px;opacity:.6;border-radius:var(--border-radius);transition:all .15s}._action_lt147_91 svg{width:16px;height:16px}._action_lt147_91:hover{opacity:1;background-color:var(--bg-elevated-02)}._action_lt147_91._activated_lt147_119{opacity:.8}._action_lt147_91._disable_lt147_33{cursor:not-allowed;opacity:.4}._clickable_lt147_129{cursor:pointer}._draggable_lt147_133{cursor:grab}._showOnHover_lt147_137{opacity:0;transition:opacity .15s}._root_lt147_4:hover ._showOnHover_lt147_137{opacity:1}')), document.head.appendChild(o);
|
|
6
|
+
}
|
|
7
|
+
} catch (a) {
|
|
8
|
+
console.error("vite-plugin-css-injected-by-js", a);
|
|
9
|
+
}
|
|
10
|
+
})();
|
|
11
|
+
const r = "_root_lt147_4", t = "_disabled_lt147_33", e = "_pinned_lt147_38", _ = "_active_lt147_42", d = "_head_lt147_48", l = "_opened_lt147_56", i = "_contentChevron_lt147_61", n = "_title_lt147_74", s = "_body_lt147_83", c = "_actions_lt147_91", b = "_action_lt147_91", p = "_activated_lt147_119", v = "_disable_lt147_33", h = "_clickable_lt147_129", g = "_draggable_lt147_133", u = "_showOnHover_lt147_137", x = {
|
|
12
|
+
root: r,
|
|
13
|
+
disabled: t,
|
|
14
|
+
pinned: e,
|
|
15
|
+
active: _,
|
|
16
|
+
head: d,
|
|
17
|
+
opened: l,
|
|
18
|
+
contentChevron: i,
|
|
19
|
+
title: n,
|
|
20
|
+
body: s,
|
|
21
|
+
actions: c,
|
|
22
|
+
action: b,
|
|
23
|
+
activated: p,
|
|
24
|
+
disable: v,
|
|
25
|
+
clickable: h,
|
|
26
|
+
draggable: g,
|
|
27
|
+
showOnHover: u
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
b as action,
|
|
31
|
+
c as actions,
|
|
32
|
+
p as activated,
|
|
33
|
+
_ as active,
|
|
34
|
+
s as body,
|
|
35
|
+
h as clickable,
|
|
36
|
+
i as contentChevron,
|
|
37
|
+
x as default,
|
|
38
|
+
v as disable,
|
|
39
|
+
t as disabled,
|
|
40
|
+
g as draggable,
|
|
41
|
+
d as head,
|
|
42
|
+
l as opened,
|
|
43
|
+
e as pinned,
|
|
44
|
+
r as root,
|
|
45
|
+
u as showOnHover,
|
|
46
|
+
n as title
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=PlElementListItem.vue3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlElementListItem.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { isRef as a, isShallow as i } from "vue";
|
|
2
|
+
import { shallowClone as n } from "../../lib/util/helpers/dist/index.js";
|
|
3
|
+
const p = (o, s, t) => {
|
|
4
|
+
if (t >= 0 && t < o.length) {
|
|
5
|
+
const l = o.splice(s, 1)[0];
|
|
6
|
+
o.splice(t, 0, l);
|
|
7
|
+
}
|
|
8
|
+
return o;
|
|
9
|
+
};
|
|
10
|
+
function r(o) {
|
|
11
|
+
a(o) && i(o) && (o.value = n(o.value));
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
p as moveElements,
|
|
15
|
+
r as optionalUpdateRef
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../../../../lib/ui/uikit/src/components/PlElementList/utils.ts"],"sourcesContent":["import { isRef, isShallow } from 'vue';\nimport { shallowClone } from '@milaboratories/helpers';\n\nexport const moveElements = <T>(array: T[], from: number, to: number): T[] => {\n if (to >= 0 && to < array.length) {\n const element = array.splice(from, 1)[0];\n array.splice(to, 0, element);\n }\n\n return array;\n};\n\nexport function optionalUpdateRef<T>(ref: T) {\n if (isRef(ref) && isShallow(ref)) {\n ref.value = shallowClone(ref.value);\n }\n}\n"],"names":["moveElements","array","from","to","element","optionalUpdateRef","ref","isRef","isShallow","shallowClone"],"mappings":";;AAGO,MAAMA,IAAe,CAAIC,GAAYC,GAAcC,MAAoB;AAC5E,MAAIA,KAAM,KAAKA,IAAKF,EAAM,QAAQ;AAChC,UAAMG,IAAUH,EAAM,OAAOC,GAAM,CAAC,EAAE,CAAC;AACjCD,IAAAA,EAAA,OAAOE,GAAI,GAAGC,CAAO;AAAA,EAAA;AAGtBH,SAAAA;AACT;AAEO,SAASI,EAAqBC,GAAQ;AACvCC,EAAAA,EAAMD,CAAG,KAAKE,EAAUF,CAAG,MACzBA,EAAA,QAAQG,EAAaH,EAAI,KAAK;AAEtC;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as f, ref as s, computed as i, onBeforeUpdate as p, onErrorCaptured as k, createElementBlock as g, openBlock as
|
|
1
|
+
import { defineComponent as f, ref as s, computed as i, onBeforeUpdate as p, onErrorCaptured as k, createElementBlock as g, openBlock as c, Fragment as y, renderSlot as B, createBlock as E, createCommentVNode as S, unref as C } from "vue";
|
|
2
2
|
import _ from "../PlErrorAlert/PlErrorAlert.vue.js";
|
|
3
3
|
import { tryDo as x, isErrorLike as D } from "../../lib/util/helpers/dist/index.js";
|
|
4
4
|
const F = /* @__PURE__ */ f({
|
|
5
5
|
__name: "PlErrorBoundary",
|
|
6
|
-
setup(N, { expose:
|
|
6
|
+
setup(N, { expose: m }) {
|
|
7
7
|
const v = (e) => {
|
|
8
8
|
if (e != null)
|
|
9
9
|
return D(e) ? e.stack == null || e.stack.length === 0 ? e.message : e.stack.includes(e.message) ? e.stack : e.message + `
|
|
@@ -24,11 +24,11 @@ const F = /* @__PURE__ */ f({
|
|
|
24
24
|
title: ((u = (l = n == null ? void 0 : n.$) == null ? void 0 : l.type) == null ? void 0 : u.name) ?? void 0,
|
|
25
25
|
error: e
|
|
26
26
|
}, !1;
|
|
27
|
-
}),
|
|
27
|
+
}), m({ error: t, reset: o }), (e, n) => {
|
|
28
28
|
var l;
|
|
29
|
-
return
|
|
29
|
+
return c(), g(y, null, [
|
|
30
30
|
B(e.$slots, "default"),
|
|
31
|
-
t.value ? (
|
|
31
|
+
t.value ? (c(), E(C(_), {
|
|
32
32
|
key: 0,
|
|
33
33
|
ref_key: "errorAlert",
|
|
34
34
|
ref: a,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as B, ref as S, computed as _, useTemplateRef as b, createBlock as s, openBlock as p, unref as t, normalizeClass as R, createSlots as
|
|
2
|
-
import
|
|
3
|
-
import { notEmpty as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as B, ref as S, computed as _, useTemplateRef as b, createBlock as s, openBlock as p, unref as t, normalizeClass as R, createSlots as $, withCtx as a, createElementVNode as w, createCommentVNode as f, createVNode as d, mergeProps as v, createTextVNode as n, toDisplayString as D, withModifiers as y } from "vue";
|
|
2
|
+
import F from "./pl-file-dialog.module.scss.js";
|
|
3
|
+
import { notEmpty as I } from "../../lib/util/helpers/dist/index.js";
|
|
4
|
+
import N from "../PlDialogModal/PlDialogModal.vue.js";
|
|
5
|
+
import O from "../PlBtnPrimary/PlBtnPrimary.vue.js";
|
|
6
|
+
import z from "../PlBtnGhost/PlBtnGhost.vue.js";
|
|
7
7
|
import T from "../PlBtnGroup/PlBtnGroup.vue.js";
|
|
8
8
|
import U from "./Remote.vue.js";
|
|
9
9
|
import E from "./Local.vue.js";
|
|
@@ -30,24 +30,24 @@ const M = { style: { margin: "0 24px" } }, L = /* @__PURE__ */ B({
|
|
|
30
30
|
}
|
|
31
31
|
], i = () => m("update:modelValue", !1), u = b("remote"), c = () => {
|
|
32
32
|
var e, l;
|
|
33
|
-
(e = u.value) != null && e.isReady && (m("import:files",
|
|
33
|
+
(e = u.value) != null && e.isReady && (m("import:files", I((l = u.value) == null ? void 0 : l.getFilesToImport())), i());
|
|
34
34
|
}, h = (e) => {
|
|
35
35
|
m("import:files", e), i();
|
|
36
36
|
};
|
|
37
|
-
return (e, l) => (p(), s(t(
|
|
37
|
+
return (e, l) => (p(), s(t(N), {
|
|
38
38
|
"no-content-gutters": !0,
|
|
39
39
|
"close-on-outside-click": e.closeOnOutsideClick,
|
|
40
|
-
class: R(["pl-dialog-modal", t(
|
|
40
|
+
class: R(["pl-dialog-modal", t(F).component]),
|
|
41
41
|
"model-value": e.modelValue,
|
|
42
42
|
width: "688px",
|
|
43
43
|
height: "720px",
|
|
44
44
|
"onUpdate:modelValue": i
|
|
45
|
-
},
|
|
45
|
+
}, $({
|
|
46
46
|
title: a(() => [
|
|
47
|
-
n(
|
|
47
|
+
n(D(e.title ?? g.value), 1)
|
|
48
48
|
]),
|
|
49
49
|
default: a(() => [
|
|
50
|
-
|
|
50
|
+
w("div", M, [
|
|
51
51
|
d(t(T), {
|
|
52
52
|
modelValue: o.value,
|
|
53
53
|
"onUpdate:modelValue": l[0] || (l[0] = (r) => o.value = r),
|
|
@@ -70,7 +70,7 @@ const M = { style: { margin: "0 24px" } }, L = /* @__PURE__ */ B({
|
|
|
70
70
|
fn: a(() => {
|
|
71
71
|
var r;
|
|
72
72
|
return [
|
|
73
|
-
d(t(
|
|
73
|
+
d(t(O), {
|
|
74
74
|
style: { "min-width": "160px" },
|
|
75
75
|
disabled: !((r = t(u)) != null && r.isReady),
|
|
76
76
|
onClick: y(c, ["stop"])
|
|
@@ -80,7 +80,7 @@ const M = { style: { margin: "0 24px" } }, L = /* @__PURE__ */ B({
|
|
|
80
80
|
])),
|
|
81
81
|
_: 1
|
|
82
82
|
}, 8, ["disabled"]),
|
|
83
|
-
d(t(
|
|
83
|
+
d(t(z), {
|
|
84
84
|
"justify-center": !1,
|
|
85
85
|
onClick: y(i, ["stop"])
|
|
86
86
|
}, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as G, reactive as J, computed as h, createElementBlock as c, watch as V, toRef as Q, onMounted as X, openBlock as n, withModifiers as L, normalizeClass as o, unref as r, createElementVNode as d, createVNode as p, Fragment as g, renderList as _, createBlock as Z, createCommentVNode as $, toDisplayString as f, withDirectives as H, createTextVNode as K } from "vue";
|
|
2
2
|
import { useEventListener as ee } from "../../composition/useEventListener.js";
|
|
3
3
|
import { tapIf as te, notEmpty as z, between as ae } from "../../lib/util/helpers/dist/index.js";
|
|
4
4
|
import { getRawPlatformaInstance as y } from "../../sdk/model/dist/index.js";
|
|
@@ -12,7 +12,7 @@ import { normalizeExtensions as oe, getFilePathBreadcrumbs as ne } from "./utils
|
|
|
12
12
|
const de = ["title", "onClick"], ce = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "ls-loader"
|
|
15
|
-
}, me = ["onClick"], ue = ["title"], ve = ["onClick"], he = ["title"], Be = /* @__PURE__ */
|
|
15
|
+
}, me = ["onClick"], ue = ["title"], ve = ["onClick"], he = ["title"], Be = /* @__PURE__ */ G({
|
|
16
16
|
__name: "Remote",
|
|
17
17
|
props: {
|
|
18
18
|
modelValue: { type: Boolean },
|
|
@@ -78,7 +78,7 @@ const de = ["title", "onClick"], ce = {
|
|
|
78
78
|
e && !u.multi || S.value.filter((a) => a.canBeSelected).forEach((a) => {
|
|
79
79
|
a.selected = e;
|
|
80
80
|
});
|
|
81
|
-
},
|
|
81
|
+
}, Y = () => x(!0), F = () => x(!1), I = () => {
|
|
82
82
|
if (k(), F(), !y()) {
|
|
83
83
|
console.warn("platforma API is not found");
|
|
84
84
|
return;
|
|
@@ -103,20 +103,20 @@ const de = ["title", "onClick"], ce = {
|
|
|
103
103
|
}), V(
|
|
104
104
|
() => u.modelValue,
|
|
105
105
|
(e) => {
|
|
106
|
-
e ?
|
|
106
|
+
e ? I() : Object.assign(t, N());
|
|
107
107
|
},
|
|
108
108
|
{ immediate: !0 }
|
|
109
109
|
), ee(document, "keydown", (e) => {
|
|
110
110
|
if (!u.modelValue || e.target !== document.body)
|
|
111
111
|
return;
|
|
112
112
|
const a = b(e);
|
|
113
|
-
a && e.code === "KeyA" && (e.preventDefault(),
|
|
113
|
+
a && e.code === "KeyA" && (e.preventDefault(), Y()), a && e.shiftKey && e.code === "Period" && (e.preventDefault(), t.showHiddenItems = !t.showHiddenItems), e.code === "Enter" && u.submit();
|
|
114
114
|
}), T({
|
|
115
115
|
isReady: A,
|
|
116
116
|
getFilesToImport: M
|
|
117
|
-
}), X(
|
|
117
|
+
}), X(I), (e, a) => (n(), c("div", {
|
|
118
118
|
class: o(r(i).remote),
|
|
119
|
-
onClick:
|
|
119
|
+
onClick: L(F, ["stop"])
|
|
120
120
|
}, [
|
|
121
121
|
d("div", {
|
|
122
122
|
class: o(r(i).search)
|
|
@@ -200,7 +200,7 @@ const de = ["title", "onClick"], ce = {
|
|
|
200
200
|
], 10, me)) : (n(), c("div", {
|
|
201
201
|
key: 1,
|
|
202
202
|
class: o({ [r(i).canBeSelected]: l.canBeSelected, [r(i).selected]: l.selected }),
|
|
203
|
-
onClick:
|
|
203
|
+
onClick: L((s) => q(s, l), ["stop"])
|
|
204
204
|
}, [
|
|
205
205
|
p(r(D), {
|
|
206
206
|
name: "box",
|
|
@@ -3,24 +3,24 @@ function u(e) {
|
|
|
3
3
|
return e ? e.map((t) => "." + o(t, ["."])) : void 0;
|
|
4
4
|
}
|
|
5
5
|
function l(e) {
|
|
6
|
-
const t = "/", s = e.startsWith(t),
|
|
6
|
+
const t = "/", s = e.startsWith(t), n = m(e, [t]).split(t), i = [
|
|
7
7
|
{
|
|
8
8
|
index: 0,
|
|
9
9
|
name: "Root",
|
|
10
10
|
path: ""
|
|
11
11
|
}
|
|
12
12
|
];
|
|
13
|
-
if (
|
|
14
|
-
return
|
|
15
|
-
for (let
|
|
16
|
-
const a = (s ? t : "") +
|
|
17
|
-
|
|
18
|
-
index:
|
|
19
|
-
name: r
|
|
13
|
+
if (n.length === 1 && n[0] === "")
|
|
14
|
+
return i;
|
|
15
|
+
for (let r = 0; r < n.length; r++) {
|
|
16
|
+
const a = (s ? t : "") + n.slice(0, r + 1).join(t);
|
|
17
|
+
i.push({
|
|
18
|
+
index: r + 1,
|
|
19
|
+
name: n[r],
|
|
20
20
|
path: a
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
return
|
|
23
|
+
return i;
|
|
24
24
|
}
|
|
25
25
|
export {
|
|
26
26
|
l as getFilePathBreadcrumbs,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as S, useSlots as
|
|
1
|
+
import { defineComponent as S, useSlots as V, ref as n, computed as v, watch as z, createElementBlock as s, openBlock as t, normalizeClass as B, createCommentVNode as x, createVNode as b, createElementVNode as _, createBlock as E, toDisplayString as c, unref as p, withCtx as f, renderSlot as H, createTextVNode as L } from "vue";
|
|
2
2
|
import j from "../PlIcon24/PlIcon24.vue.js";
|
|
3
3
|
import { okOptional as A, tapIf as P } from "../../lib/util/helpers/dist/index.js";
|
|
4
4
|
import { useLogHandle as R } from "./useLogHandle.js";
|
|
@@ -15,12 +15,12 @@ import y from "../PlTooltip/PlTooltip.vue.js";
|
|
|
15
15
|
console.error("vite-plugin-css-injected-by-js", u);
|
|
16
16
|
}
|
|
17
17
|
})();
|
|
18
|
-
const
|
|
18
|
+
const D = { key: 0 }, I = { class: "pl-log-view__copy" }, M = {
|
|
19
19
|
key: 1,
|
|
20
20
|
class: "pl-log-view__error"
|
|
21
21
|
}, O = {
|
|
22
22
|
name: "PlLogView"
|
|
23
|
-
},
|
|
23
|
+
}, U = /* @__PURE__ */ S({
|
|
24
24
|
...O,
|
|
25
25
|
props: {
|
|
26
26
|
value: {},
|
|
@@ -39,7 +39,7 @@ const I = { key: 0 }, D = { class: "pl-log-view__copy" }, M = {
|
|
|
39
39
|
if (o && o.ok === !1)
|
|
40
40
|
return o.errors.join(`
|
|
41
41
|
`);
|
|
42
|
-
}, k =
|
|
42
|
+
}, k = V(), e = l, g = R(e), h = n(!0), m = n(), w = n(), d = v(() => {
|
|
43
43
|
var o;
|
|
44
44
|
return ((o = g.value) == null ? void 0 : o.error) ?? e.error ?? u(e.output);
|
|
45
45
|
}), r = v(() => {
|
|
@@ -58,7 +58,7 @@ const I = { key: 0 }, D = { class: "pl-log-view__copy" }, M = {
|
|
|
58
58
|
h.value && o.scrollTo(o.scrollLeft, o.scrollHeight);
|
|
59
59
|
});
|
|
60
60
|
};
|
|
61
|
-
|
|
61
|
+
z(
|
|
62
62
|
r,
|
|
63
63
|
() => {
|
|
64
64
|
requestAnimationFrame(() => {
|
|
@@ -74,9 +74,9 @@ const I = { key: 0 }, D = { class: "pl-log-view__copy" }, M = {
|
|
|
74
74
|
return (o, i) => (t(), s("div", {
|
|
75
75
|
ref_key: "root",
|
|
76
76
|
ref: w,
|
|
77
|
-
class:
|
|
77
|
+
class: B(["pl-log-view", { "has-error": d.value }])
|
|
78
78
|
}, [
|
|
79
|
-
o.label ? (t(), s("label",
|
|
79
|
+
o.label ? (t(), s("label", D, [
|
|
80
80
|
_("span", null, c(o.label), 1),
|
|
81
81
|
p(k).tooltip ? (t(), E(p(y), {
|
|
82
82
|
key: 0,
|
|
@@ -90,7 +90,7 @@ const I = { key: 0 }, D = { class: "pl-log-view__copy" }, M = {
|
|
|
90
90
|
})) : x("", !0)
|
|
91
91
|
])) : x("", !0),
|
|
92
92
|
b(q, { class: "pl-log-view__contour" }),
|
|
93
|
-
_("div",
|
|
93
|
+
_("div", I, [
|
|
94
94
|
b(p(y), {
|
|
95
95
|
"close-delay": 800,
|
|
96
96
|
position: "top"
|
|
@@ -119,6 +119,6 @@ const I = { key: 0 }, D = { class: "pl-log-view__copy" }, M = {
|
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
export {
|
|
122
|
-
|
|
122
|
+
U as default
|
|
123
123
|
};
|
|
124
124
|
//# sourceMappingURL=PlLogView.vue.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { reactive as c, watch as
|
|
1
|
+
import { reactive as c, watch as n } from "vue";
|
|
2
2
|
import { objects as t } from "../lib/util/helpers/dist/index.js";
|
|
3
|
-
function u(r, d,
|
|
3
|
+
function u(r, d, o) {
|
|
4
4
|
const e = c({
|
|
5
5
|
data: t.deepClone(d(r.value)),
|
|
6
6
|
changed: !1
|
|
7
7
|
});
|
|
8
|
-
return
|
|
8
|
+
return n(
|
|
9
9
|
() => e.data,
|
|
10
10
|
(a) => {
|
|
11
|
-
e.changed ?
|
|
11
|
+
e.changed ? o(t.deepClone(a)) : e.changed = !0;
|
|
12
12
|
},
|
|
13
13
|
{ deep: !0 }
|
|
14
|
-
),
|
|
14
|
+
), n(
|
|
15
15
|
r,
|
|
16
16
|
(a) => {
|
|
17
17
|
Object.assign(e, {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
import { debounce as
|
|
3
|
-
function c(
|
|
4
|
-
const r =
|
|
1
|
+
import { reactive as n } from "vue";
|
|
2
|
+
import { debounce as s } from "../lib/util/helpers/dist/index.js";
|
|
3
|
+
function c(t) {
|
|
4
|
+
const r = n({
|
|
5
5
|
isLoading: !1,
|
|
6
6
|
result: void 0,
|
|
7
7
|
error: void 0,
|
|
8
8
|
async run(...i) {
|
|
9
9
|
this.isLoading = !0, this.error = void 0;
|
|
10
10
|
try {
|
|
11
|
-
this.result = await
|
|
12
|
-
} catch (
|
|
13
|
-
this.error =
|
|
11
|
+
this.result = await t(...i);
|
|
12
|
+
} catch (o) {
|
|
13
|
+
this.error = o;
|
|
14
14
|
} finally {
|
|
15
15
|
this.isLoading = !1;
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
debounce(i,
|
|
19
|
-
return
|
|
20
|
-
const
|
|
21
|
-
this.run(...
|
|
22
|
-
},
|
|
18
|
+
debounce(i, o = 1e3) {
|
|
19
|
+
return s(() => {
|
|
20
|
+
const e = i();
|
|
21
|
+
this.run(...e).catch(console.error);
|
|
22
|
+
}, o);
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
return r.run = r.run.bind(r), r;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ref as c, reactive as l, computed as n, watch as
|
|
2
|
-
import { exclusiveRequest as
|
|
1
|
+
import { ref as c, reactive as l, computed as n, watch as s } from "vue";
|
|
2
|
+
import { exclusiveRequest as d } from "../lib/util/helpers/dist/index.js";
|
|
3
3
|
function h(o, t, u) {
|
|
4
4
|
const r = c(0), e = l({
|
|
5
5
|
loading: n(() => r.value > 0),
|
|
6
6
|
loadingRef: r,
|
|
7
7
|
value: void 0,
|
|
8
8
|
error: void 0
|
|
9
|
-
}), i =
|
|
10
|
-
return
|
|
9
|
+
}), i = d(t);
|
|
10
|
+
return s(
|
|
11
11
|
o,
|
|
12
12
|
async (v) => {
|
|
13
13
|
e.error = void 0, r.value++, i(v).then((a) => {
|