@veltra/desktop 1.7.6 → 1.7.8
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/components/cascade/use-check.js +5 -2
- package/dist/components/cascade/use-check.js.map +1 -1
- package/dist/components/cascade/use-select.js +5 -1
- package/dist/components/cascade/use-select.js.map +1 -1
- package/dist/components/code-editor/langs/bash/index.js +1 -1
- package/dist/components/code-editor/langs/powershell/index.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +46 -12
- package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
- package/dist/components/table/style2.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/node_modules/.bun/{@codemirror_legacy-modes@6.5.3 → @codemirror_legacy-modes@6.5.4}/node_modules/@codemirror/legacy-modes/mode/powershell.js +1 -1
- package/dist/node_modules/.bun/{@codemirror_legacy-modes@6.5.3 → @codemirror_legacy-modes@6.5.4}/node_modules/@codemirror/legacy-modes/mode/powershell.js.map +1 -1
- package/dist/node_modules/.bun/{@codemirror_legacy-modes@6.5.3 → @codemirror_legacy-modes@6.5.4}/node_modules/@codemirror/legacy-modes/mode/shell.js +1 -1
- package/dist/node_modules/.bun/{@codemirror_legacy-modes@6.5.3 → @codemirror_legacy-modes@6.5.4}/node_modules/@codemirror/legacy-modes/mode/shell.js.map +1 -1
- package/dist/types/cascade.d.ts +6 -2
- package/dist/types/date-range-picker.d.ts +13 -3
- package/dist/types/index.d.ts +2 -2
- package/package.json +14 -14
- package/src/components/cascade/__test__/cascade.test.ts +103 -0
- package/src/components/cascade/use-check.ts +5 -2
- package/src/components/cascade/use-select.ts +2 -1
- package/src/components/date-range-picker/__test__/date-range-picker.test.ts +278 -0
- package/src/components/date-range-picker/date-range-picker.vue +61 -17
- package/src/components/table/style.scss +1 -1
- package/src/types/cascade.ts +10 -2
- package/src/types/date-range-picker.ts +14 -2
|
@@ -22,10 +22,13 @@ function useCheck(options) {
|
|
|
22
22
|
const checkedArr = Array.from(checkedSet.value);
|
|
23
23
|
const targetValues = checkedArr.map((item) => item.value);
|
|
24
24
|
const targetLabels = checkedArr.map((item) => item.label);
|
|
25
|
-
const targetItems = checkedArr.map((item) =>
|
|
25
|
+
const targetItems = checkedArr.map((item) => {
|
|
26
|
+
const data = item.data;
|
|
27
|
+
return data ? Object.assign({}, data, { fullLabel: item.label }) : data;
|
|
28
|
+
});
|
|
26
29
|
emit("update:modelValue", targetValues);
|
|
27
30
|
emit("update:label", targetLabels.length ? targetLabels : void 0);
|
|
28
|
-
emit("change", targetItems);
|
|
31
|
+
emit("change", targetItems, targetLabels.length ? targetLabels : void 0);
|
|
29
32
|
}
|
|
30
33
|
const restTag = computed(() => {
|
|
31
34
|
const { visibilityLimit, modelValue } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-check.js","names":[],"sources":["../../../src/components/cascade/use-check.ts"],"sourcesContent":["import { dfs, type Forest } from '@cat-kit/core'\nimport {\n computed,\n shallowRef,\n triggerRef,\n watch,\n type ComputedRef,\n type Ref,\n type ShallowRef\n} from 'vue'\n\nimport type { CascadeProps, CascadeEmits, CascadeNode } from '../../types'\n\ninterface CheckOptions {\n props: CascadeProps\n emit: CascadeEmits\n dataMap: ShallowRef<Map<string, CascadeNode>>\n disabled: Ref<boolean>\n readonly: Ref<boolean>\n forest: Ref<Forest<Record<string, unknown>, any>>\n isUserActive: () => boolean\n getPanelItemList: (data?: CascadeNode[]) => void\n}\n\ninterface UseCheckReturned {\n hovered: ShallowRef<boolean>\n tags: ComputedRef<CascadeNode[]>\n checkedSet: ShallowRef<Set<CascadeNode>>\n restTag: ComputedRef<number>\n handleCloseTag: (tag: CascadeNode) => void\n updateMultipleValue: () => void\n checkItem: (item: CascadeNode, checked: boolean) => void\n}\n\nexport function useCheck(options: CheckOptions): UseCheckReturned {\n const { props, emit, dataMap, disabled, readonly, forest, isUserActive, getPanelItemList } =\n options\n\n const hovered = shallowRef(false)\n\n const checkedSet = shallowRef(new Set<CascadeNode>())\n\n const tags = computed(() => {\n const { modelValue, multiple } = props\n let tags: CascadeNode[] = []\n\n if (!multiple || !Array.isArray(modelValue)) return tags\n\n let { visibilityLimit } = props\n if (visibilityLimit! < 0) {\n visibilityLimit = 0\n }\n\n // 禁用时,显示全部\n if (disabled.value || readonly.value) {\n visibilityLimit = props.modelValue?.length ?? 0\n }\n\n modelValue.slice(0, visibilityLimit).forEach((k) => {\n const option = dataMap.value.get(k)\n option && tags.push(option)\n })\n\n return tags\n })\n\n function updateMultipleValue() {\n const checkedArr = Array.from(checkedSet.value)\n const targetValues = checkedArr.map((item) => item.value)\n const targetLabels = checkedArr.map((item) => item.label)\n const targetItems = checkedArr.map((item) => item.data as Record<string, any
|
|
1
|
+
{"version":3,"file":"use-check.js","names":[],"sources":["../../../src/components/cascade/use-check.ts"],"sourcesContent":["import { dfs, type Forest } from '@cat-kit/core'\nimport {\n computed,\n shallowRef,\n triggerRef,\n watch,\n type ComputedRef,\n type Ref,\n type ShallowRef\n} from 'vue'\n\nimport type { CascadeProps, CascadeEmits, CascadeNode } from '../../types'\n\ninterface CheckOptions {\n props: CascadeProps\n emit: CascadeEmits\n dataMap: ShallowRef<Map<string, CascadeNode>>\n disabled: Ref<boolean>\n readonly: Ref<boolean>\n forest: Ref<Forest<Record<string, unknown>, any>>\n isUserActive: () => boolean\n getPanelItemList: (data?: CascadeNode[]) => void\n}\n\ninterface UseCheckReturned {\n hovered: ShallowRef<boolean>\n tags: ComputedRef<CascadeNode[]>\n checkedSet: ShallowRef<Set<CascadeNode>>\n restTag: ComputedRef<number>\n handleCloseTag: (tag: CascadeNode) => void\n updateMultipleValue: () => void\n checkItem: (item: CascadeNode, checked: boolean) => void\n}\n\nexport function useCheck(options: CheckOptions): UseCheckReturned {\n const { props, emit, dataMap, disabled, readonly, forest, isUserActive, getPanelItemList } =\n options\n\n const hovered = shallowRef(false)\n\n const checkedSet = shallowRef(new Set<CascadeNode>())\n\n const tags = computed(() => {\n const { modelValue, multiple } = props\n let tags: CascadeNode[] = []\n\n if (!multiple || !Array.isArray(modelValue)) return tags\n\n let { visibilityLimit } = props\n if (visibilityLimit! < 0) {\n visibilityLimit = 0\n }\n\n // 禁用时,显示全部\n if (disabled.value || readonly.value) {\n visibilityLimit = props.modelValue?.length ?? 0\n }\n\n modelValue.slice(0, visibilityLimit).forEach((k) => {\n const option = dataMap.value.get(k)\n option && tags.push(option)\n })\n\n return tags\n })\n\n function updateMultipleValue() {\n const checkedArr = Array.from(checkedSet.value)\n const targetValues = checkedArr.map((item) => item.value)\n const targetLabels = checkedArr.map((item) => item.label)\n const targetItems = checkedArr.map((item) => {\n const data = item.data as Record<string, any>\n return data ? Object.assign({}, data, { fullLabel: item.label }) : data\n })\n emit('update:modelValue', targetValues)\n emit('update:label', targetLabels.length ? targetLabels : undefined)\n emit('change', targetItems, targetLabels.length ? targetLabels : undefined)\n }\n\n const restTag = computed(() => {\n const { visibilityLimit, modelValue } = props\n\n return Math.max((modelValue?.length ?? 0) - visibilityLimit!, 0)\n })\n\n function handleCloseTag(tag: CascadeNode) {\n checkedSet.value.delete(tag)\n updateMultipleValue()\n }\n\n function checkItem(item: CascadeNode, checked: boolean) {\n const childrenKey = props.childrenKey ?? 'children'\n if (checked) {\n dfs(\n item as unknown as Record<string, unknown>,\n (node) => {\n checkedSet.value.add(node as unknown as CascadeNode)\n },\n childrenKey\n )\n } else {\n dfs(\n item as unknown as Record<string, unknown>,\n (node) => {\n checkedSet.value.delete(node as unknown as CascadeNode)\n },\n childrenKey\n )\n }\n\n triggerRef(checkedSet)\n\n updateMultipleValue()\n }\n\n function initMultipleCheck() {\n const { modelValue } = props\n getPanelItemList()\n if (Array.isArray(modelValue)) {\n checkedSet.value = new Set(modelValue.map((v) => dataMap.value.get(v)!))\n }\n }\n\n watch(\n [() => props.multiple, () => props.modelValue, forest],\n ([multiple]) => {\n if (!multiple || isUserActive()) return\n initMultipleCheck()\n },\n { immediate: false }\n )\n\n return { hovered, tags, checkedSet, restT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AAC;CAED,SAAS,eAAe,KAAkB;EACxC,WAAW,MAAM,OAAO,GAAG;EAC3B,oBAAoB;CACtB;CAEA,SAAS,UAAU,MAAmB,SAAkB;EACtD,MAAM,cAAc,MAAM,eAAe;EACzC,IAAI,SACF,IACE,OACC,SAAS;GACR,WAAW,MAAM,IAAI,IAA8B;EACrD,GACA,WACF;OAEA,IACE,OACC,SAAS;GACR,WAAW,MAAM,OAAO,IAA8B;EACxD,GACA,WACF;EAGF,WAAW,UAAU;EAErB,oBAAoB;CACtB;CAEA,SAAS,oBAAoB;EAC3B,MAAM,EAAE,eAAe;EACvB,iBAAiB;EACjB,IAAI,MAAM,QAAQ,UAAU,GAC1B,WAAW,QAAQ,IAAI,IAAI,WAAW,KAAK,MAAM,QAAQ,MAAM,IAAI,CAAC,CAAE,CAAC;CAE3E;CAEA,MACE;QAAO,MAAM;QAAgB,MAAM;EAAY;CAAM,IACpD,CAAC,cAAc;EACd,IAAI,CAAC,YAAY,aAAa,GAAG;EACjC,kBAAkB;CACpB,GACA,EAAE,WAAW,MAAM,CACrB;CAEA,OAAO;EAAE;EAAS;EAAM;EAAY;EAAS;EAAgB;EAAqB;CAAU;AAC9F"}
|
|
@@ -55,9 +55,13 @@ function useSelect(options) {
|
|
|
55
55
|
const targetValue = showFullPath ? keys.length ? keys.join(separator) : void 0 : leafKey;
|
|
56
56
|
const targetLabel = showFullPath ? keys.map((key) => dataMap.value.get(key)?.label).filter(Boolean).join(separator) : leafLabel;
|
|
57
57
|
const leafNode = leafKey ? dataMap.value.get(leafKey) : void 0;
|
|
58
|
+
const changeItem = leafNode?.data ? {
|
|
59
|
+
...leafNode.data,
|
|
60
|
+
fullLabel: targetLabel
|
|
61
|
+
} : void 0;
|
|
58
62
|
emit("update:modelValue", targetValue);
|
|
59
63
|
emit("update:label", targetLabel);
|
|
60
|
-
emit("change",
|
|
64
|
+
emit("change", changeItem, targetLabel);
|
|
61
65
|
}
|
|
62
66
|
/**
|
|
63
67
|
* 单选选择
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-select.js","names":[],"sources":["../../../src/components/cascade/use-select.ts"],"sourcesContent":["import { Forest } from '@cat-kit/core'\nimport { createIncrease } from '@veltra/utils'\nimport {\n computed,\n nextTick,\n shallowRef,\n triggerRef,\n watch,\n type ComputedRef,\n type Ref,\n type ShallowRef\n} from 'vue'\n\nimport type {\n CascadeProps,\n CascadeEmits,\n CascadeNode,\n DropdownExposed,\n PanelItem\n} from '../../types'\n\ninterface SelectOptions {\n props: CascadeProps\n emit: CascadeEmits\n isUserActive: () => boolean\n forest: Ref<Forest<Record<string, unknown>, any>>\n dataMap: Ref<Map<string, CascadeNode>>\n dropdownRef: Ref<DropdownExposed | undefined>\n}\n\nfunction buildPathKeys(leaf: CascadeNode): string[] {\n const keys: string[] = []\n let node: CascadeNode | undefined = leaf\n while (node) {\n keys.unshift(node.value)\n node = node.parent\n }\n return keys\n}\n\ninterface UseSelectReturned {\n displayedValue: ComputedRef<string | undefined>\n selectItem: (panelIndex: number, item: CascadeNode) => void\n selectedNodeKeys: ShallowRef<string[]>\n updateSingleValue: () => void\n initSingleSelect: () => void\n panelItemList: ShallowRef<PanelItem[]>\n getPanelItemList: (data?: CascadeNode[]) => void\n setPanelItem: (panelIndex: number, panelData?: CascadeNode[]) => void\n createPanelItem: (nodes: CascadeNode[]) => PanelItem\n}\n\nexport function useSelect(options: SelectOptions): UseSelectReturned {\n const { props, emit, dataMap, isUserActive, dropdownRef, forest } = options\n\n /** 选中的节点key */\n const selectedNodeKeys = shallowRef<string[]>([])\n\n /** 面板数据 */\n const panelItemList = shallowRef<PanelItem[]>([])\n const uid = createIncrease()\n function createPanelItem(nodes: CascadeNode[]): PanelItem {\n return { key: uid(), nodes: nodes.filter((node) => node.visible) }\n }\n\n const displayedValue = computed(() => {\n const { modelValue, separator, showFullPath } = props\n if (!modelValue || typeof modelValue !== 'string') return ''\n\n if (showFullPath) {\n return modelValue\n .split(separator!)\n .map((v) => dataMap.value.get(v)?.label ?? v)\n .join(separator)\n }\n return dataMap.value.get(modelValue)?.label ?? modelValue\n })\n\n function getPanelItemList(data?: CascadeNode[]) {\n const _panelItemList: Array<PanelItem> = []\n if (!data?.length) return panelItemList\n _panelItemList.push(createPanelItem(data))\n\n selectedNodeKeys.value.slice(0, -1).forEach((key) => {\n const node = dataMap.value.get(key)\n node?.children?.length && _panelItemList.push(createPanelItem(node.children))\n })\n\n panelItemList.value = _panelItemList\n }\n\n function setPanelItem(panelIndex: number, panelData?: CascadeNode[]) {\n if (panelData?.length) {\n panelItemList.value[panelIndex + 1] = createPanelItem(panelData)\n panelItemList.value.splice(panelIndex + 2)\n } else {\n panelItemList.value.splice(panelIndex + 1)\n }\n\n triggerRef(panelItemList)\n }\n\n function updateSingleValue() {\n const { separator, showFullPath } = props\n const keys = selectedNodeKeys.value\n const leafKey = keys.length ? keys[keys.length - 1] : undefined\n const leafLabel = leafKey ? dataMap.value.get(leafKey)?.label : undefined\n\n const targetValue = showFullPath ? (keys.length ? keys.join(separator!) : undefined) : leafKey\n const targetLabel = showFullPath\n ? keys\n .map((key) => dataMap.value.get(key)?.label)\n .filter(Boolean)\n .join(separator!)\n : leafLabel\n\n const leafNode = leafKey ? dataMap.value.get(leafKey) : undefined\n\n emit('update:modelValue', targetValue)\n emit('update:label', targetLabel)\n emit('change',
|
|
1
|
+
{"version":3,"file":"use-select.js","names":[],"sources":["../../../src/components/cascade/use-select.ts"],"sourcesContent":["import { Forest } from '@cat-kit/core'\nimport { createIncrease } from '@veltra/utils'\nimport {\n computed,\n nextTick,\n shallowRef,\n triggerRef,\n watch,\n type ComputedRef,\n type Ref,\n type ShallowRef\n} from 'vue'\n\nimport type {\n CascadeProps,\n CascadeEmits,\n CascadeNode,\n DropdownExposed,\n PanelItem\n} from '../../types'\n\ninterface SelectOptions {\n props: CascadeProps\n emit: CascadeEmits\n isUserActive: () => boolean\n forest: Ref<Forest<Record<string, unknown>, any>>\n dataMap: Ref<Map<string, CascadeNode>>\n dropdownRef: Ref<DropdownExposed | undefined>\n}\n\nfunction buildPathKeys(leaf: CascadeNode): string[] {\n const keys: string[] = []\n let node: CascadeNode | undefined = leaf\n while (node) {\n keys.unshift(node.value)\n node = node.parent\n }\n return keys\n}\n\ninterface UseSelectReturned {\n displayedValue: ComputedRef<string | undefined>\n selectItem: (panelIndex: number, item: CascadeNode) => void\n selectedNodeKeys: ShallowRef<string[]>\n updateSingleValue: () => void\n initSingleSelect: () => void\n panelItemList: ShallowRef<PanelItem[]>\n getPanelItemList: (data?: CascadeNode[]) => void\n setPanelItem: (panelIndex: number, panelData?: CascadeNode[]) => void\n createPanelItem: (nodes: CascadeNode[]) => PanelItem\n}\n\nexport function useSelect(options: SelectOptions): UseSelectReturned {\n const { props, emit, dataMap, isUserActive, dropdownRef, forest } = options\n\n /** 选中的节点key */\n const selectedNodeKeys = shallowRef<string[]>([])\n\n /** 面板数据 */\n const panelItemList = shallowRef<PanelItem[]>([])\n const uid = createIncrease()\n function createPanelItem(nodes: CascadeNode[]): PanelItem {\n return { key: uid(), nodes: nodes.filter((node) => node.visible) }\n }\n\n const displayedValue = computed(() => {\n const { modelValue, separator, showFullPath } = props\n if (!modelValue || typeof modelValue !== 'string') return ''\n\n if (showFullPath) {\n return modelValue\n .split(separator!)\n .map((v) => dataMap.value.get(v)?.label ?? v)\n .join(separator)\n }\n return dataMap.value.get(modelValue)?.label ?? modelValue\n })\n\n function getPanelItemList(data?: CascadeNode[]) {\n const _panelItemList: Array<PanelItem> = []\n if (!data?.length) return panelItemList\n _panelItemList.push(createPanelItem(data))\n\n selectedNodeKeys.value.slice(0, -1).forEach((key) => {\n const node = dataMap.value.get(key)\n node?.children?.length && _panelItemList.push(createPanelItem(node.children))\n })\n\n panelItemList.value = _panelItemList\n }\n\n function setPanelItem(panelIndex: number, panelData?: CascadeNode[]) {\n if (panelData?.length) {\n panelItemList.value[panelIndex + 1] = createPanelItem(panelData)\n panelItemList.value.splice(panelIndex + 2)\n } else {\n panelItemList.value.splice(panelIndex + 1)\n }\n\n triggerRef(panelItemList)\n }\n\n function updateSingleValue() {\n const { separator, showFullPath } = props\n const keys = selectedNodeKeys.value\n const leafKey = keys.length ? keys[keys.length - 1] : undefined\n const leafLabel = leafKey ? dataMap.value.get(leafKey)?.label : undefined\n\n const targetValue = showFullPath ? (keys.length ? keys.join(separator!) : undefined) : leafKey\n const targetLabel = showFullPath\n ? keys\n .map((key) => dataMap.value.get(key)?.label)\n .filter(Boolean)\n .join(separator!)\n : leafLabel\n\n const leafNode = leafKey ? dataMap.value.get(leafKey) : undefined\n const changeItem = leafNode?.data ? { ...leafNode.data, fullLabel: targetLabel } : undefined\n\n emit('update:modelValue', targetValue)\n emit('update:label', targetLabel)\n emit('change', changeItem, targetLabel)\n }\n\n /**\n * 单选选择\n *\n * @param panelIndex 面板索引\n * @param item 选中的节点\n */\n function selectItem(panelIndex: number, item: CascadeNode) {\n // 设置选中的节点\n selectedNodeKeys.value[panelIndex] = item.value\n selectedNodeKeys.value.splice(panelIndex + 1)\n triggerRef(selectedNodeKeys)\n\n // 展开子级面板\n setPanelItem(panelIndex, item.children)\n\n nextTick(() => {\n dropdownRef.value?.updateDropdown()\n })\n\n if (!item.children?.length && !props.multiple) {\n dropdownRef.value?.close()\n }\n }\n\n function initSingleSelect() {\n const { modelValue, separator, showFullPath } = props\n\n if (modelValue && typeof modelValue === 'string') {\n let keys: string[]\n if (showFullPath) {\n keys = modelValue.split(separator!)\n } else {\n const leaf = dataMap.value.get(modelValue)\n keys = leaf ? buildPathKeys(leaf) : [modelValue]\n }\n selectedNodeKeys.value = keys\n getPanelItemList(forest.value.roots)\n } else {\n selectedNodeKeys.value = []\n getPanelItemList(forest.value.roots)\n }\n }\n\n watch(\n [() => props.multiple, () => props.modelValue, forest],\n ([multiple]) => {\n if (multiple || isUserActive()) return\n initSingleSelect()\n },\n { immediate: true }\n )\n\n return {\n displayedValue,\n selectItem,\n selectedNodeKeys,\n updateSingleValue,\n initSingleSelect,\n panelIt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AAI,cACF,OAAO,WAAW,MAAM,SAAU;QAC7B;IACL,MAAM,OAAO,QAAQ,MAAM,IAAI,UAAU;IACzC,OAAO,OAAO,cAAc,IAAI,IAAI,CAAC,UAAU;GACjD;GACA,iBAAiB,QAAQ;GACzB,iBAAiB,OAAO,MAAM,KAAK;EACrC,OAAO;GACL,iBAAiB,QAAQ,CAAC;GAC1B,iBAAiB,OAAO,MAAM,KAAK;EACrC;CACF;CAEA,MACE;QAAO,MAAM;QAAgB,MAAM;EAAY;CAAM,IACpD,CAAC,cAAc;EACd,IAAI,YAAY,aAAa,GAAG;EAChC,iBAAiB;CACnB,GACA,EAAE,WAAW,KAAK,CACpB;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LanguageSupport, StreamLanguage } from "../../../../node_modules/.bun/@codemirror_language@6.12.4/node_modules/@codemirror/language/dist/index.js";
|
|
2
|
-
import { shell } from "../../../../node_modules/.bun/@codemirror_legacy-modes@6.5.
|
|
2
|
+
import { shell } from "../../../../node_modules/.bun/@codemirror_legacy-modes@6.5.4/node_modules/@codemirror/legacy-modes/mode/shell.js";
|
|
3
3
|
//#region src/components/code-editor/langs/bash/index.ts
|
|
4
4
|
/** Bash / shell 脚本语言支持(基于 CodeMirror legacy shell mode) */
|
|
5
5
|
function bash() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LanguageSupport, StreamLanguage } from "../../../../node_modules/.bun/@codemirror_language@6.12.4/node_modules/@codemirror/language/dist/index.js";
|
|
2
|
-
import { powerShell } from "../../../../node_modules/.bun/@codemirror_legacy-modes@6.5.
|
|
2
|
+
import { powerShell } from "../../../../node_modules/.bun/@codemirror_legacy-modes@6.5.4/node_modules/@codemirror/legacy-modes/mode/powershell.js";
|
|
3
3
|
//#region src/components/code-editor/langs/powershell/index.ts
|
|
4
4
|
/** PowerShell 语言支持(基于 CodeMirror legacy powershell mode) */
|
|
5
5
|
function powershell() {
|
|
@@ -5,7 +5,7 @@ import { Fragment, Transition, computed, createBlock, createElementBlock, create
|
|
|
5
5
|
import { useFormFallbackProps, useUserAction } from "@veltra/compositions";
|
|
6
6
|
import { FORM_EMPTY_CONTENT, bem, injectFormContext } from "@veltra/utils";
|
|
7
7
|
import { Calendar, Close } from "@veltra/icons/normal";
|
|
8
|
-
import { date } from "@cat-kit/core";
|
|
8
|
+
import { Dater, date } from "@cat-kit/core";
|
|
9
9
|
//#region src/components/date-range-picker/date-range-picker.vue
|
|
10
10
|
const _hoisted_1 = ["value", "placeholder"];
|
|
11
11
|
const _hoisted_2 = ["value", "placeholder"];
|
|
@@ -19,6 +19,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
19
19
|
type: { default: "date" },
|
|
20
20
|
format: {},
|
|
21
21
|
valueFormat: {},
|
|
22
|
+
dataType: { default: "string" },
|
|
22
23
|
disabledDate: {},
|
|
23
24
|
clearable: {
|
|
24
25
|
type: Boolean,
|
|
@@ -39,7 +40,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
39
40
|
rules: {},
|
|
40
41
|
size: {}
|
|
41
42
|
},
|
|
42
|
-
emits: ["update:modelValue"],
|
|
43
|
+
emits: ["update:modelValue", "change"],
|
|
43
44
|
setup(__props, { emit: __emit }) {
|
|
44
45
|
const props = __props;
|
|
45
46
|
const emit = __emit;
|
|
@@ -62,12 +63,6 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
62
63
|
const dropdownRef = shallowRef();
|
|
63
64
|
const { userAction, isUserActive } = useUserAction();
|
|
64
65
|
const currentRangeDate = shallowRef();
|
|
65
|
-
const displayedOfStart = computed(() => {
|
|
66
|
-
return props.modelValue?.[0];
|
|
67
|
-
});
|
|
68
|
-
const displayedOfEnd = computed(() => {
|
|
69
|
-
return props.modelValue?.[1];
|
|
70
|
-
});
|
|
71
66
|
const formatStr = computed(() => {
|
|
72
67
|
const { format, type } = props;
|
|
73
68
|
if (format) return format;
|
|
@@ -76,16 +71,54 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
76
71
|
if (type === "year") return "yyyy";
|
|
77
72
|
return "yyyy-MM-dd";
|
|
78
73
|
});
|
|
74
|
+
const displayedOfStart = computed(() => {
|
|
75
|
+
return currentRangeDate.value?.[0]?.format(formatStr.value) ?? "";
|
|
76
|
+
});
|
|
77
|
+
const displayedOfEnd = computed(() => {
|
|
78
|
+
return currentRangeDate.value?.[1]?.format(formatStr.value) ?? "";
|
|
79
|
+
});
|
|
80
|
+
function parseDateValue(val) {
|
|
81
|
+
if (val == null || val === "") return void 0;
|
|
82
|
+
if (val instanceof Date || typeof val === "number") {
|
|
83
|
+
const d = date(val);
|
|
84
|
+
return isNaN(d.timestamp) ? void 0 : d;
|
|
85
|
+
}
|
|
86
|
+
if (typeof val === "string") {
|
|
87
|
+
if (props.dataType === "string" && props.valueFormat) {
|
|
88
|
+
const parsed = Dater.parse(val, props.valueFormat);
|
|
89
|
+
if (!isNaN(parsed.timestamp)) return parsed;
|
|
90
|
+
}
|
|
91
|
+
const fallback = date(val);
|
|
92
|
+
return isNaN(fallback.timestamp) ? void 0 : fallback;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
79
95
|
watch(() => props.modelValue, (val) => {
|
|
80
96
|
if (isUserActive()) return;
|
|
81
|
-
if (val
|
|
82
|
-
|
|
97
|
+
if (val && val.length === 2) {
|
|
98
|
+
const d1 = parseDateValue(val[0]);
|
|
99
|
+
const d2 = parseDateValue(val[1]);
|
|
100
|
+
if (d1 && d2) {
|
|
101
|
+
currentRangeDate.value = [d1, d2];
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
currentRangeDate.value = void 0;
|
|
83
106
|
}, { immediate: true });
|
|
107
|
+
function formatDateValue(d) {
|
|
108
|
+
if (props.dataType === "date") return d.raw;
|
|
109
|
+
if (props.dataType === "timestamp") return d.timestamp;
|
|
110
|
+
return d.format(props.valueFormat ?? formatStr.value);
|
|
111
|
+
}
|
|
112
|
+
function formatModelValue(range) {
|
|
113
|
+
return [formatDateValue(range[0]), formatDateValue(range[1])];
|
|
114
|
+
}
|
|
84
115
|
const commitSelectedRange = userAction((rangeDate) => {
|
|
85
116
|
currentRangeDate.value = rangeDate;
|
|
86
|
-
emit("update:modelValue", rangeDate
|
|
117
|
+
emit("update:modelValue", formatModelValue(rangeDate));
|
|
118
|
+
emit("change", [rangeDate[0].raw, rangeDate[1].raw]);
|
|
87
119
|
});
|
|
88
120
|
async function handleSelect(rangeDate) {
|
|
121
|
+
if (!rangeDate) return;
|
|
89
122
|
await commitSelectedRange(rangeDate);
|
|
90
123
|
dropdownRef.value?.close();
|
|
91
124
|
}
|
|
@@ -93,6 +126,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
93
126
|
function handleClear() {
|
|
94
127
|
currentRangeDate.value = void 0;
|
|
95
128
|
emit("update:modelValue", void 0);
|
|
129
|
+
emit("change", void 0);
|
|
96
130
|
}
|
|
97
131
|
return (_ctx, _cache) => {
|
|
98
132
|
return !unref(readonly) ? (openBlock(), createBlock(unref(_sfc_main$2), mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
@@ -127,7 +161,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
127
161
|
name: "zoom-in",
|
|
128
162
|
mode: "out-in"
|
|
129
163
|
}, {
|
|
130
|
-
default: withCtx(() => [__props.clearable && __props.modelValue && hovered.value && !unref(disabled) ? (openBlock(), createBlock(unref(_sfc_main$1), {
|
|
164
|
+
default: withCtx(() => [__props.clearable && (__props.modelValue?.length || currentRangeDate.value) && hovered.value && !unref(disabled) ? (openBlock(), createBlock(unref(_sfc_main$1), {
|
|
131
165
|
key: 0,
|
|
132
166
|
class: normalizeClass([unref(cls).e("icon"), unref(cls).e("clear")]),
|
|
133
167
|
title: "清除",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-range-picker.js","names":["$attrs"],"sources":["../../../src/components/date-range-picker/date-range-picker.vue"],"sourcesContent":["<template>\n <u-dropdown\n v-if=\"!readonly\"\n v-bind=\"$attrs\"\n :class=\"className\"\n trigger=\"click\"\n :content-class=\"[cls.e('panel'), cls.em('panel', size)]\"\n width=\"auto\"\n ref=\"dropdownRef\"\n :disabled=\"disabled\"\n @mouseenter.native=\"hovered = true\"\n @mouseleave.native=\"hovered = false\"\n @update:visible=\"dropdownVisible = $event\"\n >\n <template #trigger>\n <input\n type=\"text\"\n :class=\"cls.e('input')\"\n :value=\"displayedOfStart\"\n :placeholder=\"placeholder[0]\"\n readonly\n />\n <span :class=\"cls.e('separator')\">至</span>\n <input\n type=\"text\"\n :class=\"cls.e('input')\"\n :value=\"displayedOfEnd\"\n :placeholder=\"placeholder[1]\"\n readonly\n />\n\n <Transition name=\"zoom-in\" mode=\"out-in\">\n <UIcon\n v-if=\"clearable && modelValue && hovered && !disabled\"\n :class=\"[cls.e('icon'), cls.e('clear')]\"\n title=\"清除\"\n @click.stop=\"handleClear\"\n >\n <Close />\n </UIcon>\n\n <u-icon :class=\"cls.e('icon')\" v-else><Calendar /></u-icon>\n </Transition>\n </template>\n\n <template #content>\n <UDatePanel\n range\n :type\n :disabled-date\n :size\n :range-date=\"currentRangeDate\"\n @select:range-date=\"handleSelect\"\n />\n </template>\n </u-dropdown>\n\n <template v-else>\n {{ displayedOfStart || FORM_EMPTY_CONTENT }} 至\n {{ displayedOfEnd || FORM_EMPTY_CONTENT }}\n </template>\n</template>\n\n<script lang=\"ts\" setup>\nimport { date,
|
|
1
|
+
{"version":3,"file":"date-range-picker.js","names":["$attrs"],"sources":["../../../src/components/date-range-picker/date-range-picker.vue"],"sourcesContent":["<template>\n <u-dropdown\n v-if=\"!readonly\"\n v-bind=\"$attrs\"\n :class=\"className\"\n trigger=\"click\"\n :content-class=\"[cls.e('panel'), cls.em('panel', size)]\"\n width=\"auto\"\n ref=\"dropdownRef\"\n :disabled=\"disabled\"\n @mouseenter.native=\"hovered = true\"\n @mouseleave.native=\"hovered = false\"\n @update:visible=\"dropdownVisible = $event\"\n >\n <template #trigger>\n <input\n type=\"text\"\n :class=\"cls.e('input')\"\n :value=\"displayedOfStart\"\n :placeholder=\"placeholder[0]\"\n readonly\n />\n <span :class=\"cls.e('separator')\">至</span>\n <input\n type=\"text\"\n :class=\"cls.e('input')\"\n :value=\"displayedOfEnd\"\n :placeholder=\"placeholder[1]\"\n readonly\n />\n\n <Transition name=\"zoom-in\" mode=\"out-in\">\n <UIcon\n v-if=\"clearable && (modelValue?.length || currentRangeDate) && hovered && !disabled\"\n :class=\"[cls.e('icon'), cls.e('clear')]\"\n title=\"清除\"\n @click.stop=\"handleClear\"\n >\n <Close />\n </UIcon>\n\n <u-icon :class=\"cls.e('icon')\" v-else><Calendar /></u-icon>\n </Transition>\n </template>\n\n <template #content>\n <UDatePanel\n range\n :type\n :disabled-date\n :size\n :range-date=\"currentRangeDate\"\n @select:range-date=\"handleSelect\"\n />\n </template>\n </u-dropdown>\n\n <template v-else>\n {{ displayedOfStart || FORM_EMPTY_CONTENT }} 至\n {{ displayedOfEnd || FORM_EMPTY_CONTENT }}\n </template>\n</template>\n\n<script lang=\"ts\" setup>\nimport { date, Dater } from '@cat-kit/core'\nimport { useFormFallbackProps, useUserAction } from '@veltra/compositions'\nimport { Calendar, Close } from '@veltra/icons/normal'\nimport { bem, FORM_EMPTY_CONTENT } from '@veltra/utils'\nimport { injectFormContext } from '@veltra/utils'\nimport { computed, shallowRef, watch } from 'vue'\n\nimport type {\n DateRangePickerEmits,\n DateRangePickerProps,\n DateRangeValue,\n DropdownExposed\n} from '../../types'\nimport { UDatePanel } from '../date-panel'\nimport { UDropdown } from '../dropdown'\nimport { UIcon } from '../icon'\n\ndefineOptions({ name: 'UDateRangePicker', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<DateRangePickerProps>(), {\n placeholder: () => ['起始日期', '结束日期'],\n type: 'date',\n dataType: 'string',\n disabled: undefined,\n readonly: undefined,\n clearable: true\n})\n\nconst emit = defineEmits<DateRangePickerEmits>()\n\nconst cls = bem('date-range-picker')\n\nconst dropdownVisible = shallowRef(false)\n\nconst className = computed(() => {\n return [\n cls.b,\n cls.m(size.value),\n bem.is('disabled', disabled.value),\n bem.is('focus', dropdownVisible.value)\n ]\n})\n\nconst { formProps } = injectFormContext()\n\nconst { size, disabled, readonly } = useFormFallbackProps([formProps ?? {}, props], {\n size: 'default',\n disabled: false,\n readonly: false\n})\n\nconst dropdownRef = shallowRef<DropdownExposed>()\n\nconst { userAction, isUserActive } = useUserAction()\n\nconst currentRangeDate = shallowRef<[Dater, Dater]>()\n\nconst formatStr = computed(() => {\n const { format, type } = props\n if (format) return format\n if (type === 'date') return 'yyyy-MM-dd'\n if (type === 'month') return 'yyyy-MM'\n if (type === 'year') return 'yyyy'\n return 'yyyy-MM-dd'\n})\n\nconst displayedOfStart = computed(() => {\n return currentRangeDate.value?.[0]?.format(formatStr.value) ?? ''\n})\n\nconst displayedOfEnd = computed(() => {\n return currentRangeDate.value?.[1]?.format(formatStr.value) ?? ''\n})\n\nfunction parseDateValue(val?: string | number | Date): Dater | undefined {\n if (val == null || val === '') return undefined\n if (val instanceof Date || typeof val === 'number') {\n const d = date(val)\n return isNaN(d.timestamp) ? undefined : d\n }\n if (typeof val === 'string') {\n if (props.dataType === 'string' && props.valueFormat) {\n const parsed = Dater.parse(val, props.valueFormat)\n if (!isNaN(parsed.timestamp)) return parsed\n }\n const fallback = date(val)\n return isNaN(fallback.timestamp) ? undefined : fallback\n }\n return undefined\n}\n\nwatch(\n () => props.modelValue,\n (val) => {\n if (isUserActive()) return\n if (val && val.length === 2) {\n const d1 = parseDateValue(val[0])\n const d2 = parseDateValue(val[1])\n if (d1 && d2) {\n currentRangeDate.value = [d1, d2]\n return\n }\n }\n currentRangeDate.value = undefined\n },\n { immediate: true }\n)\n\nfunction formatDateValue(d: Dater) {\n if (props.dataType === 'date') {\n return d.raw\n }\n if (props.dataType === 'timestamp') {\n return d.timestamp\n }\n return d.format(props.valueFormat ?? formatStr.value)\n}\n\nfunction formatModelValue(range: [Dater, Dater]): DateRangeValue {\n return [formatDateValue(range[0]), formatDateValue(range[1])] as DateRangeValue\n}\n\nconst commitSelectedRange = userAction((rangeDate: [Dater, Dater]) => {\n currentRangeDate.value = rangeDate\n emit('update:modelValue', formatModelValue(rangeDate))\n emit('change', [rangeDate[0].raw, rangeDate[1].raw])\n})\n\nasync function handleSelect(rangeDate: [Dater, Dater] | undefined) {\n if (!rangeDate) return\n await commitSelectedRange(rangeDate)\n dropdownRef.value?.close()\n}\n\nconst hovered = shallowRef(false)\n\nfunction handleClear() {\n currentRangeDate.value = undefined\n emit('update:modelValue', undefined)\n emit('change', undefined)\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmFA,MAAM,QAAQ;EASd,MAAM,OAAO;EAEb,MAAM,MAAM,IAAI,mBAAmB;EAEnC,MAAM,kBAAkB,WAAW,KAAK;EAExC,MAAM,YAAY,eAAe;GAC/B,OAAO;IACL,IAAI;IACJ,IAAI,EAAE,KAAK,KAAK;IAChB,IAAI,GAAG,YAAY,SAAS,KAAK;IACjC,IAAI,GAAG,SAAS,gBAAgB,KAAK;GACvC;EACF,CAAC;EAED,MAAM,EAAE,cAAc,kBAAkB;EAExC,MAAM,EAAE,MAAM,UAAU,aAAa,qBAAqB,CAAC,aAAa,CAAC,GAAG,KAAK,GAAG;GAClF,MAAM;GACN,UAAU;GACV,UAAU;EACZ,CAAC;EAED,MAAM,cAAc,WAA4B;EAEhD,MAAM,EAAE,YAAY,iBAAiB,cAAc;EAEnD,MAAM,mBAAmB,WAA2B;EAEpD,MAAM,YAAY,eAAe;GAC/B,MAAM,EAAE,QAAQ,SAAS;GACzB,IAAI,QAAQ,OAAO;GACnB,IAAI,SAAS,QAAQ,OAAO;GAC5B,IAAI,SAAS,SAAS,OAAO;GAC7B,IAAI,SAAS,QAAQ,OAAO;GA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eNodeProps, TreeProps, _TreeExposed
|
|
|
95
95
|
import { TreeSelectEmits, TreeSelectExposed, TreeSelectProps, _TreeSelectExposed } from "./types/tree-select.js";
|
|
96
96
|
import { LayoutEmits, LayoutExposed, LayoutProps, _LayoutExposed } from "./types/layout.js";
|
|
97
97
|
import { TagEmits, TagExposed, TagProps } from "./types/tag.js";
|
|
98
|
-
import { DateRangePickerEmits, DateRangePickerExposed, DateRangePickerProps, _DateRangePickerExposed } from "./types/date-range-picker.js";
|
|
98
|
+
import { DateRangePickerDataType, DateRangePickerEmits, DateRangePickerExposed, DateRangePickerProps, DateRangeValue, _DateRangePickerExposed } from "./types/date-range-picker.js";
|
|
99
99
|
import { RadioGroupEmits, RadioGroupExposed, RadioGroupProps, _RadioGroupExposed } from "./types/radio-group.js";
|
|
100
100
|
import { ScrollEmits, ScrollExposed, ScrollPosition, ScrollProps, _ScrollExposed } from "./types/scroll.js";
|
|
101
101
|
import { WatermarkEmits, WatermarkExposed, WatermarkProps, _WatermarkExposed } from "./types/watermark.js";
|
|
@@ -183,4 +183,4 @@ import { defineBatchEditColumns } from "./components/batch-edit/helper.js";
|
|
|
183
183
|
import { defineTableColumns } from "./components/table/use-columns.js";
|
|
184
184
|
import "./components/index.js";
|
|
185
185
|
export * from "@veltra/utils";
|
|
186
|
-
export { type ActionEmits, type ActionExposed, type ActionGroupExposed, type ActionGroupProps, type ActionProps, type AnimationEmits, type AnimationExposed, type AnimationProps, type AutoCompleteEmits, type AutoCompleteExposed, type AutoCompleteProps, type BadgeEmits, type BadgeExposed, type BadgeProps, type BarType, type BatchEditColumn, type BatchEditEmits, type BatchEditExposed, type BatchEditFeature, type BatchEditFormStatus, type BatchEditProps, type BatchEditSlots, type BatchEditStates, type BreadcrumbEmits, type BreadcrumbExposed, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSlotScope, type BreakCols, type Breakpoint, type ButtonEmits, type ButtonExposed, type ButtonProps, type ButtonType, type CalendarDay, type CalendarEmits, type CalendarExposed, type CalendarMonth, type CalendarProps, type CalendarYear, type CardActionProps, type CardContentProps, type CardCoverProps, type CardEmits, type CardExposed, type CardProps, type CascadeEmits, type CascadeExposed, type CascadeNode, type CascadeProps, type CheckTagEmits, type CheckTagExposed, type CheckTagProps, type CheckboxButtonEmits, type CheckboxButtonProps, type CheckboxEmits, type CheckboxExposed, type CheckboxGroupEmits, type CheckboxGroupExposed, type CheckboxGroupProps, type CheckboxProps, type CodeEditorEmits, type CodeEditorExposed, type CodeEditorLang, type CodeEditorProps, type CollapseEmits, type CollapseItemEmits, type CollapseItemProps, type CollapseModelValue, type CollapseProps, type CollapseValue, type ConditionConnector, type ConditionEditorEmits, type ConditionEditorExposed, type ConditionEditorProps, type EvaluateOptions as ConditionEvaluateOptions, type ConditionExpression, type ConditionField, type ConditionGroup, type ConditionLeaf, type ConditionNode, type ConditionValue, type ContextmenuEmits, type ContextmenuExposed, type ContextmenuItem, ContextmenuPanelDIKey, type ContextmenuProps, ContextmenuRootDIKey, type CssTransitionEmits, type CssTransitionExposed, type CssTransitionProps, type DatePanelEmits, type DatePanelProps, type DatePickerDataType, type DatePickerEmits, type DatePickerExposed, type DatePickerProps, type DateRangePickerEmits, type DateRangePickerExposed, type DateRangePickerProps, type DialogEmits, type DialogExposed, type DialogProps, type DialogTransition, type DrawerDirection, type DrawerEmits, type DrawerExposed, type DrawerMode, type DrawerProps, type DropdownEmits, type DropdownExposed, type DropdownProps, type DualNavEmits, type DualNavExposed, type DualNavProps, type DualNavRailVariant, type DualNavRootItem, type EmptyEmits, type EmptyExposed, type EmptyProps, type ExpressionEditorEmits, type ExpressionEditorExposed, type ExpressionEditorProps, type ExpressionSelectableLevels, type FileViewerEmits, type FileViewerExposed, type FileViewerItem, type FileViewerKind, type FileViewerProps, type FloatButtonEmits, type FloatButtonExposed, type FloatButtonItem, type FloatButtonProps, type FormEmits, type FormExposed, type FormItemEmits, type FormItemExposed, type FormItemProps, type FormProps, type GanttChartEmits, type GanttChartExposed, type GanttChartProps, type GridEmits, type GridExposed, type GridInputEmits, type GridInputExposed, type GridInputProps, type GridItemProps, type GridProps, type GroupInputEmits, type GroupInputExposed, type GroupInputProps, type GroupNavEmits, type GroupNavGroup, type GroupNavProps, type IconEmits, type IconExposed, type IconProps, type InputEmits, type InputExposed, type InputProps, type LayoutEmits, type LayoutExposed, type LayoutProps, type ListEmits, type ListExposed, type ListProps, type LoadingEmits, type LoadingExposed, type LoadingProps, type LoadingType, type Message, type MessageConfirm, type MessageConfirmAction, type MessageConfirmEmits, type MessageConfirmExposed, type MessageConfirmInstance, type MessageConfirmOptions, type MessageConfirmProps, type MessageEmits, type MessageExposed, type MessageInstance, type MessageOptions, type MessageProps, type MessageType, type MultiAutoCompleteEmits, type MultiAutoCompleteExposed, type MultiAutoCompleteProps, type MultiSelectEmits, type MultiSelectExposed, type MultiSelectProps, type MultiTreeSelectEmits, type MultiTreeSelectExposed, type MultiTreeSelectProps, type NavEmits, type NavExposed, type NavItem, type NavProps, type NodeRenderExposed, type NodeRenderProps, type Notification, type NotificationEmits, type NotificationExposed, type NotificationInstance, type NotificationOptions, type NotificationPosition, type NotificationProps, type NumberEmits, type NumberExposed, type NumberInputEmits, type NumberInputExposed, type NumberInputProps, type NumberProps, type NumberRangeInputEmits, type NumberRangeInputExposed, type NumberRangeInputProps, type NumberRangeTuple, type PaginatorEmits, type PaginatorExposed, type PaginatorProps, type PaletteColorType, type PaletteEmits, type PaletteExposed, type PaletteHSV, type PaletteProps, type PaletteRGB, type PanelItem, type PanelType, type PasswordInputEmits, type PasswordInputExposed, type PasswordInputProps, type PopConfirmEmits, type PopConfirmExposed, type PopConfirmProps, type PopEmits, type PopExposed, type PopProps, type ProgressEmits, type ProgressExposed, type ProgressNodesEmits, type ProgressNodesExposed, type ProgressNodesProps, type ProgressProps, type QuickBatchEditEmits, type QuickBatchEditExposed, type QuickBatchEditProps, type RadioEmits, type RadioExposed, type RadioGroupEmits, type RadioGroupExposed, type RadioGroupProps, type RadioProps, type RichTextEditorEmits, type RichTextEditorExposed, type RichTextEditorProps, type RichTextFormat, type ScrollEmits, type ScrollExposed, type ScrollPosition, type ScrollProps, type SegmentEmits, type SegmentExposed, type SegmentItem, type SegmentProps, type SelectEmits, type SelectExposed, type SelectProps, type SliderEmits, type SliderExposed, type SliderProps, type StepsEmits, type StepsExposed, type StepsProps, type StepsSlotScope, type SwitchEmits, type SwitchExposed, type SwitchProps, type TabItem, type TableColumn, type TableColumnAlign, type TableColumnNode, type TableColumnRenderContext, type TableColumnSlotsScope, type TableEditorEmits, type TableEditorExposed, type TableEditorProps, type TableEmits, type TableExposed, type TableProps, type TableRow, type TableRowSlotsScope, type TableSummaryContext, type TabsEmits, type TabsExposed, type TabsHorizontalEmits, type TabsHorizontalExposed, type TabsHorizontalProps, type TabsProps, type TabsVerticalEmits, type TabsVerticalExposed, type TabsVerticalProps, type TagEmits, type TagExposed, type TagProps, type TextEditorEmits, type TextEditorExposed, type TextEditorProps, type TextEmits, type TextExposed, type TextProps, type TextareaEmits, type TextareaExposed, type TextareaProps, type ThemeExposed, type ThemeProps, type TipAlign, type TipDirection, type TipEmits, type TipExposed, type TipProps, type ToolbarItem, type TreeEmit, type TreeExposed, type TreeNode, type TreeNodeProps, type TreeProps, type TreeSelectEmits, type TreeSelectExposed, type TreeSelectProps, _sfc_main as UAction, action_group_default as UActionGroup, _sfc_main$1 as UAutoComplete, _sfc_main$2 as UBadge, _sfc_main$3 as UBatchEdit, _sfc_main$4 as UBreadcrumb, _sfc_main$5 as UButton, _sfc_main$6 as UButtonGroup, _sfc_main$7 as UCalendar, _sfc_main$8 as UCard, _sfc_main$9 as UCardAction, _sfc_main$10 as UCardContent, _sfc_main$11 as UCardCover, _sfc_main$12 as UCardHeader, _sfc_main$13 as UCascade, _sfc_main$14 as UCheckTag, _sfc_main$15 as UCheckbox, _sfc_main$16 as UCheckboxButton, _sfc_main$17 as UCheckboxGroup, _sfc_main$18 as UCodeEditor, _sfc_main$19 as UCollapse, _sfc_main$20 as UCollapseItem, _sfc_main$21 as UConditionEditor, _sfc_main$22 as UContextmenu, _sfc_main$23 as UDatePanel, _sfc_main$24 as UDatePicker, _sfc_main$25 as UDateRangePicker, _sfc_main$26 as UDialog, _sfc_main$27 as UDrawer, _sfc_main$28 as UDropdown, _sfc_main$29 as UDualNav, _sfc_main$30 as UEmpty, _sfc_main$31 as UExpressionEditor, _sfc_main$32 as UFilePicker, _sfc_main$33 as UFileViewer, _sfc_main$34 as UFloatButton, form_default as UForm, form_item_default as UFormItem, _sfc_main$35 as UGanttChart, _sfc_main$36 as UGrid, _sfc_main$37 as UGridInput, _sfc_main$38 as UGridItem, _sfc_main$39 as UGroupInput, _sfc_main$40 as UGroupNav, _sfc_main$41 as UIcon, input_default as UInput, _sfc_main$42 as UKbd, _sfc_main$43 as ULayout, _sfc_main$44 as UList, _sfc_main$45 as UListItem, _sfc_main$46 as ULoading, _sfc_main$47 as UMessage, _sfc_main$48 as UMessageConfirm, _sfc_main$49 as UMultiSelect, _sfc_main$50 as UMultiTreeSelect, _sfc_main$51 as UNav, _sfc_main$52 as UNavItem, _sfc_main$53 as UNavSub, NodeRender as UNodeRender, _sfc_main$54 as UNotification, _sfc_main$55 as UNumber, _sfc_main$56 as UNumberInput, _sfc_main$57 as UNumberRangeInput, _sfc_main$58 as UPaginator, _sfc_main$59 as UPalette, _sfc_main$60 as UPasswordInput, _sfc_main$61 as UPopConfirm, _sfc_main$62 as UProgress, _sfc_main$63 as UProgressNodes, _sfc_main$64 as URadio, _sfc_main$65 as URadioGroup, _sfc_main$66 as URichTextEditor, _sfc_main$67 as UScroll, _sfc_main$68 as USegment, _sfc_main$69 as USelect, _sfc_main$70 as USlider, _sfc_main$71 as USteps, _sfc_main$72 as USwitch, _sfc_main$73 as UTable, _sfc_main$74 as UTableEditor, _sfc_main$75 as UTabs, _sfc_main$76 as UTabsHorizontal, _sfc_main$77 as UTabsVertical, _sfc_main$78 as UTag, _sfc_main$79 as UText, _sfc_main$80 as UTextarea, _sfc_main$81 as UTheme, _sfc_main$82 as UTip, _sfc_main$83 as UTree, _sfc_main$84 as UTreeSelect, _sfc_main$85 as UWatermark, type UploaderEmits, type UploaderExposed, type UploaderProps, type VariableItem, type WatermarkEmits, type WatermarkExposed, type WatermarkProps, type _ActionExposed, type _ActionGroupExposed, type _AnimationExposed, type _AutoCompleteExposed, type _BadgeExposed, type _BatchEditExposed, type _BreadcrumbExposed, type _ButtonExposed, type _CalendarExposed, type _CardExposed, type _CascadeExposed, type _CheckTagExposed, type _CodeEditorExposed, type _ConditionEditorExposed, type _ContextmenuExposed, type _CssTransitionExposed, type _DatePickerExposed, type _DateRangePickerExposed, type _DialogExposed, type _DrawerExposed, type _DropdownExposed, type _DualNavExposed, type _EmptyExposed, type _ExpressionEditorExposed, type _FileViewerExposed, type _FloatButtonExposed, type _FormExposed, type _GanttChartExposed, type _GridExposed, type _GridInputExposed, type _GroupInputExposed, type _InputExposed, type _LayoutExposed, type _ListExposed, type _LoadingExposed, type _MessageConfirmExposed, type _MessageExposed, type _MultiAutoCompleteExposed, type _MultiSelectExposed, type _MultiTreeSelectExposed, type _NavExposed, type _NotificationExposed, type _PaginatorExposed, type _PaletteExposed, type _PasswordInputExposed, type _PopConfirmExposed, type _PopExposed, type _ProgressExposed, type _ProgressNodesExposed, type _QuickBatchEditExposed, type _RadioExposed, type _RadioGroupExposed, type _RichTextEditorExposed, type _ScrollExposed, type _SegmentExposed, type _SelectExposed, type _SliderExposed, type _StepsExposed, type _SwitchExposed, type _TableEditorExposed, type _TableExposed, type _TabsExposed, type _TabsHorizontalExposed, type _TabsVerticalExposed, type _TextEditorExposed, type _TextExposed, type _TextareaExposed, type _ThemeExposed, type _TipExposed, type _TreeExposed, type _TreeSelectExposed, type _UploaderExposed, type _WatermarkExposed, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, message, messageConfirm, notification, vLoading };
|
|
186
|
+
export { type ActionEmits, type ActionExposed, type ActionGroupExposed, type ActionGroupProps, type ActionProps, type AnimationEmits, type AnimationExposed, type AnimationProps, type AutoCompleteEmits, type AutoCompleteExposed, type AutoCompleteProps, type BadgeEmits, type BadgeExposed, type BadgeProps, type BarType, type BatchEditColumn, type BatchEditEmits, type BatchEditExposed, type BatchEditFeature, type BatchEditFormStatus, type BatchEditProps, type BatchEditSlots, type BatchEditStates, type BreadcrumbEmits, type BreadcrumbExposed, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSlotScope, type BreakCols, type Breakpoint, type ButtonEmits, type ButtonExposed, type ButtonProps, type ButtonType, type CalendarDay, type CalendarEmits, type CalendarExposed, type CalendarMonth, type CalendarProps, type CalendarYear, type CardActionProps, type CardContentProps, type CardCoverProps, type CardEmits, type CardExposed, type CardProps, type CascadeEmits, type CascadeExposed, type CascadeNode, type CascadeProps, type CheckTagEmits, type CheckTagExposed, type CheckTagProps, type CheckboxButtonEmits, type CheckboxButtonProps, type CheckboxEmits, type CheckboxExposed, type CheckboxGroupEmits, type CheckboxGroupExposed, type CheckboxGroupProps, type CheckboxProps, type CodeEditorEmits, type CodeEditorExposed, type CodeEditorLang, type CodeEditorProps, type CollapseEmits, type CollapseItemEmits, type CollapseItemProps, type CollapseModelValue, type CollapseProps, type CollapseValue, type ConditionConnector, type ConditionEditorEmits, type ConditionEditorExposed, type ConditionEditorProps, type EvaluateOptions as ConditionEvaluateOptions, type ConditionExpression, type ConditionField, type ConditionGroup, type ConditionLeaf, type ConditionNode, type ConditionValue, type ContextmenuEmits, type ContextmenuExposed, type ContextmenuItem, ContextmenuPanelDIKey, type ContextmenuProps, ContextmenuRootDIKey, type CssTransitionEmits, type CssTransitionExposed, type CssTransitionProps, type DatePanelEmits, type DatePanelProps, type DatePickerDataType, type DatePickerEmits, type DatePickerExposed, type DatePickerProps, type DateRangePickerDataType, type DateRangePickerEmits, type DateRangePickerExposed, type DateRangePickerProps, type DateRangeValue, type DialogEmits, type DialogExposed, type DialogProps, type DialogTransition, type DrawerDirection, type DrawerEmits, type DrawerExposed, type DrawerMode, type DrawerProps, type DropdownEmits, type DropdownExposed, type DropdownProps, type DualNavEmits, type DualNavExposed, type DualNavProps, type DualNavRailVariant, type DualNavRootItem, type EmptyEmits, type EmptyExposed, type EmptyProps, type ExpressionEditorEmits, type ExpressionEditorExposed, type ExpressionEditorProps, type ExpressionSelectableLevels, type FileViewerEmits, type FileViewerExposed, type FileViewerItem, type FileViewerKind, type FileViewerProps, type FloatButtonEmits, type FloatButtonExposed, type FloatButtonItem, type FloatButtonProps, type FormEmits, type FormExposed, type FormItemEmits, type FormItemExposed, type FormItemProps, type FormProps, type GanttChartEmits, type GanttChartExposed, type GanttChartProps, type GridEmits, type GridExposed, type GridInputEmits, type GridInputExposed, type GridInputProps, type GridItemProps, type GridProps, type GroupInputEmits, type GroupInputExposed, type GroupInputProps, type GroupNavEmits, type GroupNavGroup, type GroupNavProps, type IconEmits, type IconExposed, type IconProps, type InputEmits, type InputExposed, type InputProps, type LayoutEmits, type LayoutExposed, type LayoutProps, type ListEmits, type ListExposed, type ListProps, type LoadingEmits, type LoadingExposed, type LoadingProps, type LoadingType, type Message, type MessageConfirm, type MessageConfirmAction, type MessageConfirmEmits, type MessageConfirmExposed, type MessageConfirmInstance, type MessageConfirmOptions, type MessageConfirmProps, type MessageEmits, type MessageExposed, type MessageInstance, type MessageOptions, type MessageProps, type MessageType, type MultiAutoCompleteEmits, type MultiAutoCompleteExposed, type MultiAutoCompleteProps, type MultiSelectEmits, type MultiSelectExposed, type MultiSelectProps, type MultiTreeSelectEmits, type MultiTreeSelectExposed, type MultiTreeSelectProps, type NavEmits, type NavExposed, type NavItem, type NavProps, type NodeRenderExposed, type NodeRenderProps, type Notification, type NotificationEmits, type NotificationExposed, type NotificationInstance, type NotificationOptions, type NotificationPosition, type NotificationProps, type NumberEmits, type NumberExposed, type NumberInputEmits, type NumberInputExposed, type NumberInputProps, type NumberProps, type NumberRangeInputEmits, type NumberRangeInputExposed, type NumberRangeInputProps, type NumberRangeTuple, type PaginatorEmits, type PaginatorExposed, type PaginatorProps, type PaletteColorType, type PaletteEmits, type PaletteExposed, type PaletteHSV, type PaletteProps, type PaletteRGB, type PanelItem, type PanelType, type PasswordInputEmits, type PasswordInputExposed, type PasswordInputProps, type PopConfirmEmits, type PopConfirmExposed, type PopConfirmProps, type PopEmits, type PopExposed, type PopProps, type ProgressEmits, type ProgressExposed, type ProgressNodesEmits, type ProgressNodesExposed, type ProgressNodesProps, type ProgressProps, type QuickBatchEditEmits, type QuickBatchEditExposed, type QuickBatchEditProps, type RadioEmits, type RadioExposed, type RadioGroupEmits, type RadioGroupExposed, type RadioGroupProps, type RadioProps, type RichTextEditorEmits, type RichTextEditorExposed, type RichTextEditorProps, type RichTextFormat, type ScrollEmits, type ScrollExposed, type ScrollPosition, type ScrollProps, type SegmentEmits, type SegmentExposed, type SegmentItem, type SegmentProps, type SelectEmits, type SelectExposed, type SelectProps, type SliderEmits, type SliderExposed, type SliderProps, type StepsEmits, type StepsExposed, type StepsProps, type StepsSlotScope, type SwitchEmits, type SwitchExposed, type SwitchProps, type TabItem, type TableColumn, type TableColumnAlign, type TableColumnNode, type TableColumnRenderContext, type TableColumnSlotsScope, type TableEditorEmits, type TableEditorExposed, type TableEditorProps, type TableEmits, type TableExposed, type TableProps, type TableRow, type TableRowSlotsScope, type TableSummaryContext, type TabsEmits, type TabsExposed, type TabsHorizontalEmits, type TabsHorizontalExposed, type TabsHorizontalProps, type TabsProps, type TabsVerticalEmits, type TabsVerticalExposed, type TabsVerticalProps, type TagEmits, type TagExposed, type TagProps, type TextEditorEmits, type TextEditorExposed, type TextEditorProps, type TextEmits, type TextExposed, type TextProps, type TextareaEmits, type TextareaExposed, type TextareaProps, type ThemeExposed, type ThemeProps, type TipAlign, type TipDirection, type TipEmits, type TipExposed, type TipProps, type ToolbarItem, type TreeEmit, type TreeExposed, type TreeNode, type TreeNodeProps, type TreeProps, type TreeSelectEmits, type TreeSelectExposed, type TreeSelectProps, _sfc_main as UAction, action_group_default as UActionGroup, _sfc_main$1 as UAutoComplete, _sfc_main$2 as UBadge, _sfc_main$3 as UBatchEdit, _sfc_main$4 as UBreadcrumb, _sfc_main$5 as UButton, _sfc_main$6 as UButtonGroup, _sfc_main$7 as UCalendar, _sfc_main$8 as UCard, _sfc_main$9 as UCardAction, _sfc_main$10 as UCardContent, _sfc_main$11 as UCardCover, _sfc_main$12 as UCardHeader, _sfc_main$13 as UCascade, _sfc_main$14 as UCheckTag, _sfc_main$15 as UCheckbox, _sfc_main$16 as UCheckboxButton, _sfc_main$17 as UCheckboxGroup, _sfc_main$18 as UCodeEditor, _sfc_main$19 as UCollapse, _sfc_main$20 as UCollapseItem, _sfc_main$21 as UConditionEditor, _sfc_main$22 as UContextmenu, _sfc_main$23 as UDatePanel, _sfc_main$24 as UDatePicker, _sfc_main$25 as UDateRangePicker, _sfc_main$26 as UDialog, _sfc_main$27 as UDrawer, _sfc_main$28 as UDropdown, _sfc_main$29 as UDualNav, _sfc_main$30 as UEmpty, _sfc_main$31 as UExpressionEditor, _sfc_main$32 as UFilePicker, _sfc_main$33 as UFileViewer, _sfc_main$34 as UFloatButton, form_default as UForm, form_item_default as UFormItem, _sfc_main$35 as UGanttChart, _sfc_main$36 as UGrid, _sfc_main$37 as UGridInput, _sfc_main$38 as UGridItem, _sfc_main$39 as UGroupInput, _sfc_main$40 as UGroupNav, _sfc_main$41 as UIcon, input_default as UInput, _sfc_main$42 as UKbd, _sfc_main$43 as ULayout, _sfc_main$44 as UList, _sfc_main$45 as UListItem, _sfc_main$46 as ULoading, _sfc_main$47 as UMessage, _sfc_main$48 as UMessageConfirm, _sfc_main$49 as UMultiSelect, _sfc_main$50 as UMultiTreeSelect, _sfc_main$51 as UNav, _sfc_main$52 as UNavItem, _sfc_main$53 as UNavSub, NodeRender as UNodeRender, _sfc_main$54 as UNotification, _sfc_main$55 as UNumber, _sfc_main$56 as UNumberInput, _sfc_main$57 as UNumberRangeInput, _sfc_main$58 as UPaginator, _sfc_main$59 as UPalette, _sfc_main$60 as UPasswordInput, _sfc_main$61 as UPopConfirm, _sfc_main$62 as UProgress, _sfc_main$63 as UProgressNodes, _sfc_main$64 as URadio, _sfc_main$65 as URadioGroup, _sfc_main$66 as URichTextEditor, _sfc_main$67 as UScroll, _sfc_main$68 as USegment, _sfc_main$69 as USelect, _sfc_main$70 as USlider, _sfc_main$71 as USteps, _sfc_main$72 as USwitch, _sfc_main$73 as UTable, _sfc_main$74 as UTableEditor, _sfc_main$75 as UTabs, _sfc_main$76 as UTabsHorizontal, _sfc_main$77 as UTabsVertical, _sfc_main$78 as UTag, _sfc_main$79 as UText, _sfc_main$80 as UTextarea, _sfc_main$81 as UTheme, _sfc_main$82 as UTip, _sfc_main$83 as UTree, _sfc_main$84 as UTreeSelect, _sfc_main$85 as UWatermark, type UploaderEmits, type UploaderExposed, type UploaderProps, type VariableItem, type WatermarkEmits, type WatermarkExposed, type WatermarkProps, type _ActionExposed, type _ActionGroupExposed, type _AnimationExposed, type _AutoCompleteExposed, type _BadgeExposed, type _BatchEditExposed, type _BreadcrumbExposed, type _ButtonExposed, type _CalendarExposed, type _CardExposed, type _CascadeExposed, type _CheckTagExposed, type _CodeEditorExposed, type _ConditionEditorExposed, type _ContextmenuExposed, type _CssTransitionExposed, type _DatePickerExposed, type _DateRangePickerExposed, type _DialogExposed, type _DrawerExposed, type _DropdownExposed, type _DualNavExposed, type _EmptyExposed, type _ExpressionEditorExposed, type _FileViewerExposed, type _FloatButtonExposed, type _FormExposed, type _GanttChartExposed, type _GridExposed, type _GridInputExposed, type _GroupInputExposed, type _InputExposed, type _LayoutExposed, type _ListExposed, type _LoadingExposed, type _MessageConfirmExposed, type _MessageExposed, type _MultiAutoCompleteExposed, type _MultiSelectExposed, type _MultiTreeSelectExposed, type _NavExposed, type _NotificationExposed, type _PaginatorExposed, type _PaletteExposed, type _PasswordInputExposed, type _PopConfirmExposed, type _PopExposed, type _ProgressExposed, type _ProgressNodesExposed, type _QuickBatchEditExposed, type _RadioExposed, type _RadioGroupExposed, type _RichTextEditorExposed, type _ScrollExposed, type _SegmentExposed, type _SelectExposed, type _SliderExposed, type _StepsExposed, type _SwitchExposed, type _TableEditorExposed, type _TableExposed, type _TabsExposed, type _TabsHorizontalExposed, type _TabsVerticalExposed, type _TextEditorExposed, type _TextExposed, type _TextareaExposed, type _ThemeExposed, type _TipExposed, type _TreeExposed, type _TreeSelectExposed, type _UploaderExposed, type _WatermarkExposed, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, message, messageConfirm, notification, vLoading };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.bun/@codemirror+legacy-modes@6.5.
|
|
1
|
+
//#region ../../node_modules/.bun/@codemirror+legacy-modes@6.5.4/node_modules/@codemirror/legacy-modes/mode/powershell.js
|
|
2
2
|
function buildRegexp(patterns, options) {
|
|
3
3
|
options = options || {};
|
|
4
4
|
var prefix = options.prefix !== void 0 ? options.prefix : "^";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"powershell.js","names":[],"sources":["../../../../../../../../../../node_modules/.bun/@codemirror+legacy-modes@6.5.3/node_modules/@codemirror/legacy-modes/mode/powershell.js"],"sourcesContent":["function buildRegexp(patterns, options) {\n options = options || {};\n var prefix = options.prefix !== undefined ? options.prefix : '^';\n var suffix = options.suffix !== undefined ? options.suffix : '\\\\b';\n\n for (var i = 0; i < patterns.length; i++) {\n if (patterns[i] instanceof RegExp) {\n patterns[i] = patterns[i].source;\n }\n else {\n patterns[i] = patterns[i].replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n }\n\n return new RegExp(prefix + '(' + patterns.join('|') + ')' + suffix, 'i');\n}\n\nvar notCharacterOrDash = '(?=[^A-Za-z\\\\d\\\\-_]|$)';\nvar varNames = /[\\w\\-:]/\nvar keywords = buildRegexp([\n /begin|break|catch|continue|data|default|do|dynamicparam/,\n /else|elseif|end|exit|filter|finally|for|foreach|from|function|if|in/,\n /param|process|return|switch|throw|trap|try|until|where|while/\n], { suffix: notCharacterOrDash });\n\nvar punctuation = /[\\[\\]{},;`\\\\\\.]|@[({]/;\nvar wordOperators = buildRegexp([\n 'f',\n /b?not/,\n /[ic]?split/, 'join',\n /is(not)?/, 'as',\n /[ic]?(eq|ne|[gl][te])/,\n /[ic]?(not)?(like|match|contains)/,\n /[ic]?replace/,\n /b?(and|or|xor)/\n], { prefix: '-' });\nvar symbolOperators = /[+\\-*\\/%]=|\\+\\+|--|\\.\\.|[+\\-*&^%:=!|\\/]|<(?!#)|(?!#)>/;\nvar operators = buildRegexp([wordOperators, symbolOperators], { suffix: '' });\n\nvar numbers = /^((0x[\\da-f]+)|((\\d+\\.\\d+|\\d\\.|\\.\\d+|\\d+)(e[\\+\\-]?\\d+)?))[ld]?([kmgtp]b)?/i;\n\nvar identifiers = /^[A-Za-z\\_][A-Za-z\\-\\_\\d]*\\b/;\n\nvar symbolBuiltins = /[A-Z]:|%|\\?/i;\nvar namedBuiltins = buildRegexp([\n /Add-(Computer|Content|History|Member|PSSnapin|Type)/,\n /Checkpoint-Computer/,\n /Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/,\n /Compare-Object/,\n /Complete-Transaction/,\n /Connect-PSSession/,\n /ConvertFrom-(Csv|Json|SecureString|StringData)/,\n /Convert-Path/,\n /ConvertTo-(Csv|Html|Json|SecureString|Xml)/,\n /Copy-Item(Property)?/,\n /Debug-Process/,\n /Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,\n /Disconnect-PSSession/,\n /Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,\n /(Enter|Exit)-PSSession/,\n /Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/,\n /ForEach-Object/,\n /Format-(Custom|List|Table|Wide)/,\n new RegExp('Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential'\n + '|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job'\n + '|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration'\n + '|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)'),\n /Group-Object/,\n /Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/,\n /ImportSystemModules/,\n /Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/,\n /Join-Path/,\n /Limit-EventLog/,\n /Measure-(Command|Object)/,\n /Move-Item(Property)?/,\n new RegExp('New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile'\n + '|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)'),\n /Out-(Default|File|GridView|Host|Null|Printer|String)/,\n /Pause/,\n /(Pop|Push)-Location/,\n /Read-Host/,\n /Receive-(Job|PSSession)/,\n /Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/,\n /Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/,\n /Rename-(Computer|Item(Property)?)/,\n /Reset-ComputerMachinePassword/,\n /Resolve-Path/,\n /Restart-(Computer|Service)/,\n /Restore-Computer/,\n /Resume-(Job|Service)/,\n /Save-Help/,\n /Select-(Object|String|Xml)/,\n /Send-MailMessage/,\n new RegExp('Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug' +\n '|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)'),\n /Show-(Command|ControlPanelItem|EventLog)/,\n /Sort-Object/,\n /Split-Path/,\n /Start-(Job|Process|Service|Sleep|Transaction|Transcript)/,\n /Stop-(Computer|Job|Process|Service|Transcript)/,\n /Suspend-(Job|Service)/,\n /TabExpansion2/,\n /Tee-Object/,\n /Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/,\n /Trace-Command/,\n /Unblock-File/,\n /Undo-Transaction/,\n /Unregister-(Event|PSSessionConfiguration)/,\n /Update-(FormatData|Help|List|TypeData)/,\n /Use-Transaction/,\n /Wait-(Event|Job|Process)/,\n /Where-Object/,\n /Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/,\n /cd|help|mkdir|more|oss|prompt/,\n /ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/,\n /echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/,\n /group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/,\n /measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/,\n /rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/,\n /sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/\n], { prefix: '', suffix: '' });\nvar variableBuiltins = buildRegexp([\n /[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/,\n /FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/,\n /MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/,\n /PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/,\n /PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/,\n /WarningPreference|WhatIfPreference/,\n\n /Event|EventArgs|EventSubscriber|Sender/,\n /Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/,\n /true|false|null/\n], { prefix: '\\\\$', suffix: '' });\n\nvar builtins = buildRegexp([symbolBuiltins, namedBuiltins, variableBuiltins], { suffix: notCharacterOrDash });\n\nvar grammar = {\n keyword: keywords,\n number: numbers,\n operator: operators,\n builtin: builtins,\n punctuation: punctuation,\n variable: identifiers\n};\n\n// tokenizers\nfunction tokenBase(stream, state) {\n // Handle Comments\n //var ch = stream.peek();\n\n var parent = state.returnStack[state.returnStack.length - 1];\n if (parent && parent.shouldReturnFrom(state)) {\n state.tokenize = parent.tokenize;\n state.returnStack.pop();\n return state.tokenize(stream, state);\n }\n\n if (stream.eatSpace()) {\n return null;\n }\n\n if (stream.eat('(')) {\n state.bracketNesting += 1;\n return 'punctuation';\n }\n\n if (stream.eat(')')) {\n state.bracketNesting -= 1;\n return 'punctuation';\n }\n\n for (var key in grammar) {\n if (stream.match(grammar[key])) {\n return key;\n }\n }\n\n var ch = stream.next();\n\n // single-quote string\n if (ch === \"'\") {\n return tokenSingleQuoteString(stream, state);\n }\n\n if (ch === '$') {\n return tokenVariable(stream, state);\n }\n\n // double-quote string\n if (ch === '\"') {\n return tokenDoubleQuoteString(stream, state);\n }\n\n if (ch === '<' && stream.eat('#')) {\n state.tokenize = tokenComment;\n return tokenComment(stream, state);\n }\n\n if (ch === '#') {\n stream.skipToEnd();\n return 'comment';\n }\n\n if (ch === '@') {\n var quoteMatch = stream.eat(/[\"']/);\n if (quoteMatch && stream.eol()) {\n state.tokenize = tokenMultiString;\n state.startQuote = quoteMatch[0];\n return tokenMultiString(stream, state);\n } else if (stream.eol()) {\n return 'error';\n } else if (stream.peek().match(/[({]/)) {\n return 'punctuation';\n } else if (stream.peek().match(varNames)) {\n // splatted variable\n return tokenVariable(stream, state);\n }\n }\n return 'error';\n}\n\nfunction tokenSingleQuoteString(stream, state) {\n var ch;\n while ((ch = stream.peek()) != null) {\n stream.next();\n\n if (ch === \"'\" && !stream.eat(\"'\")) {\n state.tokenize = tokenBase;\n return 'string';\n }\n }\n\n return 'error';\n}\n\nfunction tokenDoubleQuoteString(stream, state) {\n var ch;\n while ((ch = stream.peek()) != null) {\n if (ch === '$') {\n state.tokenize = tokenStringInterpolation;\n return 'string';\n }\n\n stream.next();\n if (ch === '`') {\n stream.next();\n continue;\n }\n\n if (ch === '\"' && !stream.eat('\"')) {\n state.tokenize = tokenBase;\n return 'string';\n }\n }\n\n return 'error';\n}\n\nfunction tokenStringInterpolation(stream, state) {\n return tokenInterpolation(stream, state, tokenDoubleQuoteString);\n}\n\nfunction tokenMultiStringReturn(stream, state) {\n state.tokenize = tokenMultiString;\n state.startQuote = '\"'\n return tokenMultiString(stream, state);\n}\n\nfunction tokenHereStringInterpolation(stream, state) {\n return tokenInterpolation(stream, state, tokenMultiStringReturn);\n}\n\nfunction tokenInterpolation(stream, state, parentTokenize) {\n if (stream.match('$(')) {\n var savedBracketNesting = state.bracketNesting;\n state.returnStack.push({\n /*jshint loopfunc:true */\n shouldReturnFrom: function(state) {\n return state.bracketNesting === savedBracketNesting;\n },\n tokenize: parentTokenize\n });\n state.tokenize = tokenBase;\n state.bracketNesting += 1;\n return 'punctuation';\n } else {\n stream.next();\n state.returnStack.push({\n shouldReturnFrom: function() { return true; },\n tokenize: parentTokenize\n });\n state.tokenize = tokenVariable;\n return state.tokenize(stream, state);\n }\n}\n\nfunction tokenComment(stream, state) {\n var maybeEnd = false, ch;\n while ((ch = stream.next()) != null) {\n if (maybeEnd && ch == '>') {\n state.tokenize = tokenBase;\n break;\n }\n maybeEnd = (ch === '#');\n }\n return 'comment';\n}\n\nfunction tokenVariable(stream, state) {\n var ch = stream.peek();\n if (stream.eat('{')) {\n state.tokenize = tokenVariableWithBraces;\n return tokenVariableWithBraces(stream, state);\n } else if (ch != undefined && ch.match(varNames)) {\n stream.eatWhile(varNames);\n state.tokenize = tokenBase;\n return 'variable';\n } else {\n state.tokenize = tokenBase;\n return 'error';\n }\n}\n\nfunction tokenVariableWithBraces(stream, state) {\n var ch;\n while ((ch = stream.next()) != null) {\n if (ch === '}') {\n state.tokenize = tokenBase;\n break;\n }\n }\n return 'variable';\n}\n\nfunction tokenMultiString(stream, state) {\n var quote = state.startQuote;\n if (stream.sol() && stream.match(new RegExp(quote + '@'))) {\n state.tokenize = tokenBase;\n }\n else if (quote === '\"') {\n while (!stream.eol()) {\n var ch = stream.peek();\n if (ch === '$') {\n state.tokenize = tokenHereStringInterpolation;\n return 'string';\n }\n\n stream.next();\n if (ch === '`') {\n stream.next();\n }\n }\n }\n else {\n stream.skipToEnd();\n }\n\n return 'string';\n}\n\nexport const powerShell = {\n name: \"powershell\",\n\n startState: function() {\n return {\n returnStack: [],\n bracketNesting: 0,\n tokenize: tokenBase\n };\n },\n\n token: function(stream, state) {\n return state.tokenize(stream, state);\n },\n\n languageData: {\n commentTokens: {line: \"#\", block: {open: \"<#\", close: \"#>\"}}\n }\n};\n"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,YAAY,UAAU,SAAS;CACtC,UAAU,WAAW,CAAC;CACtB,IAAI,SAAS,QAAQ,WAAW,KAAA,IAAY,QAAQ,SAAS;CAC7D,IAAI,SAAS,QAAQ,WAAW,KAAA,IAAY,QAAQ,SAAS;CAE7D,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KACnC,IAAI,SAAS,cAAc,QACzB,SAAS,KAAK,SAAS,EAAE,CAAC;MAG1B,SAAS,KAAK,SAAS,EAAE,CAAC,QAAQ,0BAA0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["../../../../../../../../../../node_modules/.bun/@codemirror+legacy-modes@6.5.4/node_modules/@codemirror/legacy-modes/mode/powershell.js"],"sourcesContent":["function buildRegexp(patterns, options) {\n options = options || {};\n var prefix = options.prefix !== undefined ? options.prefix : '^';\n var suffix = options.suffix !== undefined ? options.suffix : '\\\\b';\n\n for (var i = 0; i < patterns.length; i++) {\n if (patterns[i] instanceof RegExp) {\n patterns[i] = patterns[i].source;\n }\n else {\n patterns[i] = patterns[i].replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n }\n\n return new RegExp(prefix + '(' + patterns.join('|') + ')' + suffix, 'i');\n}\n\nvar notCharacterOrDash = '(?=[^A-Za-z\\\\d\\\\-_]|$)';\nvar varNames = /[\\w\\-:]/\nvar keywords = buildRegexp([\n /begin|break|catch|continue|data|default|do|dynamicparam/,\n /else|elseif|end|exit|filter|finally|for|foreach|from|function|if|in/,\n /param|process|return|switch|throw|trap|try|until|where|while/\n], { suffix: notCharacterOrDash });\n\nvar punctuation = /[\\[\\]{},;`\\\\\\.]|@[({]/;\nvar wordOperators = buildRegexp([\n 'f',\n /b?not/,\n /[ic]?split/, 'join',\n /is(not)?/, 'as',\n /[ic]?(eq|ne|[gl][te])/,\n /[ic]?(not)?(like|match|contains)/,\n /[ic]?replace/,\n /b?(and|or|xor)/\n], { prefix: '-' });\nvar symbolOperators = /[+\\-*\\/%]=|\\+\\+|--|\\.\\.|[+\\-*&^%:=!|\\/]|<(?!#)|(?!#)>/;\nvar operators = buildRegexp([wordOperators, symbolOperators], { suffix: '' });\n\nvar numbers = /^((0x[\\da-f]+)|((\\d+\\.\\d+|\\d\\.|\\.\\d+|\\d+)(e[\\+\\-]?\\d+)?))[ld]?([kmgtp]b)?/i;\n\nvar identifiers = /^[A-Za-z\\_][A-Za-z\\-\\_\\d]*\\b/;\n\nvar symbolBuiltins = /[A-Z]:|%|\\?/i;\nvar namedBuiltins = buildRegexp([\n /Add-(Computer|Content|History|Member|PSSnapin|Type)/,\n /Checkpoint-Computer/,\n /Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/,\n /Compare-Object/,\n /Complete-Transaction/,\n /Connect-PSSession/,\n /ConvertFrom-(Csv|Json|SecureString|StringData)/,\n /Convert-Path/,\n /ConvertTo-(Csv|Html|Json|SecureString|Xml)/,\n /Copy-Item(Property)?/,\n /Debug-Process/,\n /Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,\n /Disconnect-PSSession/,\n /Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,\n /(Enter|Exit)-PSSession/,\n /Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/,\n /ForEach-Object/,\n /Format-(Custom|List|Table|Wide)/,\n new RegExp('Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential'\n + '|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job'\n + '|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration'\n + '|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)'),\n /Group-Object/,\n /Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/,\n /ImportSystemModules/,\n /Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/,\n /Join-Path/,\n /Limit-EventLog/,\n /Measure-(Command|Object)/,\n /Move-Item(Property)?/,\n new RegExp('New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile'\n + '|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)'),\n /Out-(Default|File|GridView|Host|Null|Printer|String)/,\n /Pause/,\n /(Pop|Push)-Location/,\n /Read-Host/,\n /Receive-(Job|PSSession)/,\n /Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/,\n /Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/,\n /Rename-(Computer|Item(Property)?)/,\n /Reset-ComputerMachinePassword/,\n /Resolve-Path/,\n /Restart-(Computer|Service)/,\n /Restore-Computer/,\n /Resume-(Job|Service)/,\n /Save-Help/,\n /Select-(Object|String|Xml)/,\n /Send-MailMessage/,\n new RegExp('Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug' +\n '|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)'),\n /Show-(Command|ControlPanelItem|EventLog)/,\n /Sort-Object/,\n /Split-Path/,\n /Start-(Job|Process|Service|Sleep|Transaction|Transcript)/,\n /Stop-(Computer|Job|Process|Service|Transcript)/,\n /Suspend-(Job|Service)/,\n /TabExpansion2/,\n /Tee-Object/,\n /Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/,\n /Trace-Command/,\n /Unblock-File/,\n /Undo-Transaction/,\n /Unregister-(Event|PSSessionConfiguration)/,\n /Update-(FormatData|Help|List|TypeData)/,\n /Use-Transaction/,\n /Wait-(Event|Job|Process)/,\n /Where-Object/,\n /Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/,\n /cd|help|mkdir|more|oss|prompt/,\n /ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/,\n /echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/,\n /group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/,\n /measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/,\n /rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/,\n /sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/\n], { prefix: '', suffix: '' });\nvar variableBuiltins = buildRegexp([\n /[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/,\n /FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/,\n /MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/,\n /PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/,\n /PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/,\n /WarningPreference|WhatIfPreference/,\n\n /Event|EventArgs|EventSubscriber|Sender/,\n /Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/,\n /true|false|null/\n], { prefix: '\\\\$', suffix: '' });\n\nvar builtins = buildRegexp([symbolBuiltins, namedBuiltins, variableBuiltins], { suffix: notCharacterOrDash });\n\nvar grammar = {\n keyword: keywords,\n number: numbers,\n operator: operators,\n builtin: builtins,\n punctuation: punctuation,\n variable: identifiers\n};\n\n// tokenizers\nfunction tokenBase(stream, state) {\n // Handle Comments\n //var ch = stream.peek();\n\n var parent = state.returnStack[state.returnStack.length - 1];\n if (parent && parent.shouldReturnFrom(state)) {\n state.tokenize = parent.tokenize;\n state.returnStack.pop();\n return state.tokenize(stream, state);\n }\n\n if (stream.eatSpace()) {\n return null;\n }\n\n if (stream.eat('(')) {\n state.bracketNesting += 1;\n return 'punctuation';\n }\n\n if (stream.eat(')')) {\n state.bracketNesting -= 1;\n return 'punctuation';\n }\n\n for (var key in grammar) {\n if (stream.match(grammar[key])) {\n return key;\n }\n }\n\n var ch = stream.next();\n\n // single-quote string\n if (ch === \"'\") {\n return tokenSingleQuoteString(stream, state);\n }\n\n if (ch === '$') {\n return tokenVariable(stream, state);\n }\n\n // double-quote string\n if (ch === '\"') {\n return tokenDoubleQuoteString(stream, state);\n }\n\n if (ch === '<' && stream.eat('#')) {\n state.tokenize = tokenComment;\n return tokenComment(stream, state);\n }\n\n if (ch === '#') {\n stream.skipToEnd();\n return 'comment';\n }\n\n if (ch === '@') {\n var quoteMatch = stream.eat(/[\"']/);\n if (quoteMatch && stream.eol()) {\n state.tokenize = tokenMultiString;\n state.startQuote = quoteMatch[0];\n return tokenMultiString(stream, state);\n } else if (stream.eol()) {\n return 'error';\n } else if (stream.peek().match(/[({]/)) {\n return 'punctuation';\n } else if (stream.peek().match(varNames)) {\n // splatted variable\n return tokenVariable(stream, state);\n }\n }\n return 'error';\n}\n\nfunction tokenSingleQuoteString(stream, state) {\n var ch;\n while ((ch = stream.peek()) != null) {\n stream.next();\n\n if (ch === \"'\" && !stream.eat(\"'\")) {\n state.tokenize = tokenBase;\n return 'string';\n }\n }\n\n return 'error';\n}\n\nfunction tokenDoubleQuoteString(stream, state) {\n var ch;\n while ((ch = stream.peek()) != null) {\n if (ch === '$') {\n state.tokenize = tokenStringInterpolation;\n return 'string';\n }\n\n stream.next();\n if (ch === '`') {\n stream.next();\n continue;\n }\n\n if (ch === '\"' && !stream.eat('\"')) {\n state.tokenize = tokenBase;\n return 'string';\n }\n }\n\n return 'error';\n}\n\nfunction tokenStringInterpolation(stream, state) {\n return tokenInterpolation(stream, state, tokenDoubleQuoteString);\n}\n\nfunction tokenMultiStringReturn(stream, state) {\n state.tokenize = tokenMultiString;\n state.startQuote = '\"'\n return tokenMultiString(stream, state);\n}\n\nfunction tokenHereStringInterpolation(stream, state) {\n return tokenInterpolation(stream, state, tokenMultiStringReturn);\n}\n\nfunction tokenInterpolation(stream, state, parentTokenize) {\n if (stream.match('$(')) {\n var savedBracketNesting = state.bracketNesting;\n state.returnStack.push({\n /*jshint loopfunc:true */\n shouldReturnFrom: function(state) {\n return state.bracketNesting === savedBracketNesting;\n },\n tokenize: parentTokenize\n });\n state.tokenize = tokenBase;\n state.bracketNesting += 1;\n return 'punctuation';\n } else {\n stream.next();\n state.returnStack.push({\n shouldReturnFrom: function() { return true; },\n tokenize: parentTokenize\n });\n state.tokenize = tokenVariable;\n return state.tokenize(stream, state);\n }\n}\n\nfunction tokenComment(stream, state) {\n var maybeEnd = false, ch;\n while ((ch = stream.next()) != null) {\n if (maybeEnd && ch == '>') {\n state.tokenize = tokenBase;\n break;\n }\n maybeEnd = (ch === '#');\n }\n return 'comment';\n}\n\nfunction tokenVariable(stream, state) {\n var ch = stream.peek();\n if (stream.eat('{')) {\n state.tokenize = tokenVariableWithBraces;\n return tokenVariableWithBraces(stream, state);\n } else if (ch != undefined && ch.match(varNames)) {\n stream.eatWhile(varNames);\n state.tokenize = tokenBase;\n return 'variable';\n } else {\n state.tokenize = tokenBase;\n return 'error';\n }\n}\n\nfunction tokenVariableWithBraces(stream, state) {\n var ch;\n while ((ch = stream.next()) != null) {\n if (ch === '}') {\n state.tokenize = tokenBase;\n break;\n }\n }\n return 'variable';\n}\n\nfunction tokenMultiString(stream, state) {\n var quote = state.startQuote;\n if (stream.sol() && stream.match(new RegExp(quote + '@'))) {\n state.tokenize = tokenBase;\n }\n else if (quote === '\"') {\n while (!stream.eol()) {\n var ch = stream.peek();\n if (ch === '$') {\n state.tokenize = tokenHereStringInterpolation;\n return 'string';\n }\n\n stream.next();\n if (ch === '`') {\n stream.next();\n }\n }\n }\n else {\n stream.skipToEnd();\n }\n\n return 'string';\n}\n\nexport const powerShell = {\n name: \"powershell\",\n\n startState: function() {\n return {\n returnStack: [],\n bracketNesting: 0,\n tokenize: tokenBase\n };\n },\n\n token: function(stream, state) {\n return state.tokenize(stream, state);\n },\n\n languageData: {\n commentTokens: {line: \"#\", block: {open: \"<#\", close: \"#>\"}}\n }\n};\n"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,YAAY,UAAU,SAAS;CACtC,UAAU,WAAW,CAAC;CACtB,IAAI,SAAS,QAAQ,WAAW,KAAA,IAAY,QAAQ,SAAS;CAC7D,IAAI,SAAS,QAAQ,WAAW,KAAA,IAAY,QAAQ,SAAS;CAE7D,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KACnC,IAAI,SAAS,cAAc,QACzB,SAAS,KAAK,SAAS,EAAE,CAAC;MAG1B,SAAS,KAAK,SAAS,EAAE,CAAC,QAAQ,0BAA0B,MAAM;CAItE,OAAO,IAAI,OAAO,SAAS,MAAM,SAAS,KAAK,GAAG,IAAI,MAAM,QAAQ,GAAG;AACzE;AAEA,IAAI,qBAAqB;AACzB,IAAI,WAAW;AAsHf,IAAI,UAAU;CACZ,SAtHa,YAAY;EACzB;EACA;EACA;CACF,GAAG,EAAE,QAAQ,mBAAmB,CAkHd;CAChB,QAAQ;CACR,UAtGc,YAAY,CAXR,YAAY;EAC9B;EACA;EACA;EAAc;EACd;EAAY;EACZ;EACA;EACA;EACA;CACF,GAAG,EAAE,QAAQ,IAAI,CAEwB,GAAG,uDAAe,GAAG,EAAE,QAAQ,GAAG,CAsGvD;CAClB,SANa,YAAY;EAAC;EA1FR,YAAY;GAC9B;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;mBACA,IAAI,OAAO,sdAGgH;GAC3H;GACA;GACA;GACA;GACA;GACA;GACA;GACA;mBACA,IAAI,OAAO,2MAC0F;GACrG;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA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,CAAC,OAAO,IAAI,GAAG;EACpB,IAAI,KAAK,OAAO,KAAK;EACrB,IAAI,OAAO,KAAK;GACd,MAAM,WAAW;GACjB,OAAO;EACT;EAEA,OAAO,KAAK;EACZ,IAAI,OAAO,KACT,OAAO,KAAK;CAEhB;MAGA,OAAO,UAAU;CAGnB,OAAO;AACT;AAEA,MAAa,aAAa;CACxB,MAAM;CAEN,YAAY,WAAW;EACrB,OAAO;GACL,aAAa,CAAC;GACd,gBAAgB;GAChB,UAAU;EACZ;CACF;CAEA,OAAO,SAAS,QAAQ,OAAO;EAC7B,OAAO,MAAM,SAAS,QAAQ,KAAK;CACrC;CAEA,cAAc,EACZ,eAAe;EAAC,MAAM;EAAK,OAAO;GAAC,MAAM;GAAM,OAAO;EAAI;CAAC,EAC7D;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.bun/@codemirror+legacy-modes@6.5.
|
|
1
|
+
//#region ../../node_modules/.bun/@codemirror+legacy-modes@6.5.4/node_modules/@codemirror/legacy-modes/mode/shell.js
|
|
2
2
|
var words = {};
|
|
3
3
|
function define(style, dict) {
|
|
4
4
|
for (var i = 0; i < dict.length; i++) words[dict[i]] = style;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.js","names":[],"sources":["../../../../../../../../../../node_modules/.bun/@codemirror+legacy-modes@6.5.
|
|
1
|
+
{"version":3,"file":"shell.js","names":[],"sources":["../../../../../../../../../../node_modules/.bun/@codemirror+legacy-modes@6.5.4/node_modules/@codemirror/legacy-modes/mode/shell.js"],"sourcesContent":["var words = {};\nfunction define(style, dict) {\n for(var i = 0; i < dict.length; i++) {\n words[dict[i]] = style;\n }\n};\n\nvar commonAtoms = [\"true\", \"false\"];\nvar commonKeywords = [\"if\", \"then\", \"do\", \"else\", \"elif\", \"while\", \"until\", \"for\", \"in\", \"esac\", \"fi\",\n \"fin\", \"fil\", \"done\", \"exit\", \"set\", \"unset\", \"export\", \"function\"];\nvar commonCommands = [\"ab\", \"awk\", \"bash\", \"beep\", \"cat\", \"cc\", \"cd\", \"chown\", \"chmod\", \"chroot\", \"clear\",\n \"cp\", \"curl\", \"cut\", \"diff\", \"echo\", \"find\", \"gawk\", \"gcc\", \"get\", \"git\", \"grep\", \"hg\", \"kill\", \"killall\",\n \"ln\", \"ls\", \"make\", \"mkdir\", \"openssl\", \"mv\", \"nc\", \"nl\", \"node\", \"npm\", \"ping\", \"ps\", \"restart\", \"rm\",\n \"rmdir\", \"sed\", \"service\", \"sh\", \"shopt\", \"shred\", \"source\", \"sort\", \"sleep\", \"ssh\", \"start\", \"stop\",\n \"su\", \"sudo\", \"svn\", \"tee\", \"telnet\", \"top\", \"touch\", \"vi\", \"vim\", \"wall\", \"wc\", \"wget\", \"who\", \"write\",\n \"yes\", \"zsh\"];\n\ndefine('atom', commonAtoms);\ndefine('keyword', commonKeywords);\ndefine('builtin', commonCommands);\n\nfunction tokenBase(stream, state) {\n if (stream.eatSpace()) return null;\n\n var sol = stream.sol();\n var ch = stream.next();\n\n if (ch === '\\\\') {\n stream.next();\n return null;\n }\n if (ch === '\\'' || ch === '\"' || ch === '`') {\n state.tokens.unshift(tokenString(ch, ch === \"`\" ? \"quote\" : \"string\"));\n return tokenize(stream, state);\n }\n if (ch === '#') {\n if (sol && stream.eat('!')) {\n stream.skipToEnd();\n return 'meta'; // 'comment'?\n }\n stream.skipToEnd();\n return 'comment';\n }\n if (ch === '$') {\n state.tokens.unshift(tokenDollar);\n return tokenize(stream, state);\n }\n if (ch === '+' || ch === '=') {\n return 'operator';\n }\n if (ch === '-') {\n stream.eat('-');\n stream.eatWhile(/\\w/);\n return 'attribute';\n }\n if (ch == \"<\") {\n if (stream.match(\"<<\")) return \"operator\"\n var heredoc = stream.match(/^<-?\\s*(?:['\"]([^'\"]*)['\"]|([^'\"\\s]*))/)\n if (heredoc) {\n state.tokens.unshift(tokenHeredoc(heredoc[1] || heredoc[2]))\n return 'string.special'\n }\n }\n if (/\\d/.test(ch)) {\n stream.eatWhile(/\\d/);\n if(stream.eol() || !/\\w/.test(stream.peek())) {\n return 'number';\n }\n }\n stream.eatWhile(/[\\w-]/);\n var cur = stream.current();\n if (stream.peek() === '=' && /\\w+/.test(cur)) return 'def';\n return words.hasOwnProperty(cur) ? words[cur] : null;\n}\n\nfunction tokenString(quote, style) {\n var close = quote == \"(\" ? \")\" : quote == \"{\" ? \"}\" : quote\n return function(stream, state) {\n var next, escaped = false;\n while ((next = stream.next()) != null) {\n if (next === close && !escaped) {\n state.tokens.shift();\n break;\n } else if (next === '$' && !escaped && quote !== \"'\" && stream.peek() != close) {\n escaped = true;\n stream.backUp(1);\n state.tokens.unshift(tokenDollar);\n break;\n } else if (!escaped && quote !== close && next === quote) {\n state.tokens.unshift(tokenString(quote, style))\n return tokenize(stream, state)\n } else if (!escaped && /['\"]/.test(next) && !/['\"]/.test(quote)) {\n state.tokens.unshift(tokenStringStart(next, \"string\"));\n stream.backUp(1);\n break;\n }\n escaped = !escaped && next === '\\\\';\n }\n return style;\n };\n};\n\nfunction tokenStringStart(quote, style) {\n return function(stream, state) {\n state.tokens[0] = tokenString(quote, style)\n stream.next()\n return tokenize(stream, state)\n }\n}\n\nvar tokenDollar = function(stream, state) {\n if (state.tokens.length > 1) stream.eat('$');\n var ch = stream.next()\n if (/['\"({]/.test(ch)) {\n state.tokens[0] = tokenString(ch, ch == \"(\" ? \"quote\" : ch == \"{\" ? \"def\" : \"string\");\n return tokenize(stream, state);\n }\n if (!/\\d/.test(ch)) stream.eatWhile(/\\w/);\n state.tokens.shift();\n return 'def';\n};\n\nfunction tokenHeredoc(delim) {\n return function(stream, state) {\n if (stream.sol() && stream.string == delim) state.tokens.shift()\n stream.skipToEnd()\n return \"string.special\"\n }\n}\n\nfunction tokenize(stream, state) {\n return (state.tokens[0] || tokenBase) (stream, state);\n};\n\nexport const shell = {\n name: \"shell\",\n startState: function() {return {tokens:[]};},\n token: function(stream, state) {\n return tokenize(stream, state);\n },\n languageData: {\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EA,SAAS,SAAS,QAAQ,OAAO;CAC/B,QAAQ,MAAM,OAAO,MAAM,UAAA,CAAY,QAAQ,KAAK;AACtD;AAEA,MAAa,QAAQ;CACnB,MAAM;CACN,YAAY,WAAW;EAAC,OAAO,EAAC,QAAO,CAAC,EAAC;CAAE;CAC3C,OAAO,SAAS,QAAQ,OAAO;EAC7B,OAAO,SAAS,QAAQ,KAAK;CAC/B;CACA,cAAc;EACZ,cAAc,YAAY,OAAO,gBAAgB,cAAc;EAC/D,eAAe,EAAC,UAAU;GAAC;GAAK;GAAK;GAAK;GAAK;GAAK;EAAG,EAAC;EACxD,eAAe,EAAC,MAAM,IAAG;CAC3B;AACF"}
|
package/dist/types/cascade.d.ts
CHANGED
|
@@ -56,8 +56,12 @@ interface CascadeEmits {
|
|
|
56
56
|
/** 触发更新 label 事件 */
|
|
57
57
|
(e: 'update:label', label?: string | string[]): void;
|
|
58
58
|
(e: 'update:modelValue', value?: string | string[]): void;
|
|
59
|
-
(e: 'change', items: Record<string, any>
|
|
60
|
-
|
|
59
|
+
(e: 'change', items: (Record<string, any> & {
|
|
60
|
+
fullLabel?: string;
|
|
61
|
+
})[], fullLabels?: string[]): void;
|
|
62
|
+
(e: 'change', item: (Record<string, any> & {
|
|
63
|
+
fullLabel?: string;
|
|
64
|
+
}) | undefined, fullLabel?: string): void;
|
|
61
65
|
(e: 'clear'): void;
|
|
62
66
|
}
|
|
63
67
|
/** 级联选择器组件暴露的属性和方法(组件内部使用) */
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { DeconstructValue, FormComponentProps } from "@veltra/utils";
|
|
2
2
|
import { Dater } from "@cat-kit/core";
|
|
3
3
|
//#region src/types/date-range-picker.d.ts
|
|
4
|
+
/** 绑定值类型 */
|
|
5
|
+
type DateRangePickerDataType = 'date' | 'timestamp' | 'string';
|
|
6
|
+
/** 日期范围绑定值 */
|
|
7
|
+
type DateRangeValue = [string, string] | [number, number] | [Date, Date];
|
|
4
8
|
/** date-range-picker组件属性 */
|
|
5
9
|
interface DateRangePickerProps extends FormComponentProps {
|
|
6
|
-
modelValue?:
|
|
10
|
+
modelValue?: DateRangeValue;
|
|
7
11
|
/** 占位 */
|
|
8
12
|
placeholder?: [string, string];
|
|
9
13
|
/** 日期类型 */
|
|
@@ -12,6 +16,11 @@ interface DateRangePickerProps extends FormComponentProps {
|
|
|
12
16
|
format?: string;
|
|
13
17
|
/** 日期值格式化, 当没有指定时默认使用format属性,仅当值和显示的内容不一致时才需要使用到该属性 */
|
|
14
18
|
valueFormat?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 绑定值的类型,默认为字符串。
|
|
21
|
+
* 当 dataType 没有指定为字符串时,valueFormat 属性不生效
|
|
22
|
+
*/
|
|
23
|
+
dataType?: DateRangePickerDataType;
|
|
15
24
|
/** 最小可选日期 */
|
|
16
25
|
disabledDate?: (date: Dater, raw: Date) => boolean;
|
|
17
26
|
/** 是否显示清除按钮 */
|
|
@@ -19,12 +28,13 @@ interface DateRangePickerProps extends FormComponentProps {
|
|
|
19
28
|
}
|
|
20
29
|
/** date-range-picker组件定义的事件 */
|
|
21
30
|
interface DateRangePickerEmits {
|
|
22
|
-
(e: 'update:modelValue', value?:
|
|
31
|
+
(e: 'update:modelValue', value?: DateRangeValue): void;
|
|
32
|
+
(e: 'change', dates?: [Date, Date]): void;
|
|
23
33
|
}
|
|
24
34
|
/** date-range-picker组件暴露的属性和方法(组件内部使用) */
|
|
25
35
|
interface _DateRangePickerExposed {}
|
|
26
36
|
/** date-range-picker组件暴露的属性和方法(组件外部使用, 引用的值会被自动解构) */
|
|
27
37
|
type DateRangePickerExposed = DeconstructValue<_DateRangePickerExposed>;
|
|
28
38
|
//#endregion
|
|
29
|
-
export { DateRangePickerEmits, DateRangePickerExposed, DateRangePickerProps, _DateRangePickerExposed };
|
|
39
|
+
export { DateRangePickerDataType, DateRangePickerEmits, DateRangePickerExposed, DateRangePickerProps, DateRangeValue, _DateRangePickerExposed };
|
|
30
40
|
//# sourceMappingURL=date-range-picker.d.ts.map
|