@pisapp/core 7.0.0-dev.20260916-153034

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.
Files changed (51) hide show
  1. package/LICENSE +28 -0
  2. package/THIRD-PARTY-NOTICES.txt +43 -0
  3. package/catalogs.d.ts +7725 -0
  4. package/catalogs.js +3 -0
  5. package/chunks/catalogs-domain-DJxK_B5E.js +9060 -0
  6. package/chunks/catalogs-domain-DJxK_B5E.js.map +1 -0
  7. package/chunks/classifications-domain-DdIJaF1D.js +1980 -0
  8. package/chunks/classifications-domain-DdIJaF1D.js.map +1 -0
  9. package/chunks/icons-shared-B8v5z3BE.js +1387 -0
  10. package/chunks/icons-shared-B8v5z3BE.js.map +1 -0
  11. package/chunks/products-domain-99vJaUyI.js +22587 -0
  12. package/chunks/products-domain-99vJaUyI.js.map +1 -0
  13. package/classifications.d.ts +7725 -0
  14. package/classifications.js +3 -0
  15. package/core.d.ts +7711 -0
  16. package/core.js +7 -0
  17. package/index.d.ts +7992 -0
  18. package/index.js +12 -0
  19. package/migration/API_V1_TO_V2_MIGRATION.md +1424 -0
  20. package/migration/legacy-option-rules.json +93 -0
  21. package/migration/v7.json +4101 -0
  22. package/migration/v7.schema.json +595 -0
  23. package/package.json +68 -0
  24. package/pis-csp.js +97 -0
  25. package/pis-csp.js.map +1 -0
  26. package/pis.js +105 -0
  27. package/pis.js.map +1 -0
  28. package/products.d.ts +7746 -0
  29. package/products.js +2 -0
  30. package/styles/fonts.css +1 -0
  31. package/styles/pis.css +1 -0
  32. package/styles/theme-abb.css +1 -0
  33. package/styles/theme-abb.optimized.css +1 -0
  34. package/styles/theme-cux2-blue-dark.css +1 -0
  35. package/styles/theme-cux2-blue-dark.optimized.css +1 -0
  36. package/styles/theme-cux2-blue-light.css +1 -0
  37. package/styles/theme-cux2-blue-light.optimized.css +1 -0
  38. package/styles/theme-cux2-lilac-dark.css +1 -0
  39. package/styles/theme-cux2-lilac-dark.optimized.css +1 -0
  40. package/styles/theme-cux2-lilac-light.css +1 -0
  41. package/styles/theme-cux2-lilac-light.optimized.css +1 -0
  42. package/styles/theme-cux2-mono-dark.css +1 -0
  43. package/styles/theme-cux2-mono-dark.optimized.css +1 -0
  44. package/styles/theme-cux2-mono-light.css +1 -0
  45. package/styles/theme-cux2-mono-light.optimized.css +1 -0
  46. package/styles/theme-cux2-red-dark.css +1 -0
  47. package/styles/theme-cux2-red-dark.optimized.css +1 -0
  48. package/styles/theme-cux2-red-light.css +1 -0
  49. package/styles/theme-cux2-red-light.optimized.css +1 -0
  50. package/types.d.ts +8893 -0
  51. package/types.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classifications-domain-DdIJaF1D.js","names":[],"sources":["../../src/classifications/api/configuration/DefaultOptions.ts","../../src/classifications/api/runtime/ClassificationFavoritesStore.ts","../../src/classifications/api/runtime/ClassificationSelectionStore.ts","../../src/classifications/api/runtime/normalizeTabOptions.ts","../../src/classifications/api/salesforce/LegacyHelper.ts","../../src/classifications/api/runtime/CommandExecutor.ts","../../src/classifications/api/configuration/application/ClassificationsDataType.ts","../../src/classifications/api/runtime/StoreService.ts","../../src/classifications/api/runtime/HttpService.ts","../../src/classifications/api/runtime/RouteData.ts","../../src/classifications/api/configuration/DefaultRoute.ts","../../src/classifications/api/runtime/Router.ts","../../src/classifications/api/Instance.ts","../../src/classifications/api/Accessor.ts","../../src/classifications/composables/setupComponent.ts","../../src/classifications/components/common/ClassificationsNotifications.vue","../../src/classifications/components/common/ClassificationsNotifications.vue","../../src/classifications/components/browser/ClassificationActions.vue","../../src/classifications/components/browser/ClassificationActions.vue","../../src/classifications/components/browser/ClassificationNote.vue","../../src/classifications/components/browser/ClassificationNote.vue","../../src/classifications/components/browser/ClassificationsSearchForm.vue","../../src/classifications/components/browser/ClassificationsSearchForm.vue","../../src/classifications/components/browser/ClassificationsSelection.vue","../../src/classifications/components/browser/ClassificationsSelection.vue","../../src/classifications/components/common/TransitionHeight.vue","../../src/classifications/components/common/TransitionHeight.vue","../../src/classifications/components/common/ClassificationNode.vue","../../src/classifications/components/common/ClassificationNode.vue","../../src/classifications/components/common/ClassificationRootNode.vue","../../src/classifications/components/common/ClassificationRootNode.vue","../../src/classifications/components/browser/ClassificationsTree.vue","../../src/classifications/components/browser/ClassificationsTree.vue","../../src/classifications/components/browser/ClassificationsTreeTabs.vue","../../src/classifications/components/browser/ClassificationsTreeTabs.vue","../../src/classifications/components/ClassificationsLoadingIndicator.vue","../../src/classifications/components/ClassificationsLoadingIndicator.vue","../../src/classifications/components/ClassificationsLayout.vue","../../src/classifications/components/ClassificationsLayout.vue","../../src/classifications/components/index.ts","../../src/classifications/elements/nativeElements.ts","../../src/classifications/entry.ts"],"sourcesContent":["import { ComponentOptions } from '../runtime/ComponentOptions';\nimport { Options } from '../runtime/Options';\n\nimport {\n ClassificationsBrowserAppSettings,\n ClassificationsBrowserTreeViewEnum,\n} from '@/common/services/swagger';\n\nexport class DefaultOptions implements Options {\n appSettings: ClassificationsBrowserAppSettings = {\n appCode: '',\n langCode: 'en',\n };\n\n styles: { url: string }[] = [];\n\n components: ComponentOptions = {\n browser: {\n common: {\n toolbar: {\n applyVisible: true,\n cancelVisible: true,\n favoritesVisible: true,\n productLineTreeVisible: true,\n visible: true,\n expandFavoritesVisible: false,\n },\n },\n form: {\n visible: true,\n useAutocomplete: true,\n },\n tabs: {\n visible: true,\n items: [\n {\n id: 'favorites',\n type: ClassificationsBrowserTreeViewEnum.FAVORITES,\n itemsExpandable: false,\n countsVisible: true,\n },\n {\n id: 'offering',\n type: ClassificationsBrowserTreeViewEnum.OFFERING,\n countsVisible: true,\n },\n {\n id: 'productLine',\n type: ClassificationsBrowserTreeViewEnum.PRODUCT_LINE,\n countsVisible: true,\n },\n ],\n },\n tree: {\n visible: true,\n scrollHeight: 600,\n mobileScrollHeight: 300,\n },\n selection: {\n visible: true,\n scrollHeight: 600,\n mobileScrollHeight: 300,\n },\n note: {\n visible: true,\n },\n actions: {\n visible: true,\n applyVisible: true,\n cancelVisible: true,\n },\n },\n };\n allowMobileView = true;\n cacheTranslations = true;\n}\n","import { ClassificationFavorites } from './ClassificationFavorites';\nimport { SelectionChanged } from './SelectionChanged';\nimport { Instance } from '.././Instance';\nimport { trackUserAction, type UserActionHost } from '@/common/api/runtime/trackUserAction';\n\nimport { ClassificationsBrowserTreeTypeEnum } from '@/common/services/swagger';\n\nexport class ClassificationFavoritesStore implements ClassificationFavorites {\n constructor(private instance: Instance) {\n if (!instance.store.data.favoriteItems) {\n instance.store.data.favoriteItems = new Map<string, { cid: string }>();\n }\n }\n\n private trackSelection(added: unknown[], removed: unknown[]) {\n trackUserAction(this.instance as unknown as UserActionHost, {\n kind: 'selection',\n action: 'favorites-changed',\n trigger: 'ui',\n args: {\n added: added.length,\n removed: removed.length,\n selected: this.selectedItems.length,\n },\n });\n }\n\n get data() {\n return this.instance.store.data.favoriteItems;\n }\n\n get selectedItems() {\n return this.data ? Array.from(this.data.values()) : [];\n }\n\n get count() {\n return this.selectedItems.length;\n }\n\n select = (\n items: { cid: string; tree: ClassificationsBrowserTreeTypeEnum; selectable: boolean }[],\n ) => {\n if (!this.data || !items?.length) {\n return;\n }\n\n const added: { cid: string; tree: ClassificationsBrowserTreeTypeEnum }[] = [];\n items.forEach((item) => {\n if (item && item.cid && !this.isSelected(item)) {\n this.data?.set(item.cid + '~' + item.tree, item);\n added.push(item);\n }\n });\n if (added.length) {\n this.instance.eventBus.emit('favorites-changed', <SelectionChanged>{\n added: added,\n removed: [],\n selected: this.selectedItems,\n });\n this.trackSelection(added, []);\n }\n };\n\n deselect = (items: { cid: string; tree: ClassificationsBrowserTreeTypeEnum }[]) => {\n if (!this.data || !items?.length) {\n return;\n }\n const removed: { cid: string }[] = [];\n items.forEach((item) => {\n if (item && item.cid && this.isSelected(item)) {\n this.data?.delete(item.cid + '~' + item.tree);\n removed.push(item);\n }\n });\n if (removed.length) {\n this.instance.eventBus.emit('favorites-changed', <SelectionChanged>{\n added: [],\n removed: removed,\n selected: this.selectedItems,\n });\n this.trackSelection([], removed);\n }\n };\n\n toggle = (item: {\n cid: string;\n tree: ClassificationsBrowserTreeTypeEnum;\n selectable: boolean;\n }) => {\n if (this.isSelected(item)) {\n this.deselect([item]);\n } else {\n this.select([item]);\n }\n };\n\n clear = () => {\n if (!this.data) {\n return;\n }\n\n const removed = this.selectedItems;\n\n this.data?.clear();\n if (removed.length) {\n this.instance.eventBus.emit('favorites-changed', <SelectionChanged>{\n added: [],\n removed: removed,\n selected: this.selectedItems,\n });\n this.trackSelection([], removed);\n }\n };\n\n isSelected = (item: { cid: string; tree: ClassificationsBrowserTreeTypeEnum }) => {\n if (!this.data) {\n return false;\n }\n return this.data.has(item.cid + '~' + item.tree);\n };\n}\n","import { ClassificationSelection } from './ClassificationSelection';\nimport { SelectionChanged } from './SelectionChanged';\nimport { Instance } from '.././Instance';\nimport { trackUserAction, type UserActionHost } from '@/common/api/runtime/trackUserAction';\n\nimport { ClassificationsBrowserTreeTypeEnum } from '@/common/services/swagger';\n\nexport class ClassificationSelectionStore implements ClassificationSelection {\n constructor(private instance: Instance) {\n if (!instance.store.data.selectedItems) {\n instance.store.data.selectedItems = new Map<\n string,\n { cid: string; tree?: ClassificationsBrowserTreeTypeEnum }\n >();\n }\n }\n\n private trackSelection(added: unknown[], removed: unknown[]) {\n trackUserAction(this.instance as unknown as UserActionHost, {\n kind: 'selection',\n action: 'selection-changed',\n trigger: 'ui',\n args: {\n added: added.length,\n removed: removed.length,\n selected: this.selectedItems.length,\n },\n });\n }\n\n get data() {\n return this.instance.store.data.selectedItems;\n }\n\n get selectedItems() {\n return this.data ? Array.from(this.data.values()) : [];\n }\n\n get count() {\n return this.selectedItems.length;\n }\n\n select = (\n items: { cid: string; tree?: ClassificationsBrowserTreeTypeEnum; selectable: boolean }[],\n ) => {\n if (!this.data || !items?.length) {\n return;\n }\n\n const added: { cid: string; tree?: ClassificationsBrowserTreeTypeEnum }[] = [];\n items.forEach((item) => {\n if (item && item.cid && !this.isSelected(item)) {\n if (item.selectable) {\n this.data?.set(item.cid + '~' + item.tree, item);\n added.push(item);\n }\n }\n });\n if (added.length) {\n this.instance.eventBus.emit('selection-changed', <SelectionChanged>{\n added: added,\n removed: [],\n selected: this.selectedItems,\n });\n this.trackSelection(added, []);\n }\n };\n\n deselect = (items: { cid: string; tree?: ClassificationsBrowserTreeTypeEnum }[]) => {\n if (!this.data || !items?.length) {\n return;\n }\n const removed: { cid: string }[] = [];\n items.forEach((item) => {\n if (item && item.cid && this.isSelected(item)) {\n this.data?.delete(item.cid + '~' + item.tree);\n removed.push(item);\n }\n });\n if (removed.length) {\n this.instance.eventBus.emit('selection-changed', <SelectionChanged>{\n added: [],\n removed: removed,\n selected: this.selectedItems,\n });\n this.trackSelection([], removed);\n }\n };\n\n toggle = (item: {\n cid: string;\n tree?: ClassificationsBrowserTreeTypeEnum;\n selectable: boolean;\n }) => {\n if (!item.selectable) {\n return;\n }\n if (this.isSelected(item)) {\n this.deselect([item]);\n } else {\n this.select([item]);\n }\n };\n\n clear = () => {\n if (!this.data) {\n return;\n }\n\n const removed = this.selectedItems;\n\n this.data?.clear();\n if (removed.length) {\n this.instance.eventBus.emit('selection-changed', <SelectionChanged>{\n added: [],\n removed: removed,\n selected: this.selectedItems,\n });\n this.trackSelection([], removed);\n }\n };\n\n isSelected = (item: { cid: string; tree?: ClassificationsBrowserTreeTypeEnum }) => {\n if (!this.data) {\n return false;\n }\n return this.data.has(item.cid + '~' + item.tree);\n };\n}\n","import type { Options } from './Options';\nimport type { TabOption } from '../configuration/components/TabOption';\nimport { DefaultOptions } from '../configuration/DefaultOptions';\n\nimport { clonePlain } from '@/common/api/runtime/deepMerge';\n\n/** Effective tab identity referenced by `routeData.tabId`: an explicit `id`, else the view `type`. */\nexport const effectiveTabId = (tab: TabOption): string => tab.id ?? tab.type;\n\n/** Resolve the configured tab selected by a route tab id. */\nexport const findTabById = (tabs: TabOption[], tabId?: string | null): TabOption | undefined =>\n tabId ? tabs.find((tab) => effectiveTabId(tab) === tabId) : undefined;\n\n/** Reject an explicit empty tab override before patchOptions mutates stored options. */\nexport function validateTabOptionsOverride(options: Options): void {\n const items = options.components?.browser?.tabs?.items;\n if (Array.isArray(items) && items.length === 0) {\n throw new Error(\n 'Invalid classifications tabs: components.browser.tabs.items must contain at least one tab. Omit the option or pass null to use the default tabs.',\n );\n }\n}\n\n/**\n * Materializes and validates the configured browser tabs.\n *\n * After `patchOptions` the stored `items[]` is the consumer's array by\n * reference, so normalization replaces it with cloned entries carrying an\n * explicit `id` (`id ?? type`) instead of writing onto consumer objects\n * (template callbacks stay by reference). Validation rejects ambiguous\n * configurations outright: the runtime must never silently normalize a\n * breaking public config.\n */\nexport function normalizeTabOptions(options: Options): void {\n const browser = options.components?.browser;\n if (!browser) return;\n\n const defaultTabs = new DefaultOptions().components.browser!.tabs!;\n if (browser.tabs == null) {\n browser.tabs = clonePlain(defaultTabs);\n } else if (browser.tabs.items == null) {\n browser.tabs.items = clonePlain(defaultTabs.items);\n }\n\n const tabsGroup = browser.tabs;\n if (!tabsGroup.items?.length) {\n throw new Error(\n 'Invalid classifications tabs: components.browser.tabs.items must contain at least one tab. Omit the option or pass null to use the default tabs.',\n );\n }\n const tabs = tabsGroup.items;\n\n const seen = new Set<string>();\n\n const normalized = tabs.map((tab) => {\n if (!tab || typeof tab !== 'object') {\n throw new Error(\n 'Invalid classifications tabs: every items[] entry must be a TabOption object.',\n );\n }\n\n if ('selected' in tab) {\n throw new Error(\n 'Invalid classifications tabs: TabOption.selected was removed - selection is route-driven. Pass the initial tab through init(options, { tabId }) or setRoute({ tabId }) instead.',\n );\n }\n\n const id = tab.id ?? tab.type;\n\n if (typeof id !== 'string' || id.length === 0) {\n throw new Error(\n `Invalid classifications tabs: tab id must be a non-empty string (type \"${tab.type}\").`,\n );\n }\n\n if (seen.has(id)) {\n throw new Error(\n `Invalid classifications tabs: duplicate tab id \"${id}\". Assign a unique TabOption.id to every tab that shares a type.`,\n );\n }\n seen.add(id);\n\n return { ...tab, id };\n });\n\n tabsGroup.items = normalized;\n}\n","import {\n LegacyEventArgs,\n LegacyEventArgsNode,\n LegacyOptions,\n LegacyEventType,\n LegacyTreeCode,\n LegacyEventArgsNodeReference,\n} from './SalesforceLegacy';\nimport { TabOption } from '../configuration/components/TabOption';\nimport { Instance } from '../Instance';\nimport { effectiveTabId } from '../runtime/normalizeTabOptions';\nimport { Options } from '../runtime/Options';\nimport { RouteDataPatch } from '../runtime/RouteData';\n\nimport { deepPatch, clonePlain } from '@/common/api/runtime/deepMerge';\nimport {\n ClassificationsBrowserNode,\n ClassificationsBrowserTreeTypeEnum,\n ClassificationsBrowserTreeViewEnum,\n ClassificationsBrowserNodeReference,\n} from '@/common/services/swagger';\n\nclass LegacyHelper {\n public toLegacyEventArgs(eventType: LegacyEventType, instance: Instance): LegacyEventArgs {\n const args: LegacyEventArgs = {\n type: eventType,\n };\n\n const selected = instance.selection.selectedItems;\n\n if (selected?.length) {\n const nodes: LegacyEventArgsNode[] = [];\n\n selected.forEach((n) => {\n const node = n as ClassificationsBrowserNode;\n nodes.push(this.mapNodesToLegacy(node));\n });\n\n args.nodes = nodes;\n }\n\n const favorites = instance.favorites.selectedItems;\n\n if (favorites?.length) {\n const nodes: LegacyEventArgsNode[] = [];\n\n favorites.forEach((n) => {\n const node = n as ClassificationsBrowserNode;\n nodes.push(this.mapNodesToLegacy(node));\n });\n\n args.favorites = nodes;\n }\n\n if (instance.store.data.invalidFavoriteItems) {\n args.invalidFavorites = instance.store.data.invalidFavoriteItems;\n }\n\n if (instance.store.data.invalidSelectedItems) {\n args.invalidNodes = instance.store.data.invalidSelectedItems;\n }\n\n return clonePlain(args);\n }\n\n private mapNodesToLegacy(node: ClassificationsBrowserNode): LegacyEventArgsNode {\n return <LegacyEventArgsNode>{\n cid: node.cid,\n englishDescription: node.enName,\n languageSpecificDescription: node.name,\n treeCode:\n node.tree == ClassificationsBrowserTreeTypeEnum.OFFERING ? 'OFFERING_TREE' : 'PL_TREE',\n reference: node.reference ? this.mapNodeReferenceToLegacy(node.reference) : null,\n };\n }\n\n private mapNodeReferenceToLegacy(\n nodeReference: ClassificationsBrowserNodeReference,\n ): LegacyEventArgsNodeReference {\n return <LegacyEventArgsNodeReference>{\n classificationCode: nodeReference.classificationCode,\n cid: nodeReference.cid,\n refCid: nodeReference.refCid,\n refPath: nodeReference.refPath,\n };\n }\n\n public applyLegacyOptions(\n legacyOptions: LegacyOptions,\n options?: Options | undefined,\n ): { options: Options; routeData: RouteDataPatch } {\n const tabs: TabOption[] = [];\n\n if (legacyOptions.parameters.favoriteView) {\n tabs.push({\n type: ClassificationsBrowserTreeViewEnum.FAVORITES,\n itemsExpandable: legacyOptions.parameters.favoriteItemsExpandable,\n onlyLeafNodesSelectable: legacyOptions.parameters.onlyLeafNodesSelectable,\n countsVisible: true,\n });\n }\n\n tabs.push({\n type: ClassificationsBrowserTreeViewEnum.OFFERING,\n onlyLeafNodesSelectable: legacyOptions.parameters.onlyLeafNodesSelectable,\n countsVisible: true,\n });\n\n if (legacyOptions.parameters.productLineHierarchy) {\n tabs.push({\n type: ClassificationsBrowserTreeViewEnum.PRODUCT_LINE,\n onlyLeafNodesSelectable: legacyOptions.parameters.onlyLeafNodesSelectable,\n countsVisible: true,\n });\n }\n\n let opt: Options = {\n accessToken: legacyOptions.accessToken,\n selectedNodes: this.parseCids(legacyOptions.parameters.selectedNodes),\n favoriteNodes: this.parseCids(legacyOptions.parameters.favoriteNodes),\n appSettings: {\n appCode: legacyOptions.appCode,\n countryCode: this.getIsoCountryCode(legacyOptions.countryCode),\n langCode: this.getIsoLangCode(legacyOptions.langCode),\n filters: {\n applicationUse: {\n disable: legacyOptions.parameters.disableAppUseCheck,\n exceptionCids: legacyOptions.parameters.disableAppUseCheckException,\n },\n lifeCyclePhases: legacyOptions.parameters.lifeCyclePhases,\n lifeCyclePhaseMode: legacyOptions.parameters.lifeCyclePhaseMode as any,\n },\n productLinePeriod: legacyOptions.parameters.productLinePeriodCode,\n },\n components: {\n browser: {\n common: {\n toolbar: {\n visible: true,\n expandFavoritesVisible: legacyOptions.parameters.expandFavoritesVisible,\n },\n },\n tabs: {\n items: tabs,\n visible: true,\n },\n tree: {\n visible: true,\n scrollHeight: legacyOptions.parameters.scrollHeight,\n mobileScrollHeight: legacyOptions.parameters.mobileScrollHeight,\n },\n selection: {\n visible: true,\n scrollHeight: legacyOptions.parameters.scrollHeight,\n mobileScrollHeight: legacyOptions.parameters.mobileScrollHeight,\n },\n },\n },\n };\n\n if (options) {\n deepPatch(options, opt);\n opt = options;\n }\n\n const routeData: RouteDataPatch = {\n tabId: effectiveTabId(tabs[0]),\n };\n\n return { options: opt, routeData: routeData };\n }\n\n private parseCids(items: string[] | { cid: string; treeCode: LegacyTreeCode }[]) {\n const tr: { cid: string; type?: ClassificationsBrowserTreeTypeEnum }[] = [];\n items.forEach((i) => {\n if (typeof i === 'string') {\n if (i.indexOf('|') > -1) {\n const parts = i.split('|');\n tr.push({ cid: parts[0], type: this.parseTreeType(parts[1]) });\n } else {\n tr.push({ cid: i });\n }\n } else {\n tr.push({ cid: i.cid, type: this.parseTreeType(i.treeCode) });\n }\n });\n\n return tr;\n }\n\n private parseTreeType(sfType: string): ClassificationsBrowserTreeTypeEnum | undefined {\n if (sfType === 'OFFERING_TREE') {\n return ClassificationsBrowserTreeTypeEnum.OFFERING;\n }\n\n if (sfType === 'PL_TREE') {\n return ClassificationsBrowserTreeTypeEnum.PRODUCT_LINE;\n }\n\n return undefined;\n }\n\n private getIsoCountryCode(val?: string) {\n if (!val) {\n return undefined;\n }\n\n if (val.includes('_')) {\n return val.split('_')[1];\n }\n\n return val;\n }\n\n private getIsoLangCode(val?: string) {\n if (!val) {\n return undefined;\n }\n\n if (val.includes('_')) {\n return val.split('_')[0];\n }\n\n return val;\n }\n}\n\nconst legacyHelper = new LegacyHelper();\nexport default legacyHelper;\n","import { Instance } from '../Instance';\nimport type {\n ClassificationsCommand,\n ClassificationsCommandArgs,\n ClassificationsCommandName,\n} from './Commands';\nimport { effectiveTabId } from './normalizeTabOptions';\nimport legacyHelper from '../salesforce/LegacyHelper';\nimport { CommandBase as DomainCommandBase } from '@/common/api/runtime/CommandBase';\nimport { DomainCommandExecutor } from '@/common/api/runtime/DomainCommandExecutor';\nimport { PisNotification } from '@/common/api/runtime/PisNotification';\nimport { ClassificationsBrowserNode } from '@/common/services/swagger';\n\nexport abstract class CommandBase<\n TArgs,\n ReturnType = unknown,\n TName extends ClassificationsCommandName = ClassificationsCommandName,\n> extends DomainCommandBase<TArgs, ReturnType, Instance, TName> {}\n\nexport class SearchCommand extends CommandBase<{\n searchText: string;\n}> {\n readonly name = 'classifications-filter-search';\n\n public execute = async (instance: Instance): Promise<unknown> => {\n return instance.router.setRoute({ searchText: this.args.searchText });\n };\n}\n\nexport class GetAutocompleteCommand extends CommandBase<{ searchText: string }> {\n readonly name = 'classifications-get-autocomplete';\n\n public execute = async (instance: Instance): Promise<unknown> => {\n return await instance.httpService?.autocomplete(this.args.searchText);\n };\n}\n\nexport class ExpandNodeCommand extends CommandBase<{\n item: ClassificationsBrowserNode;\n}> {\n readonly name = 'classifications-node-expand';\n\n public execute = async (instance: Instance): Promise<unknown> => {\n if (this.args.item.leaf) {\n return Promise.resolve(this.args.item);\n }\n\n if (this.args.item.children?.length) {\n this.args.item['_isExpanded'] = true;\n return Promise.resolve(this.args.item);\n }\n\n if (instance.httpService) {\n this.args.item['_isLoading'] = true;\n\n try {\n await instance.httpService.loadChildren(this.args.item);\n this.args.item['_isExpanded'] = true;\n } catch {\n // ignored?\n } finally {\n this.args.item['_isLoading'] = false;\n }\n }\n\n return Promise.resolve(this.args.item);\n };\n}\n\nexport class CollapseNodeCommand extends CommandBase<{\n item: ClassificationsBrowserNode;\n}> {\n readonly name = 'classifications-node-collapse';\n\n public execute = async (): Promise<unknown> => {\n this.args.item['_isExpanded'] = false;\n return Promise.resolve(this.args.item);\n };\n}\n\nexport class CollapseAllCommand extends CommandBase<void> {\n readonly name = 'classifications-collapse-all';\n\n setExpandedFalse = (nodes?: ClassificationsBrowserNode[]) => {\n nodes?.forEach((i) => {\n if (i.children?.length) {\n i['_isExpanded'] = false;\n\n this.setExpandedFalse(i.children);\n }\n });\n };\n\n public execute = async (instance: Instance): Promise<unknown> => {\n const nodes = instance.store.data?.classifications?.items ?? [];\n this.setExpandedFalse(nodes);\n return Promise.resolve(this.args);\n };\n}\n\nexport class ExpandAllCommand extends CommandBase<void> {\n readonly name = 'classifications-expand-all';\n\n setExpandedTrue = (nodes?: ClassificationsBrowserNode[]) => {\n nodes?.forEach((i) => {\n if (i.children?.length) {\n i['_isExpanded'] = true;\n\n this.setExpandedTrue(i.children);\n }\n });\n };\n\n public execute = async (instance: Instance): Promise<unknown> => {\n const nodes = instance.store.data?.classifications?.items ?? [];\n this.setExpandedTrue(nodes);\n return Promise.resolve(this.args);\n };\n}\n\nexport class ShowFavoritesCommand extends CommandBase<void> {\n readonly name = 'classifications-favorites-show';\n\n public execute = async (instance: Instance): Promise<unknown> => {\n const tab = instance.store.options.components?.browser?.tabs?.items?.find(\n (item) => item.type === 'Favorites',\n );\n return instance.router?.setRoute({ tabId: tab ? effectiveTabId(tab) : undefined });\n };\n}\n\nexport class ShowAllCommand extends CommandBase<void> {\n readonly name = 'classifications-show-all';\n\n public execute = async (instance: Instance): Promise<unknown> => {\n return instance.router?.setRoute({ tabId: undefined });\n };\n}\n\nexport class SetTabCommand extends CommandBase<{ tabId: string }> {\n readonly name = 'classifications-set-tab';\n\n public execute = async (instance: Instance): Promise<unknown> => {\n return await instance.router?.setRoute({ tabId: this.args.tabId });\n };\n}\n\nexport class SelectCommand extends CommandBase<{\n item: ClassificationsBrowserNode;\n}> {\n readonly name = 'classifications-item-select';\n\n public execute = async (instance: Instance): Promise<unknown> => {\n instance.selection.select([this.args.item]);\n return Promise.resolve(this.args);\n };\n}\n\nexport class DeselectCommand extends CommandBase<{\n item: ClassificationsBrowserNode;\n}> {\n readonly name = 'classifications-item-deselect';\n\n public execute = async (instance: Instance): Promise<unknown> => {\n instance.selection.deselect([this.args.item]);\n\n return Promise.resolve(this.args);\n };\n}\n\nexport class AddFavoriteCommand extends CommandBase<{\n item: ClassificationsBrowserNode;\n}> {\n readonly name = 'classifications-favorite-select';\n\n public execute = async (instance: Instance): Promise<unknown> => {\n instance.favorites.select([this.args.item]);\n return Promise.resolve(this.args);\n };\n}\n\nexport class RemoveFavoriteCommand extends CommandBase<{\n item: ClassificationsBrowserNode;\n}> {\n readonly name = 'classifications-favorite-deselect';\n\n public execute = async (instance: Instance): Promise<unknown> => {\n instance.favorites.deselect([this.args.item]);\n\n return Promise.resolve(this.args);\n };\n}\n\nexport class ClearSelectionCommand extends CommandBase<void> {\n readonly name = 'classifications-selection-clear';\n\n public execute = async (instance: Instance): Promise<unknown> => {\n instance.selection.clear();\n\n return Promise.resolve(this.args);\n };\n}\n\nexport class ApplyCommand extends CommandBase<void> {\n readonly name = 'classifications-apply';\n\n public execute = async (instance: Instance): Promise<unknown> => {\n const legacyArgs = legacyHelper.toLegacyEventArgs('Apply', instance);\n\n instance.eventBus.emit('classification-selector-closed', legacyArgs);\n\n return Promise.resolve(this.args);\n };\n}\n\nexport class CancelCommand extends CommandBase<void> {\n readonly name = 'classifications-cancel';\n\n public execute = async (instance: Instance): Promise<unknown> => {\n const legacyArgs = legacyHelper.toLegacyEventArgs('Cancel', instance);\n\n instance.eventBus.emit('classification-selector-closed', legacyArgs);\n return Promise.resolve(this.args);\n };\n}\n\nexport class AddNotificationCommand extends CommandBase<PisNotification> {\n readonly name = 'classifications-notification-show';\n readonly excludeFromUserActions = true;\n public execute = async (instance: Instance): Promise<void> => {\n let showDelay = 0;\n let dismissAfter: number | undefined = this.args.dismissAfter;\n\n if (instance.store.notifications.length) {\n instance.store.notifications = [];\n showDelay = 1000;\n }\n\n if (!dismissAfter && dismissAfter !== 0 && this.args.type !== 'danger') {\n dismissAfter = 6000;\n instance.store.notifications = [];\n }\n\n if (dismissAfter && dismissAfter !== 0) {\n setTimeout(() => {\n const index = instance.store.notifications.indexOf(this.args);\n if (index !== -1) {\n instance.store.notifications.splice(index, 1);\n }\n }, this.args.dismissAfter);\n }\n setTimeout(() => {\n return instance.store.notifications.push(this.args);\n }, showDelay);\n };\n}\n\nexport class DeleteNotificationCommand extends CommandBase<PisNotification> {\n readonly name = 'classifications-notification-hide';\n readonly excludeFromUserActions = true;\n public execute = async (instance: Instance): Promise<void> => {\n const index = instance.store.notifications.indexOf(this.args);\n if (index !== -1) {\n instance.store.notifications.splice(index, 1);\n }\n };\n}\n\nexport class CommandExecutor extends DomainCommandExecutor<\n Instance,\n ClassificationsCommand,\n ClassificationsCommandName,\n ClassificationsCommandArgs\n> {\n constructor(instance: Instance) {\n super(instance, CLASSIFICATIONS_COMMANDS, 'classifications');\n }\n}\n\n/**\n * Compile-time command registry — every `ClassificationsCommandName` mapped\n * to its executor class with the name↔key pairing checked\n * (`{ readonly name: K }`). `satisfies` fails the build when a command is\n * missing or misfiled, and `CommandBase`'s `abstract readonly name: TName`\n * types every `name = '…'` literal against the union — together they replace\n * the source-scraping drift test.\n */\nexport const CLASSIFICATIONS_COMMANDS = {\n 'classifications-filter-search': SearchCommand,\n 'classifications-get-autocomplete': GetAutocompleteCommand,\n 'classifications-node-expand': ExpandNodeCommand,\n 'classifications-node-collapse': CollapseNodeCommand,\n 'classifications-collapse-all': CollapseAllCommand,\n 'classifications-expand-all': ExpandAllCommand,\n 'classifications-favorites-show': ShowFavoritesCommand,\n 'classifications-show-all': ShowAllCommand,\n 'classifications-set-tab': SetTabCommand,\n 'classifications-item-select': SelectCommand,\n 'classifications-item-deselect': DeselectCommand,\n 'classifications-favorite-select': AddFavoriteCommand,\n 'classifications-favorite-deselect': RemoveFavoriteCommand,\n 'classifications-selection-clear': ClearSelectionCommand,\n 'classifications-apply': ApplyCommand,\n 'classifications-cancel': CancelCommand,\n 'classifications-notification-show': AddNotificationCommand,\n 'classifications-notification-hide': DeleteNotificationCommand,\n} satisfies {\n [K in ClassificationsCommandName]: new (...args: never[]) => { readonly name: K };\n};\n","/** Internal (non-swagger) data types the classifications domain can register. */\nexport const CLASSIFICATIONS_INTERNAL_DATA_TYPES = {\n Classifications: 'Classifications',\n Translations: 'Translations',\n} as const;\n\nexport type ClassificationsInternalDataType =\n (typeof CLASSIFICATIONS_INTERNAL_DATA_TYPES)[keyof typeof CLASSIFICATIONS_INTERNAL_DATA_TYPES];\n\nexport const ClassificationsDataType = { ...CLASSIFICATIONS_INTERNAL_DATA_TYPES };\nexport type ClassificationsDataType = ClassificationsInternalDataType;\n","import { ClassificationsDataType } from '../configuration/application/ClassificationsDataType';\nimport { Instance } from '../Instance';\nimport { Data } from './Data';\nimport { LoadEvent, ClassificationsLoadEventPayloads } from './LoadEvent';\n\nimport { BaseStoreService } from '@/common/api/runtime/BaseStoreService';\nimport LoggerService from '@/common/services/LoggerService';\n\n/** Typed value a classifications store handler receives for data type K. */\ntype ClassificationsStoreValue<K extends ClassificationsDataType> =\n K extends keyof ClassificationsLoadEventPayloads ? ClassificationsLoadEventPayloads[K] : unknown;\n\ntype ClassificationsStoreDataHandler<K extends ClassificationsDataType> = (\n store: Data,\n value: ClassificationsStoreValue<K>,\n) => void;\n\n/**\n * Exhaustive store dispatch: one handler per `ClassificationsDataType`\n * member; the `satisfies` check makes a missing data type a compile error\n * instead of a silent runtime `default` branch.\n */\nconst STORE_DATA_HANDLERS = {\n [ClassificationsDataType.Classifications]: (store, value) => {\n store.classifications = value;\n },\n // Deliberately not stored — explicit entry keeps the exhaustiveness check\n // meaningful; the passthrough preserves the old default-branch log.\n [ClassificationsDataType.Translations]: (_store, value) => {\n LoggerService.log('Setting store data not handled', {\n type: ClassificationsDataType.Translations,\n data: value,\n });\n },\n} satisfies { [K in ClassificationsDataType]: ClassificationsStoreDataHandler<K> };\n\nexport class StoreService extends BaseStoreService<ClassificationsDataType, LoadEvent, Instance> {\n constructor(instance: Instance) {\n super(instance);\n }\n\n protected dataInterceptor() {\n return this.instance.store?.options.dataInterceptor;\n }\n\n protected dispatchLoadEvent(event: LoadEvent): void {\n this.setStoreData(event);\n }\n\n setStoreData({ type, data }: LoadEvent): void {\n if (!this.instance.store) return;\n\n // One widening cast at the dispatch boundary: LoadEvent.data is the\n // wire-shaped payload; the handler map narrows it per key via satisfies.\n const handler = STORE_DATA_HANDLERS[type] as (store: Data, value: unknown) => void;\n handler(this.instance.store.data, data);\n }\n}\n","import { reactive } from 'vue';\nimport { ClassificationsDataType } from '../configuration/application/ClassificationsDataType';\nimport { Instance } from '../Instance';\nimport { LoadEvent } from './LoadEvent';\nimport { findTabById } from './normalizeTabOptions';\nimport { RouteData } from './RouteData';\nimport { StoreService } from './StoreService';\nimport { TabOption } from '../configuration/components/TabOption';\nimport { PisDomain } from '@/common/api/runtime/BaseInstance';\nimport { createPisClient } from '@/common/api/runtime/createPisClient';\nimport { HttpServiceApi } from '@/common/api/runtime/HttpServiceApi';\nimport type { PisUserActionOutcome } from '@/common/api/runtime/PisUserActionEvent';\nimport { SharedHttpService } from '@/common/api/runtime/SharedHttpService';\nimport {\n listOutcome,\n peekCurrentInteraction,\n trackUserAction,\n} from '@/common/api/runtime/trackUserAction';\nimport {\n ClassificationsBrowserService,\n TranslationItem,\n ClassificationsBrowserAppSettings,\n ClassificationsBrowserNode,\n ClassificationsBrowserValidateNode,\n ClassificationsBrowserAutocompleteResult,\n ClassificationsBrowserTreeViewEnum,\n} from '@/common/services/swagger';\nimport type { Client } from '@/common/services/swagger/client';\n\nexport const SESSION_TRANSLATIONS_KEY = 'pis-classifications-translations';\n\nexport class HttpService extends SharedHttpService implements HttpServiceApi {\n instanceType: PisDomain = 'Classifications';\n private storeService: StoreService;\n protected client: Client;\n constructor(\n protected instance: Instance,\n baseURL?: string,\n accessToken?: string,\n ) {\n super();\n this.client = createPisClient(instance, baseURL, accessToken);\n this.storeService = new StoreService(instance);\n }\n\n private getActiveTab(tabId?: string): TabOption | undefined {\n const tabs = this.instance.store.options.components?.browser?.tabs?.items ?? [];\n return findTabById(tabs, tabId ?? this.instance.router?.routeData.tabId);\n }\n\n public async load(newRoute?: RouteData): Promise<void> {\n if (!this.instance.router) return;\n\n const route = newRoute || this.instance.router.routeData;\n\n return await this.search(route);\n }\n\n public async search(route: RouteData): Promise<void> {\n // capture synchronously at entry — inside the causing command's execute\n // stack — before any await lets a concurrent command interleave\n const { action: origin, source, trigger = 'ui' } = peekCurrentInteraction(this.instance) ?? {};\n this.instance.store.data.isLoadingData = true;\n const activeTab = this.getActiveTab(route.tabId);\n const startedAt = Date.now();\n const track = (outcome: PisUserActionOutcome) =>\n trackUserAction(this.instance, {\n kind: 'search',\n action: 'search',\n trigger,\n origin: origin ?? 'route',\n ...(source ? { source } : {}),\n args: {\n searchText: route.searchText ?? null,\n tabId: route.tabId ?? null,\n },\n outcome,\n });\n try {\n const result = await ClassificationsBrowserService.classificationsBrowserSearch(\n {\n classificationsBrowserSearchQuery: {\n appSettings: this.instance.store?.options\n .appSettings as ClassificationsBrowserAppSettings,\n\n search: {\n treeView: activeTab?.type as ClassificationsBrowserTreeViewEnum | undefined,\n searchText: route.searchText ?? undefined,\n selectedCids: this.instance.selection?.selectedItems?.map((a) => a.cid) || [],\n favoriteCids: this.instance.favorites?.selectedItems?.map((a) => a.cid) || [],\n favoriteItemsExpandable: activeTab?.itemsExpandable,\n onlyLeafNodesSelectable: activeTab?.onlyLeafNodesSelectable,\n categoryInclusionCriteria: activeTab?.categoryInclusionCriteria,\n categoryExclusionCriteria: activeTab?.categoryExclusionCriteria,\n },\n },\n },\n { client: this.client },\n );\n\n this.instance.eventBus.emit('search-loaded', result);\n\n // the browser result carries no totalCount — items-on-page is the\n // closest no-results signal\n track(listOutcome(undefined, result.items, Date.now() - startedAt));\n\n if (result) {\n this.setExpanded(result.items);\n\n this.storeService.setData(ClassificationsDataType.Classifications, result);\n }\n\n this.instance.store.data.isLoadingData = false;\n this.instance.eventBus.emit('search-changed');\n } catch (e) {\n this.instance.store.data.isLoadingData = false;\n track({ status: 'error', durationMs: Date.now() - startedAt });\n throw e;\n }\n }\n\n public async autocomplete(searchText: string): Promise<ClassificationsBrowserAutocompleteResult> {\n // capture synchronously at entry — inside the causing command's execute\n // stack; omitted when called directly (no in-flight command)\n const { action: origin, source, trigger = 'ui' } = peekCurrentInteraction(this.instance) ?? {};\n const routeData = this.instance.router.routeData;\n const activeTab = this.getActiveTab(routeData.tabId);\n const startedAt = Date.now();\n\n let result: ClassificationsBrowserAutocompleteResult;\n try {\n result = await ClassificationsBrowserService.classificationsBrowserAutocomplete(\n {\n classificationsBrowserAutocompleteQuery: {\n appSettings: this.instance.store?.options\n .appSettings as ClassificationsBrowserAppSettings,\n search: {\n searchText,\n treeView: activeTab?.type as ClassificationsBrowserTreeViewEnum | undefined,\n selectedCids: this.instance.selection?.selectedItems?.map((a) => a.cid) || [],\n favoriteCids: this.instance.favorites?.selectedItems?.map((a) => a.cid) || [],\n favoriteItemsExpandable: activeTab?.itemsExpandable,\n onlyLeafNodesSelectable: activeTab?.onlyLeafNodesSelectable,\n categoryInclusionCriteria: activeTab?.categoryInclusionCriteria,\n categoryExclusionCriteria: activeTab?.categoryExclusionCriteria,\n },\n },\n },\n { client: this.client },\n );\n } catch (error) {\n trackUserAction(this.instance, {\n kind: 'autocomplete',\n action: 'autocomplete',\n trigger,\n ...(origin ? { origin } : {}),\n ...(source ? { source } : {}),\n args: { searchText },\n outcome: { status: 'error', durationMs: Date.now() - startedAt },\n });\n throw error;\n }\n\n trackUserAction(this.instance, {\n kind: 'autocomplete',\n action: 'autocomplete',\n trigger,\n ...(origin ? { origin } : {}),\n ...(source ? { source } : {}),\n args: { searchText },\n outcome: listOutcome(result.totalCount, result.matches, Date.now() - startedAt),\n });\n\n return result;\n }\n\n public async loadChildren(item: ClassificationsBrowserNode) {\n const routeData = this.instance.router.routeData;\n const activeTab = this.getActiveTab(routeData.tabId);\n const result = await ClassificationsBrowserService.classificationsBrowserChildren(\n {\n classificationsBrowserChildrenQuery: {\n appSettings: this.instance.store?.options\n .appSettings as ClassificationsBrowserAppSettings,\n search: {\n treeType: item.tree,\n cid: item.cid,\n treeView: activeTab?.type as ClassificationsBrowserTreeViewEnum | undefined,\n selectedCids: this.instance.selection?.selectedItems?.map((a) => a.cid) || [],\n favoriteCids: this.instance.favorites?.selectedItems?.map((a) => a.cid) || [],\n favoriteItemsExpandable: activeTab?.itemsExpandable,\n onlyLeafNodesSelectable: activeTab?.onlyLeafNodesSelectable,\n categoryInclusionCriteria: activeTab?.categoryInclusionCriteria,\n categoryExclusionCriteria: activeTab?.categoryExclusionCriteria,\n },\n },\n },\n { client: this.client },\n );\n\n if (result?.items) {\n item.children = result.items;\n\n // we want interceptor to fire with updated tree\n this.storeService.setData(\n ClassificationsDataType.Classifications,\n this.instance.store.data.classifications,\n );\n }\n\n return result.items;\n }\n\n setExpanded = (nodes?: ClassificationsBrowserNode[]) => {\n nodes?.forEach((i) => {\n if (i.children?.length) {\n i['_isExpanded'] = true;\n\n this.setExpanded(i.children);\n }\n });\n };\n\n public async validate(nodes: ClassificationsBrowserValidateNode[]) {\n const result = await ClassificationsBrowserService.classificationsBrowserValidate(\n {\n classificationsBrowserValidateQuery: {\n appSettings: this.instance.store?.options\n .appSettings as ClassificationsBrowserAppSettings,\n search: {\n nodes: nodes,\n },\n },\n },\n { client: this.client },\n );\n\n return result;\n }\n\n public async loadTranslations(): Promise<TranslationItem[] | undefined> {\n const data = await this.fetchTranslations(SESSION_TRANSLATIONS_KEY);\n\n const interceptFunc = this.instance.store?.options.dataInterceptor;\n\n const loadEvent: LoadEvent = {\n type: ClassificationsDataType.Translations,\n data: reactive({ items: data }),\n instance: this.instance,\n };\n\n if (interceptFunc) {\n const inc = await interceptFunc(loadEvent);\n return inc.type === 'Translations' ? inc.data?.items : data;\n } else {\n return data;\n }\n }\n}\n","import type { RoutePatch } from '@/common/api/runtime/RoutePatch';\n\n/**\n * Patch shape for route-writing call sites: `init(options, route)`,\n * `setRoute(patch)`, and route-writing commands. Every member is optional;\n * passing `null`/`undefined` for a member resets that field to its default\n * route value.\n */\nexport type RouteDataPatch = RoutePatch<RouteData>;\n\n/** Top-level route keys; feeds the dev-mode unknown-route-key warning. */\nexport const ROUTE_DATA_TOP_LEVEL_KEYS = [\n 'searchText',\n 'tabId',\n] as const satisfies readonly (keyof RouteData)[];\n\n/**\n * Complete route-data READ shape. The Router merges patches over the current\n * route and fills every empty (`null`/`undefined`) value from the default\n * route before the route reaches `httpService.load`, history, `routeData`,\n * or `route-changed`. Write sites pass `RouteDataPatch` instead.\n */\nexport interface RouteData {\n /** Text filter applied to the classification tree. No default: an empty\n * value stays empty. */\n searchText?: string;\n /** Route reference to the active `TabOption.id` (which defaults to `type`).\n * Empty patch values reset to the first visible configured tab. */\n tabId: string;\n}\n","import { RouteData } from '../runtime/RouteData';\n\n/**\n * Pre-init fallback matching the first tab in DefaultOptions. Once options are\n * available, Router.resolveDefaultRoute uses the first visible configured tab.\n */\nexport const defaultRoute: RouteData = {\n tabId: 'favorites',\n};\n","import { reactive } from 'vue';\n\nimport { Instance } from '../Instance';\nimport { effectiveTabId, findTabById } from './normalizeTabOptions';\nimport { ROUTE_DATA_TOP_LEVEL_KEYS, RouteData, RouteDataPatch } from './RouteData';\nimport type { TabOption } from '../configuration/components/TabOption';\nimport { defaultRoute } from '../configuration/DefaultRoute';\n\nimport { clonePlain, deepEqual, mergeRouteData } from '@/common/api/runtime/deepMerge';\nimport { fillRouteDefaults } from '@/common/api/runtime/fillRouteDefaults';\nimport { warnUnknownRouteKeys } from '@/common/api/runtime/warnUnknownRouteKeys';\n\ndeclare const __PIS_DEV__: boolean | undefined;\n\nconst warnedHeals = new Set<string>();\n\nexport class Router {\n routeData = reactive<RouteData>(clonePlain(defaultRoute));\n history: RouteData[] = [];\n\n constructor(private instance: Instance) {}\n\n private configuredTabs(): TabOption[] {\n return this.instance.store.options?.components?.browser?.tabs?.items ?? [];\n }\n\n /**\n * Effective default route for the current options: the first visible tab\n * in `items[]` order (the first tab when none is visible), or the static\n * zero-tabs fallback when no tabs are configured. Selection is\n * route-driven - no option marks a tab as initially selected.\n */\n public resolveDefaultRoute(): RouteData {\n const tabs = this.configuredTabs();\n if (!tabs.length) return clonePlain(defaultRoute);\n\n const visible = tabs.filter((tab) => tab.visible !== false);\n const tab = visible[0] ?? tabs[0];\n\n return { tabId: effectiveTabId(tab) };\n }\n\n /**\n * Keeps `tabId` pointing at a configured tab. Missing or unknown ids heal\n * to the resolved default, with a dev-only warning for unknown values.\n */\n private reconcileTabs(route: RouteData): void {\n const tabs = this.configuredTabs();\n if (!tabs.length) {\n route.tabId = this.resolveDefaultRoute().tabId;\n return;\n }\n if (findTabById(tabs, route.tabId)) return;\n\n const resolved = this.resolveDefaultRoute();\n\n if (route.tabId != null && typeof __PIS_DEV__ === 'boolean' && __PIS_DEV__) {\n const key = route.tabId;\n if (!warnedHeals.has(key)) {\n warnedHeals.add(key);\n console.warn(\n `[PIS classifications] Route tabId \"${route.tabId}\" matches no configured tab; healing to \"${resolved.tabId}\". The route must resolve to a configured tab.`,\n );\n }\n }\n\n route.tabId = resolved.tabId;\n }\n\n /**\n * @param routeSettings\n * @param passive flag that disables the API call. Useful when changing views.\n */\n public async setRoute(routeSettings?: RouteDataPatch, passive = false): Promise<void> {\n const newRoute = clonePlain(this.routeData);\n\n if (routeSettings) {\n warnUnknownRouteKeys('classifications', routeSettings, ROUTE_DATA_TOP_LEVEL_KEYS);\n mergeRouteData(newRoute, routeSettings);\n }\n\n // First route before any commit: the stored route is still the pristine\n // static clone, not a host selection - the resolved tab default applies\n // unless the patch itself picks a tab.\n if (this.history.length === 0 && routeSettings?.tabId == null) {\n mergeRouteData(newRoute, { tabId: null });\n }\n\n this.reconcileTabs(newRoute);\n // Empty (`null`/`undefined`) values heal back to the resolved default\n // route so every reader downstream (load, history, route-changed) sees a\n // complete route.\n fillRouteDefaults(newRoute, this.resolveDefaultRoute());\n\n // A route whose merged result is identical to the current route is a no-op:\n // no data load, no history entry, no route-changed event. The first route\n // (empty history, before the first commit) always proceeds so init() loads.\n if (this.history.length > 0 && deepEqual(newRoute, clonePlain(this.routeData))) {\n return;\n }\n\n if (this.instance.store.data.isInitialized && this.instance.httpService) {\n if (!passive) {\n await this.instance.httpService.load(newRoute);\n }\n this.commitRoute(newRoute);\n return Promise.resolve();\n } else {\n this.commitRoute(newRoute);\n return Promise.resolve();\n }\n }\n\n /**\n * Re-fetches the current route directly: no identical-route dedupe, no\n * history entry, no route-changed event (the shared reload contract -\n * reload is a refresh, not navigation).\n */\n public async reload(): Promise<void> {\n await this.instance.httpService?.load(this.routeData);\n }\n\n private commitRoute(routeData: RouteData) {\n this.history.push({ ...routeData });\n mergeRouteData(this.routeData, routeData);\n\n this.instance.eventBus.emit('route-changed', clonePlain(this.routeData));\n }\n\n public async back(steps = 1): Promise<void> {\n const newIndex = this.history.length - steps - 1;\n const newRoute = this.history[newIndex];\n\n if (newRoute) {\n this.history.splice(newIndex);\n }\n\n this.setRoute(newRoute ?? this.resolveDefaultRoute());\n }\n}\n","import mitt from 'mitt';\nimport { reactive, watch } from 'vue';\n\nimport { Accessor } from './Accessor';\nimport { ClassificationsInstance } from './ClassificationsInstance';\nimport { ClassificationsDataType } from './configuration/application/ClassificationsDataType';\nimport { DefaultOptions } from './configuration/DefaultOptions';\nimport type {\n ClassificationsEventMap,\n ClassificationsEventName,\n} from './configuration/events/ClassificationsEvents';\nimport { ClassificationFavoritesStore } from './runtime/ClassificationFavoritesStore';\nimport { ClassificationSelectionStore } from './runtime/ClassificationSelectionStore';\nimport { CommandExecutor, ApplyCommand, CancelCommand } from './runtime/CommandExecutor';\nimport type { ClassificationsCommandArgs, ClassificationsCommandName } from './runtime/Commands';\nimport { HttpService } from './runtime/HttpService';\nimport { normalizeTabOptions, validateTabOptionsOverride } from './runtime/normalizeTabOptions';\nimport { Options } from './runtime/Options';\nimport { RouteData, RouteDataPatch } from './runtime/RouteData';\nimport { Router } from './runtime/Router';\nimport { Store } from './runtime/Store';\nimport legacyHelper from './salesforce/LegacyHelper';\nimport { LegacyOptions } from './salesforce/SalesforceLegacy';\nimport { PisDomain } from '../../common/api/runtime/BaseInstance';\nimport { Command } from '../../common/api/runtime/Command';\nimport { createPatchedDefaultOptions, patchOptions } from '../../common/api/runtime/patchOptions';\n\nimport { createExternalBus } from '@/common/api/runtime/createExternalBus';\nimport { clonePlain } from '@/common/api/runtime/deepMerge';\nimport { reportRuntimeError } from '@/common/api/runtime/reportRuntimeError';\nimport { emitHostUserAction, type PisHostUserAction } from '@/common/api/runtime/trackUserAction';\nimport { Translations } from '@/common/api/runtime/Translations';\nimport { validateBaseUrl } from '@/common/api/runtime/validateBaseUrl';\nimport {\n validateV7ComponentOptions,\n validateV7TopLevelOptions,\n} from '@/common/api/runtime/validateV7ComponentOptions';\nimport LoggerService from '@/common/services/LoggerService';\nimport {\n ClassificationsBrowserNode,\n ClassificationsBrowserTreeTypeEnum,\n ClassificationsBrowserTreeViewEnum,\n} from '@/common/services/swagger';\nimport type { ClassificationsComponentName as ComponentName } from '@/generated/component-names';\n\n/**\n * Everything the classifications event bus can carry: the public event registry\n * (`ClassificationsEventMap`) plus the runtime-private `internal:*` channel. Typing the bus\n * makes emit sites compile-checked — an undeclared event name or a mismatched\n * payload fails the build instead of reaching consumers undocumented.\n */\ntype ClassificationsBusEvents = {\n [K in keyof ClassificationsEventMap]: ClassificationsEventMap[K];\n} & Record<`internal:${string}`, unknown> & { [key: symbol]: unknown };\n\nexport class Instance implements ClassificationsInstance {\n public instanceType: PisDomain = 'Classifications';\n public props: { [key: string]: any } = {};\n public httpService?: HttpService;\n public store: Store = reactive({\n notifications: [],\n data: { isInitialized: false, actions: { current: null, data: null } },\n options: { isInitialized: false },\n });\n public router = new Router(this);\n public translations = new Translations(this);\n public commandExecutor = new CommandExecutor(this);\n public logger = LoggerService;\n\n public registeredComponents = reactive(new Set<ComponentName>());\n public dataTypesRequired = reactive(new Set<ClassificationsDataType>());\n\n public eventBus = mitt<ClassificationsBusEvents>();\n private eventBusExt = createExternalBus(this.eventBus);\n\n public selection = new ClassificationSelectionStore(this);\n public favorites = new ClassificationFavoritesStore(this);\n\n constructor(\n public id: string,\n public accessor: Accessor,\n ) {}\n\n public isInitialized(): boolean | undefined {\n return this.store.data.isInitialized;\n }\n\n public async reload(): Promise<void> {\n await this.translations.load();\n await this.router.reload();\n }\n\n public setRoute(routeData: RouteDataPatch): void {\n this.router.setRoute(routeData);\n }\n\n public async init(optionsOverrides: Options, routeData?: RouteDataPatch): Promise<void> {\n if (this.store.data.isInitialized) {\n throw new Error(`Instance \"${this.id}\" is already initialized`);\n }\n\n validateV7ComponentOptions('classifications', optionsOverrides);\n validateV7TopLevelOptions(optionsOverrides);\n validateTabOptionsOverride(optionsOverrides);\n\n const baseUrl = validateBaseUrl(optionsOverrides?.baseUrl);\n\n const currentOptions: Options = this.store.options.isInitialized\n ? this.store.options\n : new DefaultOptions();\n\n patchOptions(currentOptions, optionsOverrides);\n normalizeTabOptions(currentOptions);\n\n this.store.options = currentOptions;\n this.store.options.isInitialized = true;\n\n this.httpService = new HttpService(this, baseUrl, currentOptions.accessToken);\n this.store.data.isInitialized = true;\n try {\n await this.translations.load();\n await this.validateParameters();\n this.router.setRoute(routeData);\n return Promise.resolve();\n } catch (cause) {\n this.store.data.isInitialized = false;\n // No component tree exists yet, so there is no toast to render: report\n // through errorInterceptor (telemetry) and the console, and reject with\n // a real Error so host .catch handlers and trackers see a stack trace.\n const event = reportRuntimeError(currentOptions.errorInterceptor, {\n type: 'InitError',\n message: 'PIS initialization error.',\n isHandled: false,\n });\n console.error('[PIS] initialization error', event, cause);\n return Promise.reject(new Error('PIS initialization error', { cause }));\n }\n }\n\n public update(optionsOverrides: Options, routeData?: RouteDataPatch): void {\n validateV7ComponentOptions('classifications', optionsOverrides);\n validateV7TopLevelOptions(optionsOverrides);\n validateTabOptionsOverride(optionsOverrides);\n\n const currentOptions: Options = this.store.options.isInitialized\n ? this.store.options\n : new DefaultOptions();\n\n patchOptions(currentOptions, optionsOverrides);\n normalizeTabOptions(currentOptions);\n\n this.store.options = currentOptions;\n this.store.options.isInitialized = true;\n\n // Reconciles the route against the new tabs once a route exists: a swap\n // that removed the active tab heals to the resolved default; an unchanged\n // route is a deduped no-op (no load, no route-changed).\n if (routeData || this.router.history.length > 0) {\n this.router.setRoute(routeData ?? {});\n }\n }\n\n public on<K extends ClassificationsEventName>(\n name: K,\n handler: (data: ClassificationsEventMap[K]) => void,\n ): void;\n public on(name: '*', handler: (type: string, data: unknown) => void): void;\n public on(name: string, handler: (data: unknown) => void): void;\n public on(\n name: string,\n handler: ((data: unknown) => void) | ((type: string, data: unknown) => void),\n ): void {\n this.eventBusExt.on(name as never, handler as never);\n }\n\n public onReady(callback: () => any): void {\n const unwatch = watch(\n () => this.store.data,\n ({ isInitialized }) => {\n if (isInitialized) {\n callback();\n unwatch();\n }\n },\n { deep: true },\n );\n }\n\n public off(): void;\n public off(\n name: string,\n handler?: ((data: unknown) => void) | ((type: string, data: unknown) => void),\n ): void;\n public off(\n name?: string,\n handler?: ((data: unknown) => void) | ((type: string, data: unknown) => void),\n ): void {\n if (name) {\n this.eventBusExt.off(name as never, handler as never);\n } else {\n this.eventBusExt.all.clear();\n // this.intercept = undefined;\n }\n }\n\n public registerComponent(componentName: ComponentName): void {\n this.registeredComponents.add(componentName);\n }\n\n /**\n * Registers data types that must be fetched from the Web API for this instance.\n */\n public registerRequiredDataTypes(\n dataTypes: (ClassificationsDataType | string)[] | readonly (ClassificationsDataType | string)[],\n ): void {\n dataTypes.forEach((dataType) =>\n this.dataTypesRequired.add(dataType as ClassificationsDataType),\n );\n }\n\n public getRegisteredSearchDataTypes(): string[] {\n // if (this.dataTypesRequired && this.dataTypesRequired.size) {\n // const searchDataTypes = Object.values(CatalogProductSearchDataTypeEnum);\n // const arr = Array.from(this.dataTypesRequired).filter((dataType) =>\n // searchDataTypes.includes(dataType as CatalogProductSearchDataTypeEnum),\n // ) as CatalogProductSearchDataTypeEnum[];\n // return _uniq(arr);\n // } else {\n // return [];\n // }\n\n return [];\n }\n\n public destroy(): void {\n return this.accessor.destroyInstance(this.id);\n }\n\n public execute<ReturnType = unknown>(\n command: Command<Instance, ReturnType>,\n trigger?: 'ui' | 'api',\n ): Promise<ReturnType | undefined> {\n return this.commandExecutor.execute<ReturnType>(command, trigger);\n }\n\n public executeCommand<N extends ClassificationsCommandName>(\n name: N,\n ...args: ClassificationsCommandArgs[N] extends void ? [] : [args: ClassificationsCommandArgs[N]]\n ): Promise<unknown> {\n return this.commandExecutor.executeCommand(name, ...args);\n }\n\n public trackUserAction(action: PisHostUserAction): void {\n emitHostUserAction(this, action);\n }\n\n public getDefaultOptions(): Options {\n const options = createPatchedDefaultOptions(new DefaultOptions());\n normalizeTabOptions(options);\n return options;\n }\n\n public getDefaultRouteData(): RouteData {\n return this.router.resolveDefaultRoute();\n }\n\n public getOptions(): Options {\n return this.store.options;\n }\n\n public getRouteData(): RouteData {\n return clonePlain(this.router.routeData);\n }\n\n public applyLegacyOptions(\n legacyOptions: LegacyOptions,\n options?: Options | undefined,\n ): { options: Options; routeData: RouteDataPatch } {\n return legacyHelper.applyLegacyOptions(legacyOptions, options);\n }\n\n public async apply() {\n try {\n await this.execute(new ApplyCommand(), 'api');\n } catch {\n // ignored\n }\n }\n\n public async cancel() {\n try {\n await this.execute(new CancelCommand(), 'api');\n } catch {\n // ignored\n }\n }\n\n private async validateParameters() {\n if (!this.httpService) {\n return;\n }\n\n if (this.store.options.selectedNodes || this.store.options.favoriteNodes) {\n const toValidate = [\n ...(this.store.options.selectedNodes ?? []),\n ...(this.store.options.favoriteNodes ?? []),\n ];\n\n if (toValidate.length) {\n const result = await this.httpService.validate(toValidate);\n\n const validSelection: ClassificationsBrowserNode[] = [];\n const invalidSelection: {\n cid: string;\n type?: ClassificationsBrowserTreeTypeEnum | undefined;\n }[] = [];\n const validFavorites: ClassificationsBrowserNode[] = [];\n const invalidFavorites: {\n cid: string;\n type?: ClassificationsBrowserTreeTypeEnum | undefined;\n }[] = [];\n\n if (this.store.options.selectedNodes?.length) {\n this.store.options.selectedNodes.forEach((n) => {\n if (n.type) {\n const r = result.validNodes?.find((a) => a.cid === n.cid && a.tree === n.type);\n if (r) {\n validSelection.push(r);\n } else {\n invalidSelection.push(n);\n }\n } else {\n let offeringNode: ClassificationsBrowserNode | undefined = undefined;\n let productLineNode: ClassificationsBrowserNode | undefined = undefined;\n if (\n (this.store.options.components?.browser?.tabs?.items ?? []).some(\n (tab) => tab.type === ClassificationsBrowserTreeViewEnum.OFFERING,\n )\n ) {\n offeringNode = result.validNodes?.find(\n (a) => a.cid === n.cid && a.tree === ClassificationsBrowserTreeTypeEnum.OFFERING,\n );\n if (offeringNode) {\n validSelection.push(offeringNode);\n }\n }\n\n if (\n (this.store.options.components?.browser?.tabs?.items ?? []).some(\n (tab) => tab.type === ClassificationsBrowserTreeViewEnum.PRODUCT_LINE,\n )\n ) {\n productLineNode = result.validNodes?.find(\n (a) =>\n a.cid === n.cid && a.tree === ClassificationsBrowserTreeTypeEnum.PRODUCT_LINE,\n );\n if (productLineNode) {\n validSelection.push(productLineNode);\n }\n }\n\n if (offeringNode === undefined && productLineNode === undefined) {\n invalidSelection.push(n);\n }\n }\n });\n }\n\n if (this.store.options.favoriteNodes?.length) {\n this.store.options.favoriteNodes.forEach((n) => {\n if (n.type) {\n const r = result.validNodes?.find((a) => a.cid === n.cid && a.tree === n.type);\n if (r) {\n validFavorites.push(r);\n } else {\n invalidFavorites.push(n);\n }\n } else {\n let offeringNode: ClassificationsBrowserNode | undefined = undefined;\n let productLineNode: ClassificationsBrowserNode | undefined = undefined;\n if (\n (this.store.options.components?.browser?.tabs?.items ?? []).some(\n (tab) => tab.type === ClassificationsBrowserTreeViewEnum.OFFERING,\n )\n ) {\n offeringNode = result.validNodes?.find(\n (a) => a.cid === n.cid && a.tree === ClassificationsBrowserTreeTypeEnum.OFFERING,\n );\n if (offeringNode) {\n validFavorites.push(offeringNode);\n }\n }\n\n if (\n (this.store.options.components?.browser?.tabs?.items ?? []).some(\n (tab) => tab.type === ClassificationsBrowserTreeViewEnum.PRODUCT_LINE,\n )\n ) {\n productLineNode = result.validNodes?.find(\n (a) =>\n a.cid === n.cid && a.tree === ClassificationsBrowserTreeTypeEnum.PRODUCT_LINE,\n );\n if (productLineNode) {\n validFavorites.push(productLineNode);\n }\n }\n\n if (offeringNode === undefined && productLineNode === undefined) {\n invalidFavorites.push(n);\n }\n }\n });\n }\n\n if (validSelection.length) {\n this.selection.select(validSelection);\n }\n\n if (validFavorites.length) {\n this.favorites.select(validFavorites);\n }\n\n if (invalidSelection.length) {\n this.eventBus.emit('selection-validated', {\n invalid: clonePlain(invalidSelection),\n valid: clonePlain(validSelection),\n });\n this.store.data.invalidSelectedItems = invalidSelection;\n }\n\n if (invalidFavorites.length) {\n this.eventBus.emit('favorites-validated', {\n invalid: clonePlain(invalidFavorites),\n valid: clonePlain(validFavorites),\n });\n this.store.data.invalidFavoriteItems = invalidFavorites;\n }\n }\n }\n }\n}\n","import { reactive } from 'vue';\n\nimport { ClassificationsAccessor } from './ClassificationsAccessor';\nimport { ClassificationsInstance } from './ClassificationsInstance';\nimport { Instance } from './Instance';\n\nexport class Accessor implements ClassificationsAccessor {\n instances = reactive<Map<string, Instance>>(new Map());\n\n public destroyInstance(id: string): void {\n // Symmetric with Products: destroy clears every instance.on()\n // subscription before deregistering.\n try {\n this.instances.get(id)?.off();\n } catch {\n //\n }\n\n this.instances.delete(id);\n }\n\n public getInstance(): ClassificationsInstance | undefined;\n public getInstance(id: string): ClassificationsInstance;\n /** Possibly-undefined ids (e.g. optional component props) resolve like the no-arg form. */\n public getInstance(id: string | undefined): ClassificationsInstance | undefined;\n public getInstance(id?: string): ClassificationsInstance | undefined {\n const size = this.instances.size;\n\n if (id !== undefined) {\n if (this.instances.has(id)) {\n return this.instances.get(id);\n } else {\n const instance = new Instance(id, this);\n this.instances.set(id, instance);\n return instance;\n }\n } else if (size === 1) {\n return this.instances.values().next().value;\n } else if (size > 1) {\n throw new Error('[PIS Classifications] Cannot pick default instance if more than one exists');\n }\n\n return undefined;\n }\n\n public setAccessTokenInAllInstances(token: string) {\n this.instances.forEach((inst: any) => {\n inst.getOptions().accessToken = token;\n });\n }\n}\n","import { Ref, ComputedRef } from 'vue';\n\nimport { ClassificationsDataType } from '@/classifications/api/configuration/application/ClassificationsDataType';\nimport { Instance } from '@/classifications/api/Instance';\nimport { RouteData } from '@/classifications/api/runtime/RouteData';\nimport { Store } from '@/classifications/api/runtime/Store';\nimport PIS from '@/common/api/PisGlobal';\nimport {\n breakpoints,\n createDomainSetupComponent,\n} from '@/common/composables/createDomainSetupComponent';\nimport { FiltersStorageData } from '@/common/composables/FiltersStorageData';\n\nexport type TranslateFunc = (\n slug: string,\n useCommon?: boolean,\n inserts?: string[] | number[],\n) => string;\nexport type EmitFunc = (name: string, data: unknown) => void;\n\nexport type ComponentSetupItems = {\n componentName: string;\n isWebComponent: boolean;\n instance: Ref<Instance | undefined>;\n store: Ref<Store | undefined>;\n routeData: Ref<RouteData | undefined>;\n isReady: ComputedRef<boolean>;\n translationsReady: ComputedRef<boolean>;\n widerThan: (breakpoint: string) => boolean;\n narrowerThan: (breakpoint: string) => boolean;\n t: TranslateFunc;\n emit: EmitFunc;\n useProductsFilters: () => FiltersStorageData;\n};\n\nexport { breakpoints };\n\nconst setupClassificationsComponent = createDomainSetupComponent<Instance, ClassificationsDataType>(\n {\n getInstance: (id) => PIS.Classifications.getInstance(id) as Instance,\n instanceTag: 'pis-classifications-instance',\n debounceResize: false,\n },\n);\n\nexport function setupComponent(\n root: Ref<HTMLElement | undefined>,\n instanceId?: string,\n dataTypes?: ClassificationsDataType[],\n): ComponentSetupItems {\n return setupClassificationsComponent(root, instanceId, dataTypes) as ComponentSetupItems;\n}\n","<template>\n <div ref=\"root\" class=\"pis-component\">\n <template v-if=\"isReady && store && instance\">\n <Notifications :instance=\"instance\" />\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, ref } from 'vue';\n\nimport { setupComponent } from '@/classifications/composables/setupComponent';\nimport Notifications from '@/common/components/Notifications.vue';\n\nexport default defineComponent({\n name: 'pis-classifications-common-notifications',\n\n components: {\n Notifications,\n },\n\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n\n const { componentName, isReady, isWebComponent, instance, store, routeData } = setupComponent(\n root,\n props.instanceId,\n );\n\n return {\n root,\n store,\n isReady,\n instance,\n routeData,\n componentName,\n isWebComponent,\n };\n },\n});\n</script>\n","<template>\n <div ref=\"root\" class=\"pis-component\">\n <template v-if=\"isReady && store && instance\">\n <Notifications :instance=\"instance\" />\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, ref } from 'vue';\n\nimport { setupComponent } from '@/classifications/composables/setupComponent';\nimport Notifications from '@/common/components/Notifications.vue';\n\nexport default defineComponent({\n name: 'pis-classifications-common-notifications',\n\n components: {\n Notifications,\n },\n\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n\n const { componentName, isReady, isWebComponent, instance, store, routeData } = setupComponent(\n root,\n props.instanceId,\n );\n\n return {\n root,\n store,\n isReady,\n instance,\n routeData,\n componentName,\n isWebComponent,\n };\n },\n});\n</script>\n","<template>\n <div\n v-show=\"componentOptions.visible\"\n ref=\"root\"\n class=\"pis-component\"\n :class=\"componentName\"\n style=\"z-index: 1\"\n >\n <template v-if=\"isReady\">\n <button class=\"btn btn-outline-primary me-2\" @click=\"cancel\">{{ t('Cancel') }}</button>\n <button class=\"btn btn-primary\" @click=\"apply\">{{ t('Apply') }}</button>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref } from 'vue';\n\nimport { ClassificationsDataType } from '@/classifications/api/configuration/application/ClassificationsDataType';\nimport { ActionsOptions } from '@/classifications/api/configuration/components/ActionsOptions';\nimport { ApplyCommand, CancelCommand } from '@/classifications/api/runtime/CommandExecutor';\nimport { setupComponent } from '@/classifications/composables/setupComponent';\n\nexport default defineComponent({\n name: 'pis-classifications-browser-actions',\n\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n\n const { componentName, isReady, isWebComponent, instance, store, routeData, t } =\n setupComponent(root, props.instanceId, [ClassificationsDataType.Classifications]);\n\n const componentOptions = computed(\n () => store.value?.options.components?.browser?.actions ?? ({} as ActionsOptions),\n );\n\n const cancel = async () => {\n try {\n await instance.value?.execute(new CancelCommand().from(componentName));\n } catch {\n // ignored\n }\n };\n\n const apply = async () => {\n try {\n await instance.value?.execute(new ApplyCommand().from(componentName));\n } catch {\n // ignored\n }\n };\n\n return {\n root,\n store,\n isReady,\n instance,\n routeData,\n componentName,\n isWebComponent,\n componentOptions,\n cancel,\n apply,\n t,\n };\n },\n});\n</script>\n","<template>\n <div\n v-show=\"componentOptions.visible\"\n ref=\"root\"\n class=\"pis-component\"\n :class=\"componentName\"\n style=\"z-index: 1\"\n >\n <template v-if=\"isReady\">\n <button class=\"btn btn-outline-primary me-2\" @click=\"cancel\">{{ t('Cancel') }}</button>\n <button class=\"btn btn-primary\" @click=\"apply\">{{ t('Apply') }}</button>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref } from 'vue';\n\nimport { ClassificationsDataType } from '@/classifications/api/configuration/application/ClassificationsDataType';\nimport { ActionsOptions } from '@/classifications/api/configuration/components/ActionsOptions';\nimport { ApplyCommand, CancelCommand } from '@/classifications/api/runtime/CommandExecutor';\nimport { setupComponent } from '@/classifications/composables/setupComponent';\n\nexport default defineComponent({\n name: 'pis-classifications-browser-actions',\n\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n\n const { componentName, isReady, isWebComponent, instance, store, routeData, t } =\n setupComponent(root, props.instanceId, [ClassificationsDataType.Classifications]);\n\n const componentOptions = computed(\n () => store.value?.options.components?.browser?.actions ?? ({} as ActionsOptions),\n );\n\n const cancel = async () => {\n try {\n await instance.value?.execute(new CancelCommand().from(componentName));\n } catch {\n // ignored\n }\n };\n\n const apply = async () => {\n try {\n await instance.value?.execute(new ApplyCommand().from(componentName));\n } catch {\n // ignored\n }\n };\n\n return {\n root,\n store,\n isReady,\n instance,\n routeData,\n componentName,\n isWebComponent,\n componentOptions,\n cancel,\n apply,\n t,\n };\n },\n});\n</script>\n","<template>\n <div\n v-show=\"componentOptions.visible\"\n ref=\"root\"\n class=\"pis-component\"\n :class=\"componentName\"\n style=\"z-index: 1\"\n >\n <template v-if=\"isReady\">\n <div class=\"mb-3 card px-3 py-1 bg-light rounded-1\">\n <span class=\"small\">\n <strong class=\"d-inline pe-1\">{{ t('NoteTitle') }}</strong>\n <span v-safe-html=\"t('NoteBody')\"></span>\n </span>\n </div>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref } from 'vue';\n\nimport { ClassificationsDataType } from '@/classifications/api/configuration/application/ClassificationsDataType';\nimport { setupComponent } from '@/classifications/composables/setupComponent';\nimport { BaseComponentOptions } from '@/common/api/components/BaseComponentOptions';\n\nexport default defineComponent({\n name: 'pis-classifications-browser-note',\n\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n\n const { componentName, isReady, isWebComponent, instance, store, routeData, t } =\n setupComponent(root, props.instanceId, [ClassificationsDataType.Classifications]);\n\n const componentOptions = computed(\n () => store.value?.options.components?.browser?.note ?? ({} as BaseComponentOptions),\n );\n\n return {\n root,\n store,\n isReady,\n instance,\n routeData,\n componentName,\n isWebComponent,\n componentOptions,\n t,\n };\n },\n});\n</script>\n","<template>\n <div\n v-show=\"componentOptions.visible\"\n ref=\"root\"\n class=\"pis-component\"\n :class=\"componentName\"\n style=\"z-index: 1\"\n >\n <template v-if=\"isReady\">\n <div class=\"mb-3 card px-3 py-1 bg-light rounded-1\">\n <span class=\"small\">\n <strong class=\"d-inline pe-1\">{{ t('NoteTitle') }}</strong>\n <span v-safe-html=\"t('NoteBody')\"></span>\n </span>\n </div>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref } from 'vue';\n\nimport { ClassificationsDataType } from '@/classifications/api/configuration/application/ClassificationsDataType';\nimport { setupComponent } from '@/classifications/composables/setupComponent';\nimport { BaseComponentOptions } from '@/common/api/components/BaseComponentOptions';\n\nexport default defineComponent({\n name: 'pis-classifications-browser-note',\n\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n\n const { componentName, isReady, isWebComponent, instance, store, routeData, t } =\n setupComponent(root, props.instanceId, [ClassificationsDataType.Classifications]);\n\n const componentOptions = computed(\n () => store.value?.options.components?.browser?.note ?? ({} as BaseComponentOptions),\n );\n\n return {\n root,\n store,\n isReady,\n instance,\n routeData,\n componentName,\n isWebComponent,\n componentOptions,\n t,\n };\n },\n});\n</script>\n","<template>\n <div v-show=\"visible\" ref=\"root\" class=\"pis-component\" :class=\"componentName\">\n <div v-if=\"isReady\">\n <Dropdown v-model:open=\"isAutocompleteVisible\" min-width=\"340px\" :items=\"autocomplete.items\">\n <template #item=\"{ item }\">\n <Clickable class=\"dropdown-item\" @click=\"searchText(item.text)\">\n <div class=\"fw-bold ext-display-name\">\n <Highlighter\n highlight-class-name=\"text-primary p-0 display-inline bg-transparent ext-highlight\"\n highlight-tag=\"span\"\n :search-words=\"autocompleteHighlightTerms\"\n :auto-escape=\"true\"\n :text-to-highlight=\"item.text\"\n />\n </div>\n </Clickable>\n </template>\n\n <template #footer>\n <div v-if=\"isAutocompleteLoading\" class=\"text-center\"><Spinner sm /></div>\n <small v-else-if=\"autocomplete.totalCount\">\n {{\n t('ShowingNOfNMatches', false, [\n `${autocomplete.visibleMatchCount || 0}`,\n `${autocomplete.totalCount || 0}`,\n ])\n }}\n </small>\n <small v-else>{{ t('NoResults') }}</small>\n </template>\n\n <template #activator=\"{ on }\">\n <form class=\"input-group flex-nowrap\" @submit.prevent=\"onSearch()\">\n <FormInputClearable\n v-model=\"searchModel.text\"\n :class-inner=\"'border-end-0'\"\n :placeholder=\"t('SearchClassificationsInputPlaceholder')\"\n v-on=\"on\"\n @update:model-value=\"onSearchInput\"\n @clear=\"onClear\"\n @focus=\"openAutocomplete\"\n />\n\n <Btn :aria-label=\"t('SearchButtonText')\" icon=\"lens-search-find\">\n <span class=\"d-none d-sm-inline\">{{ t('SearchButtonText') }}</span>\n </Btn>\n </form>\n </template>\n </Dropdown>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, ref, reactive, computed, watch } from 'vue';\nimport Highlighter from 'vue-highlight-words';\n\nimport {\n GetAutocompleteCommand,\n SearchCommand,\n} from '@/classifications/api/runtime/CommandExecutor';\nimport { setupComponent } from '@/classifications/composables/setupComponent';\nimport Btn from '@/common/components/Btn.vue';\nimport Clickable from '@/common/components/Clickable.vue';\nimport Dropdown from '@/common/components/Dropdown.vue';\nimport FormInputClearable from '@/common/components/FormInputClearable.vue';\nimport Spinner from '@/common/components/Spinner.vue';\nimport { debounce } from '@/common/helpers/debounce';\nimport {\n CatalogSearchTypeEnum,\n ClassificationsBrowserAutocompleteResult,\n} from '@/common/services/swagger';\n\ninterface AutocompleteModelItem {\n text?: string;\n count?: number;\n type: 'item' | 'root' | 'current';\n}\n\nconst searchTypeCatalogName = {\n value: CatalogSearchTypeEnum.CATALOG_CODE_AND_DESCRIPTION,\n translate: 'SearchByCodeAndDescription',\n};\n\nconst searchTypeCreatedBy = {\n value: CatalogSearchTypeEnum.CREATED_BY,\n translate: 'SearchByCreatedBy',\n};\n\ninterface Autocomplete {\n totalCount: number;\n visibleMatchCount: number;\n items: AutocompleteModelItem[];\n}\n\nexport default defineComponent({\n name: 'pis-classifications-browser-search-form',\n\n components: {\n Btn,\n Spinner,\n Dropdown,\n Clickable,\n Highlighter,\n FormInputClearable,\n },\n\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n\n const searchModel = reactive({\n text: '',\n type: CatalogSearchTypeEnum.CATALOG_CODE_AND_DESCRIPTION,\n isDirty: false,\n });\n\n const autocomplete = ref<Autocomplete>({\n totalCount: 0,\n visibleMatchCount: 0,\n items: [],\n });\n const isAutocompleteVisible = ref(false);\n const isAutocompleteLoading = ref(false);\n\n const {\n componentName,\n isReady,\n isWebComponent,\n instance,\n store,\n routeData,\n widerThan,\n narrowerThan,\n t,\n } = setupComponent(root, props.instanceId);\n\n const visible = computed(() => store.value?.options.components?.browser?.form?.visible);\n\n const autocompleteEnabled = computed(\n () => store.value?.options.components?.browser?.form?.useAutocomplete,\n );\n\n const baseSearchTypeOptions = [searchTypeCatalogName, searchTypeCreatedBy];\n\n const searchTypeOptions = computed(() => {\n return baseSearchTypeOptions;\n });\n\n const onSearch = async () => {\n isAutocompleteVisible.value = false;\n try {\n await instance.value?.execute(\n new SearchCommand({\n searchText: searchModel.text,\n }).from(componentName),\n );\n\n searchModel.isDirty = false;\n } catch {\n // Ignore Error\n }\n };\n\n const searchText = (text: string) => {\n searchModel.text = text;\n onSearch();\n };\n\n const onClear = () => {\n if (!searchModel.isDirty) {\n searchModel.text = '';\n autocomplete.value.items = [];\n autocomplete.value.totalCount = 0;\n onSearch();\n }\n };\n\n const openAutocomplete = () => {\n if (!autocompleteEnabled.value) {\n return;\n }\n\n if (searchModel.text == routeData.value?.searchText) {\n return;\n }\n\n if (searchModel.text.length > 2) {\n isAutocompleteVisible.value = true;\n }\n };\n\n const autocompleteHighlightTerms = ref<string[]>([]);\n\n const closeAutocomplete = () => {\n isAutocompleteVisible.value = false;\n };\n\n const handleAutocompleteSearch = debounce(async (text: string) => {\n {\n let items: AutocompleteModelItem[] = [];\n let totalCount = 0;\n let visibleMatchCount = 0;\n const searchTextTrimmed = (text || '').trim();\n if (autocompleteEnabled.value && searchTextTrimmed.length > 2) {\n isAutocompleteLoading.value = true;\n autocompleteHighlightTerms.value = searchTextTrimmed\n .toLowerCase()\n .split(/[._-\\s/]+/)\n .concat([searchTextTrimmed]);\n try {\n const result = (await instance.value?.execute(\n new GetAutocompleteCommand({ searchText: text }).from(componentName),\n )) as ClassificationsBrowserAutocompleteResult | undefined;\n items = (result?.matches || []).map((match: string) => ({\n text: match,\n type: 'item',\n }));\n totalCount = result?.totalCount || 0;\n visibleMatchCount = result?.matches?.length || 0;\n } catch {\n // Ignore Error\n }\n }\n autocomplete.value = { items, totalCount, visibleMatchCount };\n isAutocompleteVisible.value = autocomplete.value.items.length > 0;\n isAutocompleteLoading.value = false;\n }\n }, 600);\n\n const onSearchInput = () => {\n searchModel.isDirty =\n searchModel.text?.length > 0 && searchModel.text != routeData.value?.searchText;\n handleAutocompleteSearch(searchModel.text);\n };\n\n // Sync the search model text with route search text after initializing the app.\n watch(\n () => routeData.value?.searchText,\n (text, oldText) => {\n if (text !== oldText) {\n searchModel.text = text ?? '';\n }\n },\n );\n\n return {\n root,\n componentName,\n isReady,\n isWebComponent,\n store,\n searchModel,\n searchTypeOptions,\n autocomplete,\n isAutocompleteVisible,\n isAutocompleteLoading,\n autocompleteHighlightTerms,\n widerThan,\n narrowerThan,\n t,\n onSearch,\n onSearchInput,\n onClear,\n searchText,\n openAutocomplete,\n closeAutocomplete,\n visible,\n };\n },\n});\n</script>\n","<template>\n <div v-show=\"visible\" ref=\"root\" class=\"pis-component\" :class=\"componentName\">\n <div v-if=\"isReady\">\n <Dropdown v-model:open=\"isAutocompleteVisible\" min-width=\"340px\" :items=\"autocomplete.items\">\n <template #item=\"{ item }\">\n <Clickable class=\"dropdown-item\" @click=\"searchText(item.text)\">\n <div class=\"fw-bold ext-display-name\">\n <Highlighter\n highlight-class-name=\"text-primary p-0 display-inline bg-transparent ext-highlight\"\n highlight-tag=\"span\"\n :search-words=\"autocompleteHighlightTerms\"\n :auto-escape=\"true\"\n :text-to-highlight=\"item.text\"\n />\n </div>\n </Clickable>\n </template>\n\n <template #footer>\n <div v-if=\"isAutocompleteLoading\" class=\"text-center\"><Spinner sm /></div>\n <small v-else-if=\"autocomplete.totalCount\">\n {{\n t('ShowingNOfNMatches', false, [\n `${autocomplete.visibleMatchCount || 0}`,\n `${autocomplete.totalCount || 0}`,\n ])\n }}\n </small>\n <small v-else>{{ t('NoResults') }}</small>\n </template>\n\n <template #activator=\"{ on }\">\n <form class=\"input-group flex-nowrap\" @submit.prevent=\"onSearch()\">\n <FormInputClearable\n v-model=\"searchModel.text\"\n :class-inner=\"'border-end-0'\"\n :placeholder=\"t('SearchClassificationsInputPlaceholder')\"\n v-on=\"on\"\n @update:model-value=\"onSearchInput\"\n @clear=\"onClear\"\n @focus=\"openAutocomplete\"\n />\n\n <Btn :aria-label=\"t('SearchButtonText')\" icon=\"lens-search-find\">\n <span class=\"d-none d-sm-inline\">{{ t('SearchButtonText') }}</span>\n </Btn>\n </form>\n </template>\n </Dropdown>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, ref, reactive, computed, watch } from 'vue';\nimport Highlighter from 'vue-highlight-words';\n\nimport {\n GetAutocompleteCommand,\n SearchCommand,\n} from '@/classifications/api/runtime/CommandExecutor';\nimport { setupComponent } from '@/classifications/composables/setupComponent';\nimport Btn from '@/common/components/Btn.vue';\nimport Clickable from '@/common/components/Clickable.vue';\nimport Dropdown from '@/common/components/Dropdown.vue';\nimport FormInputClearable from '@/common/components/FormInputClearable.vue';\nimport Spinner from '@/common/components/Spinner.vue';\nimport { debounce } from '@/common/helpers/debounce';\nimport {\n CatalogSearchTypeEnum,\n ClassificationsBrowserAutocompleteResult,\n} from '@/common/services/swagger';\n\ninterface AutocompleteModelItem {\n text?: string;\n count?: number;\n type: 'item' | 'root' | 'current';\n}\n\nconst searchTypeCatalogName = {\n value: CatalogSearchTypeEnum.CATALOG_CODE_AND_DESCRIPTION,\n translate: 'SearchByCodeAndDescription',\n};\n\nconst searchTypeCreatedBy = {\n value: CatalogSearchTypeEnum.CREATED_BY,\n translate: 'SearchByCreatedBy',\n};\n\ninterface Autocomplete {\n totalCount: number;\n visibleMatchCount: number;\n items: AutocompleteModelItem[];\n}\n\nexport default defineComponent({\n name: 'pis-classifications-browser-search-form',\n\n components: {\n Btn,\n Spinner,\n Dropdown,\n Clickable,\n Highlighter,\n FormInputClearable,\n },\n\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n\n const searchModel = reactive({\n text: '',\n type: CatalogSearchTypeEnum.CATALOG_CODE_AND_DESCRIPTION,\n isDirty: false,\n });\n\n const autocomplete = ref<Autocomplete>({\n totalCount: 0,\n visibleMatchCount: 0,\n items: [],\n });\n const isAutocompleteVisible = ref(false);\n const isAutocompleteLoading = ref(false);\n\n const {\n componentName,\n isReady,\n isWebComponent,\n instance,\n store,\n routeData,\n widerThan,\n narrowerThan,\n t,\n } = setupComponent(root, props.instanceId);\n\n const visible = computed(() => store.value?.options.components?.browser?.form?.visible);\n\n const autocompleteEnabled = computed(\n () => store.value?.options.components?.browser?.form?.useAutocomplete,\n );\n\n const baseSearchTypeOptions = [searchTypeCatalogName, searchTypeCreatedBy];\n\n const searchTypeOptions = computed(() => {\n return baseSearchTypeOptions;\n });\n\n const onSearch = async () => {\n isAutocompleteVisible.value = false;\n try {\n await instance.value?.execute(\n new SearchCommand({\n searchText: searchModel.text,\n }).from(componentName),\n );\n\n searchModel.isDirty = false;\n } catch {\n // Ignore Error\n }\n };\n\n const searchText = (text: string) => {\n searchModel.text = text;\n onSearch();\n };\n\n const onClear = () => {\n if (!searchModel.isDirty) {\n searchModel.text = '';\n autocomplete.value.items = [];\n autocomplete.value.totalCount = 0;\n onSearch();\n }\n };\n\n const openAutocomplete = () => {\n if (!autocompleteEnabled.value) {\n return;\n }\n\n if (searchModel.text == routeData.value?.searchText) {\n return;\n }\n\n if (searchModel.text.length > 2) {\n isAutocompleteVisible.value = true;\n }\n };\n\n const autocompleteHighlightTerms = ref<string[]>([]);\n\n const closeAutocomplete = () => {\n isAutocompleteVisible.value = false;\n };\n\n const handleAutocompleteSearch = debounce(async (text: string) => {\n {\n let items: AutocompleteModelItem[] = [];\n let totalCount = 0;\n let visibleMatchCount = 0;\n const searchTextTrimmed = (text || '').trim();\n if (autocompleteEnabled.value && searchTextTrimmed.length > 2) {\n isAutocompleteLoading.value = true;\n autocompleteHighlightTerms.value = searchTextTrimmed\n .toLowerCase()\n .split(/[._-\\s/]+/)\n .concat([searchTextTrimmed]);\n try {\n const result = (await instance.value?.execute(\n new GetAutocompleteCommand({ searchText: text }).from(componentName),\n )) as ClassificationsBrowserAutocompleteResult | undefined;\n items = (result?.matches || []).map((match: string) => ({\n text: match,\n type: 'item',\n }));\n totalCount = result?.totalCount || 0;\n visibleMatchCount = result?.matches?.length || 0;\n } catch {\n // Ignore Error\n }\n }\n autocomplete.value = { items, totalCount, visibleMatchCount };\n isAutocompleteVisible.value = autocomplete.value.items.length > 0;\n isAutocompleteLoading.value = false;\n }\n }, 600);\n\n const onSearchInput = () => {\n searchModel.isDirty =\n searchModel.text?.length > 0 && searchModel.text != routeData.value?.searchText;\n handleAutocompleteSearch(searchModel.text);\n };\n\n // Sync the search model text with route search text after initializing the app.\n watch(\n () => routeData.value?.searchText,\n (text, oldText) => {\n if (text !== oldText) {\n searchModel.text = text ?? '';\n }\n },\n );\n\n return {\n root,\n componentName,\n isReady,\n isWebComponent,\n store,\n searchModel,\n searchTypeOptions,\n autocomplete,\n isAutocompleteVisible,\n isAutocompleteLoading,\n autocompleteHighlightTerms,\n widerThan,\n narrowerThan,\n t,\n onSearch,\n onSearchInput,\n onClear,\n searchText,\n openAutocomplete,\n closeAutocomplete,\n visible,\n };\n },\n});\n</script>\n","<template>\n <div\n v-show=\"componentOptions.visible\"\n ref=\"root\"\n class=\"pis-component\"\n :class=\"componentName\"\n style=\"z-index: 1\"\n >\n <template v-if=\"isReady\">\n <div class=\"d-flex\">\n <div class=\"flex-grow-1 fw-bold\">\n {{ t('SelectedLabel') }}\n </div>\n <a v-if=\"nodes.length\" href=\"#\" class=\"small\" @click.prevent=\"clearAll\">{{\n t('ClearAll')\n }}</a>\n </div>\n\n <div class=\"overflow-auto border p-1\" :style=\"{ height: height }\">\n <div v-if=\"nodes && nodes.length\">\n <div v-if=\"offeringNodes.length\" class=\"fw-bold my-2\">\n {{ t('OfferingTree') }}\n </div>\n <div\n v-for=\"node in offeringNodes\"\n :key=\"node.cid\"\n class=\"border p-1 mb-1 bg-light d-flex align-items-center rounded-2\"\n >\n <div class=\"flex-grow-1 d-flex\">\n <div>\n {{ node.name }}\n </div>\n <div v-if=\"node.productGroup.status === ProductGroupValidationStatusEnum.INVALID\">\n <Tooltip trigger=\"hover\" :text=\"t('InvalidProductGroup')\" :delay=\"100\">\n <Icon name=\"warning-triangle\" :size=\"16\" class=\"ms-1 text-warning\" />\n </Tooltip>\n </div>\n </div>\n <a\n href=\"#\"\n class=\"text-dark pis-hover p-2 d-flex rounded-circle\"\n @click.prevent=\"selection?.deselect([node])\"\n >\n <Icon name=\"cross-close\" :size=\"16\" />\n </a>\n </div>\n\n <div v-if=\"plNodes.length\" class=\"fw-bold my-2\">\n {{ t('ProductLineTree') }}\n </div>\n\n <div\n v-for=\"node in plNodes\"\n :key=\"node.cid\"\n class=\"border p-1 mb-1 bg-light d-flex align-items-center rounded-2\"\n >\n <div class=\"flex-grow-1 d-flex\">\n <div>\n {{ node.name }}\n </div>\n <div v-if=\"node.productGroup.status === ProductGroupValidationStatusEnum.INVALID\">\n <Tooltip trigger=\"hover\" :text=\"t('InvalidProductGroup')\" :delay=\"100\">\n <Icon name=\"warning-triangle\" :size=\"16\" class=\"ms-1 text-warning\" />\n </Tooltip>\n </div>\n </div>\n <a\n href=\"#\"\n class=\"text-dark pis-hover p-2 d-flex rounded-circle\"\n @click.prevent=\"selection?.deselect([node])\"\n >\n <Icon name=\"cross-close\" :size=\"16\" />\n </a>\n </div>\n </div>\n <div v-else class=\"p-3 text-muted\">{{ t('NothingSelected') }}</div>\n </div>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref } from 'vue';\n\nimport { ClassificationsDataType } from '@/classifications/api/configuration/application/ClassificationsDataType';\nimport { SelectionOptions } from '@/classifications/api/configuration/components/SelectionOptions';\nimport { ClearSelectionCommand } from '@/classifications/api/runtime/CommandExecutor';\nimport { setupComponent } from '@/classifications/composables/setupComponent';\nimport Icon from '@/common/components/Icon.vue';\nimport Tooltip from '@/common/components/Tooltip.vue';\nimport { attrValue, attrValues, additionalInfo } from '@/common/helpers/productAttributes';\nimport {\n ClassificationsBrowserNode,\n ClassificationsBrowserTreeTypeEnum,\n ProductGroupValidationStatusEnum,\n} from '@/common/services/swagger';\nexport default defineComponent({\n name: 'pis-classifications-browser-selection',\n\n components: {\n Icon,\n Tooltip,\n },\n\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n\n const {\n componentName,\n isReady,\n isWebComponent,\n instance,\n store,\n routeData,\n narrowerThan,\n emit,\n t,\n } = setupComponent(root, props.instanceId, [ClassificationsDataType.Classifications]);\n\n const componentOptions = computed(\n () => store.value?.options.components?.browser?.selection ?? ({} as SelectionOptions),\n );\n\n const nodes = computed(\n () => (instance.value?.selection.selectedItems as ClassificationsBrowserNode[]) || [],\n );\n\n const offeringNodes = computed(() => {\n return nodes.value.filter((a) => a.tree == ClassificationsBrowserTreeTypeEnum.OFFERING);\n });\n\n const plNodes = computed(() => {\n return nodes.value.filter((a) => a.tree == ClassificationsBrowserTreeTypeEnum.PRODUCT_LINE);\n });\n\n const selection = computed(() => instance.value?.selection);\n\n const clearAll = () => {\n try {\n instance.value?.execute(new ClearSelectionCommand().from(componentName));\n } catch {\n // ignored\n }\n };\n\n const height = computed(() =>\n narrowerThan('sm')\n ? componentOptions.value.mobileScrollHeight + 'px'\n : componentOptions.value.scrollHeight + 'px',\n );\n\n return {\n root,\n store,\n isReady,\n instance,\n routeData,\n componentName,\n isWebComponent,\n componentOptions,\n nodes,\n selection,\n height,\n t,\n emit,\n attrValue,\n attrValues,\n additionalInfo,\n clearAll,\n ProductGroupValidationStatusEnum,\n offeringNodes,\n plNodes,\n };\n },\n});\n</script>\n","<template>\n <div\n v-show=\"componentOptions.visible\"\n ref=\"root\"\n class=\"pis-component\"\n :class=\"componentName\"\n style=\"z-index: 1\"\n >\n <template v-if=\"isReady\">\n <div class=\"d-flex\">\n <div class=\"flex-grow-1 fw-bold\">\n {{ t('SelectedLabel') }}\n </div>\n <a v-if=\"nodes.length\" href=\"#\" class=\"small\" @click.prevent=\"clearAll\">{{\n t('ClearAll')\n }}</a>\n </div>\n\n <div class=\"overflow-auto border p-1\" :style=\"{ height: height }\">\n <div v-if=\"nodes && nodes.length\">\n <div v-if=\"offeringNodes.length\" class=\"fw-bold my-2\">\n {{ t('OfferingTree') }}\n </div>\n <div\n v-for=\"node in offeringNodes\"\n :key=\"node.cid\"\n class=\"border p-1 mb-1 bg-light d-flex align-items-center rounded-2\"\n >\n <div class=\"flex-grow-1 d-flex\">\n <div>\n {{ node.name }}\n </div>\n <div v-if=\"node.productGroup.status === ProductGroupValidationStatusEnum.INVALID\">\n <Tooltip trigger=\"hover\" :text=\"t('InvalidProductGroup')\" :delay=\"100\">\n <Icon name=\"warning-triangle\" :size=\"16\" class=\"ms-1 text-warning\" />\n </Tooltip>\n </div>\n </div>\n <a\n href=\"#\"\n class=\"text-dark pis-hover p-2 d-flex rounded-circle\"\n @click.prevent=\"selection?.deselect([node])\"\n >\n <Icon name=\"cross-close\" :size=\"16\" />\n </a>\n </div>\n\n <div v-if=\"plNodes.length\" class=\"fw-bold my-2\">\n {{ t('ProductLineTree') }}\n </div>\n\n <div\n v-for=\"node in plNodes\"\n :key=\"node.cid\"\n class=\"border p-1 mb-1 bg-light d-flex align-items-center rounded-2\"\n >\n <div class=\"flex-grow-1 d-flex\">\n <div>\n {{ node.name }}\n </div>\n <div v-if=\"node.productGroup.status === ProductGroupValidationStatusEnum.INVALID\">\n <Tooltip trigger=\"hover\" :text=\"t('InvalidProductGroup')\" :delay=\"100\">\n <Icon name=\"warning-triangle\" :size=\"16\" class=\"ms-1 text-warning\" />\n </Tooltip>\n </div>\n </div>\n <a\n href=\"#\"\n class=\"text-dark pis-hover p-2 d-flex rounded-circle\"\n @click.prevent=\"selection?.deselect([node])\"\n >\n <Icon name=\"cross-close\" :size=\"16\" />\n </a>\n </div>\n </div>\n <div v-else class=\"p-3 text-muted\">{{ t('NothingSelected') }}</div>\n </div>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref } from 'vue';\n\nimport { ClassificationsDataType } from '@/classifications/api/configuration/application/ClassificationsDataType';\nimport { SelectionOptions } from '@/classifications/api/configuration/components/SelectionOptions';\nimport { ClearSelectionCommand } from '@/classifications/api/runtime/CommandExecutor';\nimport { setupComponent } from '@/classifications/composables/setupComponent';\nimport Icon from '@/common/components/Icon.vue';\nimport Tooltip from '@/common/components/Tooltip.vue';\nimport { attrValue, attrValues, additionalInfo } from '@/common/helpers/productAttributes';\nimport {\n ClassificationsBrowserNode,\n ClassificationsBrowserTreeTypeEnum,\n ProductGroupValidationStatusEnum,\n} from '@/common/services/swagger';\nexport default defineComponent({\n name: 'pis-classifications-browser-selection',\n\n components: {\n Icon,\n Tooltip,\n },\n\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n\n const {\n componentName,\n isReady,\n isWebComponent,\n instance,\n store,\n routeData,\n narrowerThan,\n emit,\n t,\n } = setupComponent(root, props.instanceId, [ClassificationsDataType.Classifications]);\n\n const componentOptions = computed(\n () => store.value?.options.components?.browser?.selection ?? ({} as SelectionOptions),\n );\n\n const nodes = computed(\n () => (instance.value?.selection.selectedItems as ClassificationsBrowserNode[]) || [],\n );\n\n const offeringNodes = computed(() => {\n return nodes.value.filter((a) => a.tree == ClassificationsBrowserTreeTypeEnum.OFFERING);\n });\n\n const plNodes = computed(() => {\n return nodes.value.filter((a) => a.tree == ClassificationsBrowserTreeTypeEnum.PRODUCT_LINE);\n });\n\n const selection = computed(() => instance.value?.selection);\n\n const clearAll = () => {\n try {\n instance.value?.execute(new ClearSelectionCommand().from(componentName));\n } catch {\n // ignored\n }\n };\n\n const height = computed(() =>\n narrowerThan('sm')\n ? componentOptions.value.mobileScrollHeight + 'px'\n : componentOptions.value.scrollHeight + 'px',\n );\n\n return {\n root,\n store,\n isReady,\n instance,\n routeData,\n componentName,\n isWebComponent,\n componentOptions,\n nodes,\n selection,\n height,\n t,\n emit,\n attrValue,\n attrValues,\n additionalInfo,\n clearAll,\n ProductGroupValidationStatusEnum,\n offeringNodes,\n plNodes,\n };\n },\n});\n</script>\n","// https://github.com/kostyfisik/transition-height-vue3-ts\n\n<script setup lang=\"ts\">\ninterface Props {\n duration?: number;\n easingEnter?: string;\n easingLeave?: string;\n opacityClosed?: number;\n opacityOpened?: number;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n duration: 100,\n easingEnter: 'ease-in-out',\n easingLeave: 'ease-in-out',\n opacityClosed: 0,\n opacityOpened: 1,\n});\n\nconst closed = '0px';\n\ninterface InitialStyle {\n height: string;\n width: string;\n position: string;\n visibility: string;\n overflow: string;\n paddingTop: string;\n paddingBottom: string;\n borderTopWidth: string;\n borderBottomWidth: string;\n marginTop: string;\n marginBottom: string;\n}\n\nfunction getElementStyle(element: HTMLElement) {\n return {\n height: element.style.height,\n width: element.style.width,\n position: element.style.position,\n visibility: element.style.visibility,\n overflow: element.style.overflow,\n paddingTop: element.style.paddingTop,\n paddingBottom: element.style.paddingBottom,\n borderTopWidth: element.style.borderTopWidth,\n borderBottomWidth: element.style.borderBottomWidth,\n marginTop: element.style.marginTop,\n marginBottom: element.style.marginBottom,\n };\n}\n\nfunction prepareElement(element: HTMLElement, initialStyle: InitialStyle) {\n const { width } = getComputedStyle(element);\n element.style.width = width;\n element.style.position = 'absolute';\n element.style.visibility = 'hidden';\n element.style.height = '';\n\n let { height } = getComputedStyle(element);\n element.style.width = initialStyle.width;\n element.style.position = initialStyle.position;\n element.style.visibility = initialStyle.visibility;\n element.style.height = closed;\n element.style.overflow = 'hidden';\n return initialStyle.height && initialStyle.height != closed ? initialStyle.height : height;\n}\n\nfunction animateTransition(\n element: HTMLElement,\n initialStyle: InitialStyle,\n done: () => void,\n // eslint-disable-next-line no-undef\n keyframes: Keyframe[] | PropertyIndexedKeyframes | null,\n // eslint-disable-next-line no-undef\n options?: number | KeyframeAnimationOptions,\n) {\n const animation = element.animate(keyframes, options);\n // Set height to 'auto' to restore it after animation\n element.style.height = initialStyle.height;\n animation.onfinish = () => {\n element.style.overflow = initialStyle.overflow;\n done();\n };\n}\n\nfunction getEnterKeyframes(height: string, initialStyle: InitialStyle) {\n return [\n {\n height: closed,\n opacity: props.opacityClosed,\n paddingTop: closed,\n paddingBottom: closed,\n borderTopWidth: closed,\n borderBottomWidth: closed,\n marginTop: closed,\n marginBottom: closed,\n },\n {\n height,\n opacity: props.opacityOpened,\n paddingTop: initialStyle.paddingTop,\n paddingBottom: initialStyle.paddingBottom,\n borderTopWidth: initialStyle.borderTopWidth,\n borderBottomWidth: initialStyle.borderBottomWidth,\n marginTop: initialStyle.marginTop,\n marginBottom: initialStyle.marginBottom,\n },\n ];\n}\n\nfunction enterTransition(element: Element, done: () => void) {\n const HTMLElement = element as HTMLElement;\n const initialStyle = getElementStyle(HTMLElement);\n const height = prepareElement(HTMLElement, initialStyle);\n const keyframes = getEnterKeyframes(height, initialStyle);\n const options = { duration: props.duration, easing: props.easingEnter };\n animateTransition(HTMLElement, initialStyle, done, keyframes, options);\n}\n\nfunction leaveTransition(element: Element, done: () => void) {\n const HTMLElement = element as HTMLElement;\n const initialStyle = getElementStyle(HTMLElement);\n const { height } = getComputedStyle(HTMLElement);\n HTMLElement.style.height = height;\n HTMLElement.style.overflow = 'hidden';\n\n const keyframes = getEnterKeyframes(height, initialStyle).reverse();\n const options = { duration: props.duration, easing: props.easingLeave };\n\n animateTransition(HTMLElement, initialStyle, done, keyframes, options);\n}\n</script>\n\n<template>\n <Transition :css=\"false\" @enter=\"enterTransition\" @leave=\"leaveTransition\">\n <slot />\n </Transition>\n</template>\n","// https://github.com/kostyfisik/transition-height-vue3-ts\n\n<script setup lang=\"ts\">\ninterface Props {\n duration?: number;\n easingEnter?: string;\n easingLeave?: string;\n opacityClosed?: number;\n opacityOpened?: number;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n duration: 100,\n easingEnter: 'ease-in-out',\n easingLeave: 'ease-in-out',\n opacityClosed: 0,\n opacityOpened: 1,\n});\n\nconst closed = '0px';\n\ninterface InitialStyle {\n height: string;\n width: string;\n position: string;\n visibility: string;\n overflow: string;\n paddingTop: string;\n paddingBottom: string;\n borderTopWidth: string;\n borderBottomWidth: string;\n marginTop: string;\n marginBottom: string;\n}\n\nfunction getElementStyle(element: HTMLElement) {\n return {\n height: element.style.height,\n width: element.style.width,\n position: element.style.position,\n visibility: element.style.visibility,\n overflow: element.style.overflow,\n paddingTop: element.style.paddingTop,\n paddingBottom: element.style.paddingBottom,\n borderTopWidth: element.style.borderTopWidth,\n borderBottomWidth: element.style.borderBottomWidth,\n marginTop: element.style.marginTop,\n marginBottom: element.style.marginBottom,\n };\n}\n\nfunction prepareElement(element: HTMLElement, initialStyle: InitialStyle) {\n const { width } = getComputedStyle(element);\n element.style.width = width;\n element.style.position = 'absolute';\n element.style.visibility = 'hidden';\n element.style.height = '';\n\n let { height } = getComputedStyle(element);\n element.style.width = initialStyle.width;\n element.style.position = initialStyle.position;\n element.style.visibility = initialStyle.visibility;\n element.style.height = closed;\n element.style.overflow = 'hidden';\n return initialStyle.height && initialStyle.height != closed ? initialStyle.height : height;\n}\n\nfunction animateTransition(\n element: HTMLElement,\n initialStyle: InitialStyle,\n done: () => void,\n // eslint-disable-next-line no-undef\n keyframes: Keyframe[] | PropertyIndexedKeyframes | null,\n // eslint-disable-next-line no-undef\n options?: number | KeyframeAnimationOptions,\n) {\n const animation = element.animate(keyframes, options);\n // Set height to 'auto' to restore it after animation\n element.style.height = initialStyle.height;\n animation.onfinish = () => {\n element.style.overflow = initialStyle.overflow;\n done();\n };\n}\n\nfunction getEnterKeyframes(height: string, initialStyle: InitialStyle) {\n return [\n {\n height: closed,\n opacity: props.opacityClosed,\n paddingTop: closed,\n paddingBottom: closed,\n borderTopWidth: closed,\n borderBottomWidth: closed,\n marginTop: closed,\n marginBottom: closed,\n },\n {\n height,\n opacity: props.opacityOpened,\n paddingTop: initialStyle.paddingTop,\n paddingBottom: initialStyle.paddingBottom,\n borderTopWidth: initialStyle.borderTopWidth,\n borderBottomWidth: initialStyle.borderBottomWidth,\n marginTop: initialStyle.marginTop,\n marginBottom: initialStyle.marginBottom,\n },\n ];\n}\n\nfunction enterTransition(element: Element, done: () => void) {\n const HTMLElement = element as HTMLElement;\n const initialStyle = getElementStyle(HTMLElement);\n const height = prepareElement(HTMLElement, initialStyle);\n const keyframes = getEnterKeyframes(height, initialStyle);\n const options = { duration: props.duration, easing: props.easingEnter };\n animateTransition(HTMLElement, initialStyle, done, keyframes, options);\n}\n\nfunction leaveTransition(element: Element, done: () => void) {\n const HTMLElement = element as HTMLElement;\n const initialStyle = getElementStyle(HTMLElement);\n const { height } = getComputedStyle(HTMLElement);\n HTMLElement.style.height = height;\n HTMLElement.style.overflow = 'hidden';\n\n const keyframes = getEnterKeyframes(height, initialStyle).reverse();\n const options = { duration: props.duration, easing: props.easingLeave };\n\n animateTransition(HTMLElement, initialStyle, done, keyframes, options);\n}\n</script>\n\n<template>\n <Transition :css=\"false\" @enter=\"enterTransition\" @leave=\"leaveTransition\">\n <slot />\n </Transition>\n</template>\n","<template>\n <li class=\"pis-tree-node\">\n <div class=\"d-flex align-items-center\">\n <template v-if=\"isLeaf\">\n <Icon name=\"plus-add\" :size=\"16\" class=\"me-1 p-2\" style=\"opacity: 0\" />\n </template>\n <template v-else>\n <template v-if=\"isLoading\">\n <div class=\"spinner-border spinner-border-sm mx-2 mt-1 mb-2\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </template>\n <template v-else>\n <a\n v-if=\"isExpanded\"\n href=\"#\"\n class=\"text-dark me-1 pis-hover p-2 d-flex rounded-circle\"\n @click.prevent=\"toggleNode\"\n >\n <Icon name=\"arrow-right\" :size=\"16\" style=\"transform: rotate(90deg)\" />\n </a>\n <a\n v-else\n href=\"\"\n class=\"text-dark me-1 pis-hover p-2 d-flex rounded-circle\"\n @click.prevent=\"toggleNode\"\n >\n <Icon name=\"arrow-right\" :size=\"16\" />\n </a>\n </template>\n </template>\n <div class=\"form-check d-flex\">\n <input\n :id=\"'cid_' + item.cid\"\n class=\"form-check-input me-2\"\n type=\"checkbox\"\n :checked=\"isSelected\"\n :disabled=\"!item.selectable\"\n @change=\"toggleSelection\"\n />\n <label\n :for=\"'cid_' + item.cid\"\n class=\"form-check-label user-select-none opacity-100 d-flex align-items-center\"\n :class=\"[item.match && 'bg-light']\"\n @dblclick.prevent=\"toggleNode\"\n >\n <div v-if=\"isValidPg\" class=\"text-primary pis-hover rounded-2 text-nowrap px-1\">\n <Tooltip\n trigger=\"hover\"\n :delay=\"200\"\n :text=\"item.productGroup.code + ' - ' + item.productGroup.name\"\n >\n {{ item.name }}\n </Tooltip>\n </div>\n\n <div v-else class=\"pis-hover text-nowrap rounded-2 px-1\">\n {{ item.name }}\n </div>\n </label>\n <div v-if=\"isInvalidPg\">\n <Tooltip trigger=\"hover\" :text=\"t('InvalidProductGroup')\" :delay=\"100\">\n <Icon name=\"warning-triangle\" :size=\"16\" class=\"ms-1 text-warning\" />\n </Tooltip>\n </div>\n <div v-else-if=\"areFavoritesEnabled\" class=\"ms-1\">\n <Tooltip trigger=\"hover\" :text=\"t('FavoritesTooltip')\" :delay=\"100\">\n <a\n href=\"#\"\n class=\"pis-hover p-1 d-flex rounded-circle\"\n :class=\"[isFavorite && 'text-warning', !isFavorite && 'text-secondary']\"\n @click.prevent=\"toggleFavorite\"\n >\n <Icon name=\"star\" :size=\"16\" />\n </a>\n </Tooltip>\n </div>\n </div>\n </div>\n <TransitionHeight>\n <ul v-if=\"item.children && isExpanded\" class=\"pis-tree\">\n <ClassificationNode\n v-for=\"child in item.children\"\n :key=\"child.cid\"\n :item=\"child\"\n :t=\"t\"\n :instance-id=\"instanceId\"\n ></ClassificationNode>\n </ul>\n </TransitionHeight>\n </li>\n</template>\n\n<script lang=\"ts\">\nimport { PropType, computed, defineComponent } from 'vue';\n\nimport TransitionHeight from './TransitionHeight.vue';\n\nimport {\n AddFavoriteCommand,\n CollapseNodeCommand,\n DeselectCommand,\n ExpandNodeCommand,\n RemoveFavoriteCommand,\n SelectCommand,\n} from '@/classifications/api/runtime/CommandExecutor';\nimport { findTabById } from '@/classifications/api/runtime/normalizeTabOptions';\nimport { TranslateFunc } from '@/classifications/composables/setupComponent';\nimport PIS from '@/common/api/PisGlobal';\nimport Icon from '@/common/components/Icon.vue';\nimport Tooltip from '@/common/components/Tooltip.vue';\nimport {\n ClassificationsBrowserNode,\n ClassificationsBrowserTreeViewEnum,\n ProductGroupValidationStatusEnum,\n} from '@/common/services/swagger';\n\nexport default defineComponent({\n name: 'ClassificationNode',\n components: { Icon, Tooltip, TransitionHeight },\n props: {\n item: { type: Object as () => ClassificationsBrowserNode, required: true },\n t: { type: Function as PropType<TranslateFunc>, required: true },\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const isExpanded = computed(() => props.item['_isExpanded']);\n const isLoading = computed(() => props.item['_isLoading']);\n const instance = computed(() => PIS.Classifications.getInstance(props.instanceId));\n\n const selection = computed(() => instance.value?.selection);\n const favorites = computed(() => instance.value?.favorites);\n const isSelected = computed(() => selection.value?.isSelected(props.item));\n const isFavorite = computed(() => favorites.value?.isSelected(props.item));\n const areFavoritesEnabled = computed<boolean>(() =>\n (instance.value?.getOptions().components?.browser?.tabs?.items || []).some(\n (tab) => tab.type === ClassificationsBrowserTreeViewEnum.FAVORITES,\n ),\n );\n\n const isInvalidPg = computed(\n () => props.item.productGroup?.status === ProductGroupValidationStatusEnum.INVALID,\n );\n\n const isValidPg = computed(\n () => props.item.productGroup?.status === ProductGroupValidationStatusEnum.VALID,\n );\n\n const activeTab = computed(() => {\n const route = instance.value?.getRouteData();\n const tabs = instance.value?.getOptions().components?.browser?.tabs?.items ?? [];\n return findTabById(tabs, route?.tabId);\n });\n\n const isLeaf = computed(() =>\n activeTab.value?.type === ClassificationsBrowserTreeViewEnum.FAVORITES &&\n !activeTab.value?.itemsExpandable\n ? !props.item.children\n : props.item.leaf,\n );\n\n const toggleNode = async () => {\n if (props.item.leaf) {\n return;\n }\n try {\n if (isExpanded.value) {\n await instance.value?.execute(\n new CollapseNodeCommand({ item: props.item }).from('classifications-tree'),\n );\n } else {\n await instance.value?.execute(\n new ExpandNodeCommand({ item: props.item }).from('classifications-tree'),\n );\n }\n } catch {\n // Ignore error\n }\n };\n\n const toggleSelection = async () => {\n try {\n if (selection.value?.isSelected(props.item)) {\n await instance.value?.execute(\n new DeselectCommand({ item: props.item }).from('classifications-tree'),\n );\n } else {\n await instance.value?.execute(\n new SelectCommand({ item: props.item }).from('classifications-tree'),\n );\n }\n } catch {\n // Ignore error\n }\n };\n\n const toggleFavorite = async () => {\n try {\n if (favorites.value?.isSelected(props.item)) {\n await instance.value?.execute(\n new RemoveFavoriteCommand({ item: props.item }).from('classifications-tree'),\n );\n } else {\n await instance.value?.execute(\n new AddFavoriteCommand({ item: props.item }).from('classifications-tree'),\n );\n }\n } catch {\n // Ignore error\n }\n };\n\n return {\n isExpanded,\n isLoading,\n isSelected,\n isFavorite,\n isInvalidPg,\n isValidPg,\n selection,\n areFavoritesEnabled,\n activeTab,\n isLeaf,\n toggleNode,\n toggleSelection,\n toggleFavorite,\n };\n },\n});\n</script>\n","<template>\n <li class=\"pis-tree-node\">\n <div class=\"d-flex align-items-center\">\n <template v-if=\"isLeaf\">\n <Icon name=\"plus-add\" :size=\"16\" class=\"me-1 p-2\" style=\"opacity: 0\" />\n </template>\n <template v-else>\n <template v-if=\"isLoading\">\n <div class=\"spinner-border spinner-border-sm mx-2 mt-1 mb-2\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </template>\n <template v-else>\n <a\n v-if=\"isExpanded\"\n href=\"#\"\n class=\"text-dark me-1 pis-hover p-2 d-flex rounded-circle\"\n @click.prevent=\"toggleNode\"\n >\n <Icon name=\"arrow-right\" :size=\"16\" style=\"transform: rotate(90deg)\" />\n </a>\n <a\n v-else\n href=\"\"\n class=\"text-dark me-1 pis-hover p-2 d-flex rounded-circle\"\n @click.prevent=\"toggleNode\"\n >\n <Icon name=\"arrow-right\" :size=\"16\" />\n </a>\n </template>\n </template>\n <div class=\"form-check d-flex\">\n <input\n :id=\"'cid_' + item.cid\"\n class=\"form-check-input me-2\"\n type=\"checkbox\"\n :checked=\"isSelected\"\n :disabled=\"!item.selectable\"\n @change=\"toggleSelection\"\n />\n <label\n :for=\"'cid_' + item.cid\"\n class=\"form-check-label user-select-none opacity-100 d-flex align-items-center\"\n :class=\"[item.match && 'bg-light']\"\n @dblclick.prevent=\"toggleNode\"\n >\n <div v-if=\"isValidPg\" class=\"text-primary pis-hover rounded-2 text-nowrap px-1\">\n <Tooltip\n trigger=\"hover\"\n :delay=\"200\"\n :text=\"item.productGroup.code + ' - ' + item.productGroup.name\"\n >\n {{ item.name }}\n </Tooltip>\n </div>\n\n <div v-else class=\"pis-hover text-nowrap rounded-2 px-1\">\n {{ item.name }}\n </div>\n </label>\n <div v-if=\"isInvalidPg\">\n <Tooltip trigger=\"hover\" :text=\"t('InvalidProductGroup')\" :delay=\"100\">\n <Icon name=\"warning-triangle\" :size=\"16\" class=\"ms-1 text-warning\" />\n </Tooltip>\n </div>\n <div v-else-if=\"areFavoritesEnabled\" class=\"ms-1\">\n <Tooltip trigger=\"hover\" :text=\"t('FavoritesTooltip')\" :delay=\"100\">\n <a\n href=\"#\"\n class=\"pis-hover p-1 d-flex rounded-circle\"\n :class=\"[isFavorite && 'text-warning', !isFavorite && 'text-secondary']\"\n @click.prevent=\"toggleFavorite\"\n >\n <Icon name=\"star\" :size=\"16\" />\n </a>\n </Tooltip>\n </div>\n </div>\n </div>\n <TransitionHeight>\n <ul v-if=\"item.children && isExpanded\" class=\"pis-tree\">\n <ClassificationNode\n v-for=\"child in item.children\"\n :key=\"child.cid\"\n :item=\"child\"\n :t=\"t\"\n :instance-id=\"instanceId\"\n ></ClassificationNode>\n </ul>\n </TransitionHeight>\n </li>\n</template>\n\n<script lang=\"ts\">\nimport { PropType, computed, defineComponent } from 'vue';\n\nimport TransitionHeight from './TransitionHeight.vue';\n\nimport {\n AddFavoriteCommand,\n CollapseNodeCommand,\n DeselectCommand,\n ExpandNodeCommand,\n RemoveFavoriteCommand,\n SelectCommand,\n} from '@/classifications/api/runtime/CommandExecutor';\nimport { findTabById } from '@/classifications/api/runtime/normalizeTabOptions';\nimport { TranslateFunc } from '@/classifications/composables/setupComponent';\nimport PIS from '@/common/api/PisGlobal';\nimport Icon from '@/common/components/Icon.vue';\nimport Tooltip from '@/common/components/Tooltip.vue';\nimport {\n ClassificationsBrowserNode,\n ClassificationsBrowserTreeViewEnum,\n ProductGroupValidationStatusEnum,\n} from '@/common/services/swagger';\n\nexport default defineComponent({\n name: 'ClassificationNode',\n components: { Icon, Tooltip, TransitionHeight },\n props: {\n item: { type: Object as () => ClassificationsBrowserNode, required: true },\n t: { type: Function as PropType<TranslateFunc>, required: true },\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const isExpanded = computed(() => props.item['_isExpanded']);\n const isLoading = computed(() => props.item['_isLoading']);\n const instance = computed(() => PIS.Classifications.getInstance(props.instanceId));\n\n const selection = computed(() => instance.value?.selection);\n const favorites = computed(() => instance.value?.favorites);\n const isSelected = computed(() => selection.value?.isSelected(props.item));\n const isFavorite = computed(() => favorites.value?.isSelected(props.item));\n const areFavoritesEnabled = computed<boolean>(() =>\n (instance.value?.getOptions().components?.browser?.tabs?.items || []).some(\n (tab) => tab.type === ClassificationsBrowserTreeViewEnum.FAVORITES,\n ),\n );\n\n const isInvalidPg = computed(\n () => props.item.productGroup?.status === ProductGroupValidationStatusEnum.INVALID,\n );\n\n const isValidPg = computed(\n () => props.item.productGroup?.status === ProductGroupValidationStatusEnum.VALID,\n );\n\n const activeTab = computed(() => {\n const route = instance.value?.getRouteData();\n const tabs = instance.value?.getOptions().components?.browser?.tabs?.items ?? [];\n return findTabById(tabs, route?.tabId);\n });\n\n const isLeaf = computed(() =>\n activeTab.value?.type === ClassificationsBrowserTreeViewEnum.FAVORITES &&\n !activeTab.value?.itemsExpandable\n ? !props.item.children\n : props.item.leaf,\n );\n\n const toggleNode = async () => {\n if (props.item.leaf) {\n return;\n }\n try {\n if (isExpanded.value) {\n await instance.value?.execute(\n new CollapseNodeCommand({ item: props.item }).from('classifications-tree'),\n );\n } else {\n await instance.value?.execute(\n new ExpandNodeCommand({ item: props.item }).from('classifications-tree'),\n );\n }\n } catch {\n // Ignore error\n }\n };\n\n const toggleSelection = async () => {\n try {\n if (selection.value?.isSelected(props.item)) {\n await instance.value?.execute(\n new DeselectCommand({ item: props.item }).from('classifications-tree'),\n );\n } else {\n await instance.value?.execute(\n new SelectCommand({ item: props.item }).from('classifications-tree'),\n );\n }\n } catch {\n // Ignore error\n }\n };\n\n const toggleFavorite = async () => {\n try {\n if (favorites.value?.isSelected(props.item)) {\n await instance.value?.execute(\n new RemoveFavoriteCommand({ item: props.item }).from('classifications-tree'),\n );\n } else {\n await instance.value?.execute(\n new AddFavoriteCommand({ item: props.item }).from('classifications-tree'),\n );\n }\n } catch {\n // Ignore error\n }\n };\n\n return {\n isExpanded,\n isLoading,\n isSelected,\n isFavorite,\n isInvalidPg,\n isValidPg,\n selection,\n areFavoritesEnabled,\n activeTab,\n isLeaf,\n toggleNode,\n toggleSelection,\n toggleFavorite,\n };\n },\n});\n</script>\n","<template>\n <ul class=\"pis-tree ps-0\">\n <ClassificationNode\n v-for=\"item in items\"\n :key=\"item.cid\"\n :item=\"item\"\n :instance-id=\"instanceId\"\n :t=\"t\"\n ></ClassificationNode>\n </ul>\n</template>\n\n<script lang=\"ts\">\nimport { PropType, defineComponent } from 'vue';\n\nimport ClassificationNode from './ClassificationNode.vue';\n\nimport { TranslateFunc } from '@/classifications/composables/setupComponent';\nimport { ClassificationsBrowserNode } from '@/common/services/swagger';\n\nexport default defineComponent({\n components: { ClassificationNode },\n props: {\n items: { type: Object as () => ClassificationsBrowserNode[], required: true },\n t: { type: Function as PropType<TranslateFunc>, required: true },\n instanceId: { type: String, required: true },\n },\n\n setup() {\n return {};\n },\n});\n</script>\n","<template>\n <ul class=\"pis-tree ps-0\">\n <ClassificationNode\n v-for=\"item in items\"\n :key=\"item.cid\"\n :item=\"item\"\n :instance-id=\"instanceId\"\n :t=\"t\"\n ></ClassificationNode>\n </ul>\n</template>\n\n<script lang=\"ts\">\nimport { PropType, defineComponent } from 'vue';\n\nimport ClassificationNode from './ClassificationNode.vue';\n\nimport { TranslateFunc } from '@/classifications/composables/setupComponent';\nimport { ClassificationsBrowserNode } from '@/common/services/swagger';\n\nexport default defineComponent({\n components: { ClassificationNode },\n props: {\n items: { type: Object as () => ClassificationsBrowserNode[], required: true },\n t: { type: Function as PropType<TranslateFunc>, required: true },\n instanceId: { type: String, required: true },\n },\n\n setup() {\n return {};\n },\n});\n</script>\n","<template>\n <div\n v-show=\"componentOptions.visible\"\n ref=\"root\"\n class=\"pis-component\"\n :class=\"componentName\"\n style=\"z-index: 1\"\n >\n <template v-if=\"isReady\">\n <div class=\"d-flex\">\n <div class=\"flex-grow-1 fw-bold\">\n {{ t('SelectLabel') }}\n </div>\n <a href=\"#\" class=\"small text-end\" @click.prevent=\"collapseAll\">\n {{ t('CollapseAllClassifications') }}\n </a>\n <a\n v-if=\"isExpandFavoritesVisible\"\n href=\"#\"\n class=\"small ms-2 text-end\"\n @click.prevent=\"expandAll\"\n >\n {{ t('ExpandAllFavorites') }}\n </a>\n </div>\n\n <div class=\"overflow-auto border p-1\" :style=\"{ height: height }\">\n <div v-if=\"isLimitExceeded\" class=\"p-3 mb-1 text-muted\">\n {{ t('SearchLimitExceeded') }}\n </div>\n <div v-if=\"nodes.length\">\n <ClassificationRootNode\n :items=\"nodes\"\n :instance-id=\"instance!.id\"\n :t=\"t\"\n ></ClassificationRootNode>\n </div>\n <div v-else class=\"p-3 text-muted\">\n {{ isOnFavoritesView ? t('NoFavoritesSelected') : t('NoResults') }}\n </div>\n </div>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref, watch } from 'vue';\n\nimport ClassificationRootNode from '../common/ClassificationRootNode.vue';\n\nimport { ClassificationsDataType } from '@/classifications/api/configuration/application/ClassificationsDataType';\nimport { TreeOptions } from '@/classifications/api/configuration/components/TreeOptions';\nimport { TreeTypeTabsOptions } from '@/classifications/api/configuration/components/TreeTypeTabsOptions';\nimport {\n AddNotificationCommand,\n CollapseAllCommand,\n ExpandAllCommand,\n} from '@/classifications/api/runtime/CommandExecutor';\nimport { Data } from '@/classifications/api/runtime/Data';\nimport { findTabById } from '@/classifications/api/runtime/normalizeTabOptions';\nimport { setupComponent } from '@/classifications/composables/setupComponent';\nimport { debounce } from '@/common/helpers/debounce';\nimport {\n ClassificationsBrowserTreeTypeEnum,\n ClassificationsBrowserTreeViewEnum,\n} from '@/common/services/swagger';\n\nexport default defineComponent({\n name: 'pis-classifications-browser-tree',\n\n components: {\n ClassificationRootNode,\n },\n\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n\n const {\n componentName,\n isReady,\n isWebComponent,\n instance,\n store,\n routeData,\n narrowerThan,\n emit,\n t,\n } = setupComponent(root, props.instanceId, [ClassificationsDataType.Classifications]);\n\n const validationWarnings = ref<string[]>([]);\n\n const tabTypes = computed(\n () =>\n (store.value?.options.components?.browser?.tabs ?? ({} as TreeTypeTabsOptions))?.items?.map(\n (tab) => tab.type,\n ) ?? [],\n );\n\n const componentOptions = computed(\n () => store.value?.options.components?.browser?.tree ?? ({} as TreeOptions),\n );\n\n const nodes = computed(() => {\n if (\n isOnFavoritesView.value &&\n tabTypes.value.indexOf(ClassificationsBrowserTreeViewEnum.PRODUCT_LINE) < 0\n )\n return (\n store.value?.data.classifications?.items?.filter(\n (x) => x.tree != ClassificationsBrowserTreeTypeEnum.PRODUCT_LINE,\n ) ?? []\n );\n else return store.value?.data.classifications?.items ?? [];\n });\n const isLimitExceeded = computed(() => store.value?.data.classifications?.limitExceeded);\n const activeTab = computed(() =>\n findTabById(\n store.value?.options.components?.browser?.tabs?.items ?? [],\n routeData.value?.tabId,\n ),\n );\n const isOnFavoritesView = computed(\n () => activeTab.value?.type === ClassificationsBrowserTreeViewEnum.FAVORITES,\n );\n\n const isExpandFavoritesVisible = computed(\n () =>\n isOnFavoritesView.value &&\n store.value?.options.components?.browser?.common?.toolbar?.expandFavoritesVisible,\n );\n\n const collapseAll = async () => {\n try {\n await instance.value?.execute(new CollapseAllCommand().from(componentName));\n } catch {\n // ignored\n }\n };\n\n const expandAll = async () => {\n try {\n await instance.value?.execute(new ExpandAllCommand().from(componentName));\n } catch {\n // ignored\n }\n };\n\n const height = computed(() =>\n narrowerThan('sm')\n ? componentOptions.value.mobileScrollHeight + 'px'\n : componentOptions.value.scrollHeight + 'px',\n );\n\n const onWarningsUpdated = debounce(() => {\n try {\n if (validationWarnings.value.length) {\n instance.value?.execute(\n new AddNotificationCommand({\n message: validationWarnings.value.join('<br>'),\n type: 'warning',\n dismissAfter: 0,\n }).from(componentName),\n );\n validationWarnings.value = [];\n }\n } catch {\n // Ignore error\n }\n }, 500);\n\n const unwatchInvalidSelectionsWatcher = watch(\n () => instance.value?.store.data.invalidSelectedItems,\n async () => {\n const invalidSelectedItems: Data['invalidSelectedItems'] =\n instance.value?.store.data.invalidSelectedItems;\n if (invalidSelectedItems && invalidSelectedItems?.length) {\n unwatchInvalidSelectionsWatcher();\n validationWarnings.value.push(\n t('InvalidSelectedItemsWarning', false, [\n invalidSelectedItems.map((item) => item.cid).join(', '),\n ]),\n );\n onWarningsUpdated();\n }\n },\n { immediate: true },\n );\n\n const unwatchInvalidFavoritesWatcher = watch(\n () => instance.value?.store.data.invalidFavoriteItems,\n async () => {\n const invalidFavoriteItems: Data['invalidFavoriteItems'] =\n instance.value?.store.data.invalidFavoriteItems;\n if (invalidFavoriteItems && invalidFavoriteItems?.length) {\n unwatchInvalidFavoritesWatcher();\n validationWarnings.value.push(\n t('InvalidFavoriteItemsWarning', false, [\n invalidFavoriteItems.map((item) => item.cid).join(', '),\n ]),\n );\n onWarningsUpdated();\n }\n },\n { immediate: true },\n );\n\n return {\n root,\n store,\n nodes,\n height,\n isReady,\n instance,\n routeData,\n componentName,\n isWebComponent,\n isLimitExceeded,\n componentOptions,\n isOnFavoritesView,\n isExpandFavoritesVisible,\n t,\n emit,\n collapseAll,\n expandAll,\n };\n },\n});\n</script>\n","<template>\n <div\n v-show=\"componentOptions.visible\"\n ref=\"root\"\n class=\"pis-component\"\n :class=\"componentName\"\n style=\"z-index: 1\"\n >\n <template v-if=\"isReady\">\n <div class=\"d-flex\">\n <div class=\"flex-grow-1 fw-bold\">\n {{ t('SelectLabel') }}\n </div>\n <a href=\"#\" class=\"small text-end\" @click.prevent=\"collapseAll\">\n {{ t('CollapseAllClassifications') }}\n </a>\n <a\n v-if=\"isExpandFavoritesVisible\"\n href=\"#\"\n class=\"small ms-2 text-end\"\n @click.prevent=\"expandAll\"\n >\n {{ t('ExpandAllFavorites') }}\n </a>\n </div>\n\n <div class=\"overflow-auto border p-1\" :style=\"{ height: height }\">\n <div v-if=\"isLimitExceeded\" class=\"p-3 mb-1 text-muted\">\n {{ t('SearchLimitExceeded') }}\n </div>\n <div v-if=\"nodes.length\">\n <ClassificationRootNode\n :items=\"nodes\"\n :instance-id=\"instance!.id\"\n :t=\"t\"\n ></ClassificationRootNode>\n </div>\n <div v-else class=\"p-3 text-muted\">\n {{ isOnFavoritesView ? t('NoFavoritesSelected') : t('NoResults') }}\n </div>\n </div>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref, watch } from 'vue';\n\nimport ClassificationRootNode from '../common/ClassificationRootNode.vue';\n\nimport { ClassificationsDataType } from '@/classifications/api/configuration/application/ClassificationsDataType';\nimport { TreeOptions } from '@/classifications/api/configuration/components/TreeOptions';\nimport { TreeTypeTabsOptions } from '@/classifications/api/configuration/components/TreeTypeTabsOptions';\nimport {\n AddNotificationCommand,\n CollapseAllCommand,\n ExpandAllCommand,\n} from '@/classifications/api/runtime/CommandExecutor';\nimport { Data } from '@/classifications/api/runtime/Data';\nimport { findTabById } from '@/classifications/api/runtime/normalizeTabOptions';\nimport { setupComponent } from '@/classifications/composables/setupComponent';\nimport { debounce } from '@/common/helpers/debounce';\nimport {\n ClassificationsBrowserTreeTypeEnum,\n ClassificationsBrowserTreeViewEnum,\n} from '@/common/services/swagger';\n\nexport default defineComponent({\n name: 'pis-classifications-browser-tree',\n\n components: {\n ClassificationRootNode,\n },\n\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n\n const {\n componentName,\n isReady,\n isWebComponent,\n instance,\n store,\n routeData,\n narrowerThan,\n emit,\n t,\n } = setupComponent(root, props.instanceId, [ClassificationsDataType.Classifications]);\n\n const validationWarnings = ref<string[]>([]);\n\n const tabTypes = computed(\n () =>\n (store.value?.options.components?.browser?.tabs ?? ({} as TreeTypeTabsOptions))?.items?.map(\n (tab) => tab.type,\n ) ?? [],\n );\n\n const componentOptions = computed(\n () => store.value?.options.components?.browser?.tree ?? ({} as TreeOptions),\n );\n\n const nodes = computed(() => {\n if (\n isOnFavoritesView.value &&\n tabTypes.value.indexOf(ClassificationsBrowserTreeViewEnum.PRODUCT_LINE) < 0\n )\n return (\n store.value?.data.classifications?.items?.filter(\n (x) => x.tree != ClassificationsBrowserTreeTypeEnum.PRODUCT_LINE,\n ) ?? []\n );\n else return store.value?.data.classifications?.items ?? [];\n });\n const isLimitExceeded = computed(() => store.value?.data.classifications?.limitExceeded);\n const activeTab = computed(() =>\n findTabById(\n store.value?.options.components?.browser?.tabs?.items ?? [],\n routeData.value?.tabId,\n ),\n );\n const isOnFavoritesView = computed(\n () => activeTab.value?.type === ClassificationsBrowserTreeViewEnum.FAVORITES,\n );\n\n const isExpandFavoritesVisible = computed(\n () =>\n isOnFavoritesView.value &&\n store.value?.options.components?.browser?.common?.toolbar?.expandFavoritesVisible,\n );\n\n const collapseAll = async () => {\n try {\n await instance.value?.execute(new CollapseAllCommand().from(componentName));\n } catch {\n // ignored\n }\n };\n\n const expandAll = async () => {\n try {\n await instance.value?.execute(new ExpandAllCommand().from(componentName));\n } catch {\n // ignored\n }\n };\n\n const height = computed(() =>\n narrowerThan('sm')\n ? componentOptions.value.mobileScrollHeight + 'px'\n : componentOptions.value.scrollHeight + 'px',\n );\n\n const onWarningsUpdated = debounce(() => {\n try {\n if (validationWarnings.value.length) {\n instance.value?.execute(\n new AddNotificationCommand({\n message: validationWarnings.value.join('<br>'),\n type: 'warning',\n dismissAfter: 0,\n }).from(componentName),\n );\n validationWarnings.value = [];\n }\n } catch {\n // Ignore error\n }\n }, 500);\n\n const unwatchInvalidSelectionsWatcher = watch(\n () => instance.value?.store.data.invalidSelectedItems,\n async () => {\n const invalidSelectedItems: Data['invalidSelectedItems'] =\n instance.value?.store.data.invalidSelectedItems;\n if (invalidSelectedItems && invalidSelectedItems?.length) {\n unwatchInvalidSelectionsWatcher();\n validationWarnings.value.push(\n t('InvalidSelectedItemsWarning', false, [\n invalidSelectedItems.map((item) => item.cid).join(', '),\n ]),\n );\n onWarningsUpdated();\n }\n },\n { immediate: true },\n );\n\n const unwatchInvalidFavoritesWatcher = watch(\n () => instance.value?.store.data.invalidFavoriteItems,\n async () => {\n const invalidFavoriteItems: Data['invalidFavoriteItems'] =\n instance.value?.store.data.invalidFavoriteItems;\n if (invalidFavoriteItems && invalidFavoriteItems?.length) {\n unwatchInvalidFavoritesWatcher();\n validationWarnings.value.push(\n t('InvalidFavoriteItemsWarning', false, [\n invalidFavoriteItems.map((item) => item.cid).join(', '),\n ]),\n );\n onWarningsUpdated();\n }\n },\n { immediate: true },\n );\n\n return {\n root,\n store,\n nodes,\n height,\n isReady,\n instance,\n routeData,\n componentName,\n isWebComponent,\n isLimitExceeded,\n componentOptions,\n isOnFavoritesView,\n isExpandFavoritesVisible,\n t,\n emit,\n collapseAll,\n expandAll,\n };\n },\n});\n</script>\n","<template>\n <div v-show=\"visible\" ref=\"root\" class=\"pis-component position-relative\" :class=\"componentName\">\n <template v-if=\"isReady\">\n <div class=\"mb-3\">\n <ul class=\"nav nav-tabs\">\n <li v-for=\"tab in visibleTabs\" :key=\"tab.id\" class=\"nav-item\" style=\"max-width: 33%\">\n <a\n class=\"nav-link mx-1 text-nowrap pis-text-ellipsis\"\n :class=\"activeTabKey === tab.id ? 'active' : ''\"\n href=\"#\"\n @click.prevent=\"switchToView(tab)\"\n >\n <MountPoint\n v-if=\"narrowerThan('md') && tab.iconTemplate\"\n :callbacks=\"tab.iconTemplate\"\n :ctx=\"tabContext(tab)\"\n />\n <Icon\n v-else-if=\"narrowerThan('md') && tab.type === 'Favorites'\"\n class=\"px-2\"\n name=\"star\"\n :size=\"16\"\n />\n <MountPoint\n v-else-if=\"tab.labelTemplate\"\n :callbacks=\"tab.labelTemplate\"\n :ctx=\"tabContext(tab)\"\n />\n <span v-else>{{ t(translationMap[tab.type]) }}</span>\n <span\n v-if=\"tab.countsVisible && getCount(tab.type) > 0\"\n class=\"badge rounded-pill bg-secondary text-body ms-1 small d-none d-sm-inline\"\n >\n {{ getCount(tab.type) }}\n </span>\n </a>\n </li>\n </ul>\n </div>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref } from 'vue';\n\nimport { TabOption } from '@/classifications/api/configuration/components/TabOption';\nimport { TreeTypeTabsOptions } from '@/classifications/api/configuration/components/TreeTypeTabsOptions';\nimport { SetTabCommand } from '@/classifications/api/runtime/CommandExecutor';\nimport { setupComponent } from '@/classifications/composables/setupComponent';\nimport type { ClassificationsBrowserTreeViewEnum } from '@/common/api/components/optionValueTypes';\nimport Icon from '@/common/components/Icon.vue';\nimport MountPoint from '@/common/components/MountPoint.vue';\nimport { reactiveContextCache } from '@/common/composables/useReactiveContext';\nimport { ClassificationsBrowserTreeTypeEnum } from '@/common/services/swagger';\n\nexport default defineComponent({\n name: 'pis-classifications-browser-tree-type-tabs',\n components: {\n Icon,\n MountPoint,\n },\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n const { componentName, instance, isReady, isWebComponent, store, t, narrowerThan } =\n setupComponent(root, props.instanceId);\n\n const translationMap: Record<ClassificationsBrowserTreeViewEnum, string> = {\n Offering: 'OfferingTree',\n ProductLine: 'ProductLineTree',\n Favorites: 'MyFavorites',\n OfferingAndProductLine: 'OfferingAndProductLine',\n };\n\n const getCount = (mode: ClassificationsBrowserTreeViewEnum) => {\n switch (mode) {\n case 'Offering':\n return (\n instance.value?.selection.selectedItems.filter(\n (a) => a.tree == ClassificationsBrowserTreeTypeEnum.OFFERING,\n ).length ?? 0\n );\n case 'ProductLine':\n return (\n instance.value?.selection.selectedItems.filter(\n (a) => a.tree == ClassificationsBrowserTreeTypeEnum.PRODUCT_LINE,\n ).length ?? 0\n );\n case 'Favorites':\n return instance.value?.favorites.selectedItems.length ?? 0;\n default:\n return 0;\n }\n };\n\n const componentOptions = computed<TreeTypeTabsOptions | undefined>(\n () => store.value?.options.components?.browser?.tabs ?? ({} as TreeTypeTabsOptions),\n );\n\n const routeData = computed(() => instance.value?.router.routeData);\n\n const activeTabKey = computed(() => routeData.value?.tabId);\n\n const visibleTabs = computed<TabOption[]>(() =>\n (componentOptions.value?.items ?? []).filter((tab) => tab.visible !== false),\n );\n\n const tabContext = reactiveContextCache((tab: TabOption) => ({\n instance: instance.value,\n tab,\n t,\n }));\n\n const switchToView = async (tab: TabOption) => {\n try {\n await instance.value?.execute(\n new SetTabCommand({ tabId: tab.id ?? tab.type }).from(componentName),\n );\n } catch {\n // Ignore error\n }\n };\n\n const visible = computed(() => componentOptions.value?.visible);\n\n return {\n root,\n visible,\n store,\n isReady,\n activeTabKey,\n visibleTabs,\n componentName,\n isWebComponent,\n translationMap,\n componentOptions,\n t,\n switchToView,\n narrowerThan,\n getCount,\n tabContext,\n };\n },\n});\n</script>\n","<template>\n <div v-show=\"visible\" ref=\"root\" class=\"pis-component position-relative\" :class=\"componentName\">\n <template v-if=\"isReady\">\n <div class=\"mb-3\">\n <ul class=\"nav nav-tabs\">\n <li v-for=\"tab in visibleTabs\" :key=\"tab.id\" class=\"nav-item\" style=\"max-width: 33%\">\n <a\n class=\"nav-link mx-1 text-nowrap pis-text-ellipsis\"\n :class=\"activeTabKey === tab.id ? 'active' : ''\"\n href=\"#\"\n @click.prevent=\"switchToView(tab)\"\n >\n <MountPoint\n v-if=\"narrowerThan('md') && tab.iconTemplate\"\n :callbacks=\"tab.iconTemplate\"\n :ctx=\"tabContext(tab)\"\n />\n <Icon\n v-else-if=\"narrowerThan('md') && tab.type === 'Favorites'\"\n class=\"px-2\"\n name=\"star\"\n :size=\"16\"\n />\n <MountPoint\n v-else-if=\"tab.labelTemplate\"\n :callbacks=\"tab.labelTemplate\"\n :ctx=\"tabContext(tab)\"\n />\n <span v-else>{{ t(translationMap[tab.type]) }}</span>\n <span\n v-if=\"tab.countsVisible && getCount(tab.type) > 0\"\n class=\"badge rounded-pill bg-secondary text-body ms-1 small d-none d-sm-inline\"\n >\n {{ getCount(tab.type) }}\n </span>\n </a>\n </li>\n </ul>\n </div>\n </template>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref } from 'vue';\n\nimport { TabOption } from '@/classifications/api/configuration/components/TabOption';\nimport { TreeTypeTabsOptions } from '@/classifications/api/configuration/components/TreeTypeTabsOptions';\nimport { SetTabCommand } from '@/classifications/api/runtime/CommandExecutor';\nimport { setupComponent } from '@/classifications/composables/setupComponent';\nimport type { ClassificationsBrowserTreeViewEnum } from '@/common/api/components/optionValueTypes';\nimport Icon from '@/common/components/Icon.vue';\nimport MountPoint from '@/common/components/MountPoint.vue';\nimport { reactiveContextCache } from '@/common/composables/useReactiveContext';\nimport { ClassificationsBrowserTreeTypeEnum } from '@/common/services/swagger';\n\nexport default defineComponent({\n name: 'pis-classifications-browser-tree-type-tabs',\n components: {\n Icon,\n MountPoint,\n },\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n const { componentName, instance, isReady, isWebComponent, store, t, narrowerThan } =\n setupComponent(root, props.instanceId);\n\n const translationMap: Record<ClassificationsBrowserTreeViewEnum, string> = {\n Offering: 'OfferingTree',\n ProductLine: 'ProductLineTree',\n Favorites: 'MyFavorites',\n OfferingAndProductLine: 'OfferingAndProductLine',\n };\n\n const getCount = (mode: ClassificationsBrowserTreeViewEnum) => {\n switch (mode) {\n case 'Offering':\n return (\n instance.value?.selection.selectedItems.filter(\n (a) => a.tree == ClassificationsBrowserTreeTypeEnum.OFFERING,\n ).length ?? 0\n );\n case 'ProductLine':\n return (\n instance.value?.selection.selectedItems.filter(\n (a) => a.tree == ClassificationsBrowserTreeTypeEnum.PRODUCT_LINE,\n ).length ?? 0\n );\n case 'Favorites':\n return instance.value?.favorites.selectedItems.length ?? 0;\n default:\n return 0;\n }\n };\n\n const componentOptions = computed<TreeTypeTabsOptions | undefined>(\n () => store.value?.options.components?.browser?.tabs ?? ({} as TreeTypeTabsOptions),\n );\n\n const routeData = computed(() => instance.value?.router.routeData);\n\n const activeTabKey = computed(() => routeData.value?.tabId);\n\n const visibleTabs = computed<TabOption[]>(() =>\n (componentOptions.value?.items ?? []).filter((tab) => tab.visible !== false),\n );\n\n const tabContext = reactiveContextCache((tab: TabOption) => ({\n instance: instance.value,\n tab,\n t,\n }));\n\n const switchToView = async (tab: TabOption) => {\n try {\n await instance.value?.execute(\n new SetTabCommand({ tabId: tab.id ?? tab.type }).from(componentName),\n );\n } catch {\n // Ignore error\n }\n };\n\n const visible = computed(() => componentOptions.value?.visible);\n\n return {\n root,\n visible,\n store,\n isReady,\n activeTabKey,\n visibleTabs,\n componentName,\n isWebComponent,\n translationMap,\n componentOptions,\n t,\n switchToView,\n narrowerThan,\n getCount,\n tabContext,\n };\n },\n});\n</script>\n","<template>\n <div ref=\"root\" class=\"pis-component position-relative\">\n <template v-if=\"showOverlay\">\n <div class=\"position-absolute start-50 top-50\" style=\"z-index: 2000\">\n <slot name=\"loader\">\n <Spinner />\n </slot>\n </div>\n <div\n class=\"position-absolute top-0 start-0 end-0 bottom-0 bg-body\"\n style=\"z-index: 1900; opacity: 0.2\"\n />\n </template>\n\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref } from 'vue';\n\nimport { setupComponent } from '@/classifications/composables/setupComponent';\nimport Spinner from '@/common/components/Spinner.vue';\nimport { useDelayedOverlay } from '@/common/composables/useDelayedLoading';\n\nexport default defineComponent({\n name: 'pis-classifications-loading-indicator',\n\n components: {\n Spinner,\n },\n\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n\n const { componentName, isReady, isWebComponent, store, routeData } = setupComponent(\n root,\n props.instanceId,\n );\n\n // Anti-flash: reloading over an existing tree delays the overlay; a\n // content-less first load shows it immediately. isReady is folded into\n // the loading input so an unready instance always keeps the overlay down.\n const isLoading = computed(() => isReady.value && !!store.value?.data.isLoadingData);\n const hasContent = computed(() => !!store.value?.data.classifications?.items?.length);\n const showOverlay = useDelayedOverlay(isLoading, hasContent);\n\n return {\n root,\n componentName,\n isReady,\n isWebComponent,\n store,\n routeData,\n showOverlay,\n };\n },\n});\n</script>\n","<template>\n <div ref=\"root\" class=\"pis-component position-relative\">\n <template v-if=\"showOverlay\">\n <div class=\"position-absolute start-50 top-50\" style=\"z-index: 2000\">\n <slot name=\"loader\">\n <Spinner />\n </slot>\n </div>\n <div\n class=\"position-absolute top-0 start-0 end-0 bottom-0 bg-body\"\n style=\"z-index: 1900; opacity: 0.2\"\n />\n </template>\n\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref } from 'vue';\n\nimport { setupComponent } from '@/classifications/composables/setupComponent';\nimport Spinner from '@/common/components/Spinner.vue';\nimport { useDelayedOverlay } from '@/common/composables/useDelayedLoading';\n\nexport default defineComponent({\n name: 'pis-classifications-loading-indicator',\n\n components: {\n Spinner,\n },\n\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n\n const { componentName, isReady, isWebComponent, store, routeData } = setupComponent(\n root,\n props.instanceId,\n );\n\n // Anti-flash: reloading over an existing tree delays the overlay; a\n // content-less first load shows it immediately. isReady is folded into\n // the loading input so an unready instance always keeps the overlay down.\n const isLoading = computed(() => isReady.value && !!store.value?.data.isLoadingData);\n const hasContent = computed(() => !!store.value?.data.classifications?.items?.length);\n const showOverlay = useDelayedOverlay(isLoading, hasContent);\n\n return {\n root,\n componentName,\n isReady,\n isWebComponent,\n store,\n routeData,\n showOverlay,\n };\n },\n});\n</script>\n","<template>\n <div ref=\"root\" class=\"pis-component w-100 h-100\" :class=\"componentName\">\n <div v-show=\"isReady\">\n <ClassificationsNotifications></ClassificationsNotifications>\n\n <LoadingIndicator>\n <div class=\"container-fluid g-0\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <ClassificationNote :t=\"t\"></ClassificationNote>\n <ClassificationsTreeTabs></ClassificationsTreeTabs>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6 col-sm-12 mb-3\">\n <ClassificationsSearchForm></ClassificationsSearchForm>\n </div>\n <div class=\"col-md-6 col-sm-12 text-end mb-3\">\n <ClassificationActions></ClassificationActions>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-md-6 mb-3\">\n <ClassificationsTree></ClassificationsTree>\n </div>\n <div class=\"col-md-6\">\n <ClassificationsSelection></ClassificationsSelection>\n </div>\n </div>\n </div>\n </LoadingIndicator>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, ref, computed } from 'vue';\n\n// Components\nimport ClassificationsSearchForm from './browser/ClassificationsSearchForm.vue';\nimport ClassificationsSelection from './browser/ClassificationsSelection.vue';\nimport ClassificationsTree from './browser/ClassificationsTree.vue';\nimport ClassificationsTreeTabs from './browser/ClassificationsTreeTabs.vue';\nimport LoadingIndicator from './ClassificationsLoadingIndicator.vue';\nimport ClassificationsNotifications from './common/ClassificationsNotifications.vue';\n\nimport ClassificationActions from '@/classifications/components/browser/ClassificationActions.vue';\nimport ClassificationNote from '@/classifications/components/browser/ClassificationNote.vue';\nimport { setupComponent } from '@/classifications/composables/setupComponent';\n\nexport default defineComponent({\n name: 'pis-classifications-layout',\n\n components: {\n LoadingIndicator,\n ClassificationsSearchForm,\n ClassificationsTree,\n ClassificationsSelection,\n ClassificationNote,\n ClassificationActions,\n ClassificationsTreeTabs,\n ClassificationsNotifications,\n },\n\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n\n const {\n componentName,\n instance,\n isWebComponent,\n isReady,\n translationsReady,\n store,\n routeData,\n widerThan,\n t,\n } = setupComponent(root, props.instanceId);\n\n const allowMobileView = computed(() => store.value?.options.allowMobileView);\n\n return {\n root,\n componentName,\n isWebComponent,\n isReady,\n instance,\n translationsReady,\n store,\n routeData,\n allowMobileView,\n widerThan,\n t,\n };\n },\n});\n</script>\n","<template>\n <div ref=\"root\" class=\"pis-component w-100 h-100\" :class=\"componentName\">\n <div v-show=\"isReady\">\n <ClassificationsNotifications></ClassificationsNotifications>\n\n <LoadingIndicator>\n <div class=\"container-fluid g-0\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <ClassificationNote :t=\"t\"></ClassificationNote>\n <ClassificationsTreeTabs></ClassificationsTreeTabs>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-6 col-sm-12 mb-3\">\n <ClassificationsSearchForm></ClassificationsSearchForm>\n </div>\n <div class=\"col-md-6 col-sm-12 text-end mb-3\">\n <ClassificationActions></ClassificationActions>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-md-6 mb-3\">\n <ClassificationsTree></ClassificationsTree>\n </div>\n <div class=\"col-md-6\">\n <ClassificationsSelection></ClassificationsSelection>\n </div>\n </div>\n </div>\n </LoadingIndicator>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, ref, computed } from 'vue';\n\n// Components\nimport ClassificationsSearchForm from './browser/ClassificationsSearchForm.vue';\nimport ClassificationsSelection from './browser/ClassificationsSelection.vue';\nimport ClassificationsTree from './browser/ClassificationsTree.vue';\nimport ClassificationsTreeTabs from './browser/ClassificationsTreeTabs.vue';\nimport LoadingIndicator from './ClassificationsLoadingIndicator.vue';\nimport ClassificationsNotifications from './common/ClassificationsNotifications.vue';\n\nimport ClassificationActions from '@/classifications/components/browser/ClassificationActions.vue';\nimport ClassificationNote from '@/classifications/components/browser/ClassificationNote.vue';\nimport { setupComponent } from '@/classifications/composables/setupComponent';\n\nexport default defineComponent({\n name: 'pis-classifications-layout',\n\n components: {\n LoadingIndicator,\n ClassificationsSearchForm,\n ClassificationsTree,\n ClassificationsSelection,\n ClassificationNote,\n ClassificationActions,\n ClassificationsTreeTabs,\n ClassificationsNotifications,\n },\n\n props: {\n instanceId: { type: String, default: undefined },\n },\n\n setup(props) {\n const root = ref<HTMLElement>();\n\n const {\n componentName,\n instance,\n isWebComponent,\n isReady,\n translationsReady,\n store,\n routeData,\n widerThan,\n t,\n } = setupComponent(root, props.instanceId);\n\n const allowMobileView = computed(() => store.value?.options.allowMobileView);\n\n return {\n root,\n componentName,\n isWebComponent,\n isReady,\n instance,\n translationsReady,\n store,\n routeData,\n allowMobileView,\n widerThan,\n t,\n };\n },\n});\n</script>\n","// Shadow-DOM reduction: the instance host ships as a NATIVE custom element\n// now (../elements/nativeElements.ts) — removed from this Vue registry.\n// ClassificationsLayout.vue imports the loading indicator SFC directly (the\n// loader tag is also registered natively — it completes the tag's documented\n// registration; see nativeElements.ts).\nimport ClassificationsNotifications from './common/ClassificationsNotifications.vue';\n\nimport ClassificationActions from '@/classifications/components/browser/ClassificationActions.vue';\nimport ClassificationNote from '@/classifications/components/browser/ClassificationNote.vue';\nimport ClassificationsSearchForm from '@/classifications/components/browser/ClassificationsSearchForm.vue';\nimport ClassificationsSelection from '@/classifications/components/browser/ClassificationsSelection.vue';\nimport ClassificationsTree from '@/classifications/components/browser/ClassificationsTree.vue';\nimport ClassificationsTreeTabs from '@/classifications/components/browser/ClassificationsTreeTabs.vue';\nimport ClassificationsLayout from '@/classifications/components/ClassificationsLayout.vue';\n\nexport default [\n ClassificationsLayout,\n ClassificationsTree,\n ClassificationsSearchForm,\n ClassificationsSelection,\n ClassificationsTreeTabs,\n ClassificationNote,\n ClassificationActions,\n ClassificationsNotifications,\n];\n","import { Instance } from '../api/Instance';\n\nimport PIS from '@/common/api/PisGlobal';\nimport type { NativeElementDefinition } from '@/common/api/registerCustomElements';\nimport { defineNativeElements } from '@/common/elements/defineNativeElements';\nimport type { ClassificationsComponentName as ComponentName } from '@/generated/component-names';\n\n// Shadow-DOM reduction: classifications has no route-gate view wrappers — only\n// `pis-classifications-instance` and `pis-classifications-loading-indicator`\n// convert, declared here as a spec table expanded by\n// common/elements/defineNativeElements.ts. (The loader completes the tag's\n// documented registration: the enum entry, docs, and demo pages already ship\n// it, but it was never added to the Vue components/index.ts registry, so the\n// tag stayed unresolved.)\n//\n// Entry shape is load-bearing for scripts/component-registry.ts: each entry\n// must keep a literal `name:` assigned from a `ComponentName` member (regex\n// source of the shipped-tag registry), and the instance element must stay\n// first — ancestors upgrade before children resolve via closest().\n\nconst getInstanceById = (id: string): Instance | undefined =>\n PIS.Classifications.getInstance(id) as Instance;\n\nconst isReady = (instance: Instance): boolean =>\n !!(instance.store.data.isInitialized && instance.store.data.translationsReady);\n\n// Anti-flash overlay gate: reloading over a loaded classification tree keeps\n// the content visible for the grace period; a content-less load is immediate.\nconst hasContent = (instance: Instance): boolean =>\n !!instance.store.data.classifications?.items?.length;\n\nexport const nativeElements: readonly NativeElementDefinition[] = defineNativeElements<\n Instance,\n string,\n string,\n ComponentName\n>({\n idPrefix: 'pisClassificationsInstance_',\n instanceTag: 'pis-classifications-instance',\n getInstanceById,\n isReady,\n hasContent,\n elements: [\n { kind: 'instance', name: 'pis-classifications-instance' },\n {\n kind: 'loader',\n name: 'pis-classifications-loading-indicator',\n spinnerZIndex: 2000,\n backdropZIndex: 1900,\n backdropOpacity: 0.2,\n },\n ],\n});\n","import { Accessor } from './api/Accessor';\nimport components from './components';\nimport { nativeElements } from './elements/nativeElements';\n\nimport { exposePIS, registerClassificationsAccessor } from '@/common/api/PisGlobal';\nimport { registerCustomElements } from '@/common/api/registerCustomElements';\n\nexport function registerClassifications(): void {\n registerClassificationsAccessor(new Accessor());\n registerCustomElements(components, nativeElements);\n exposePIS();\n}\n\n// Registration is EXPLICIT (C11 follow-up): importing this module defines the\n// registerClassifications() function but does NOT invoke it. The consumer (or\n// the aggregate registerAll()) calls registerClassifications() to register the\n// pis-classifications-* elements. The global pis.js build auto-registers via\n// main.ts.\nexport { components, nativeElements };\nexport { default as PIS } from '@/common/api/PisGlobal';\nexport default components;\n\n// Type-only re-export so the per-domain declaration rollups export the shared\n// item extension surface (vite-plugin-dts only exports entry-exported symbols).\nexport type {\n TemplateItem,\n TemplateItemCustomData,\n} from '@/common/api/components/ComponentTemplateMap';\n\n// Salesforce legacy-adapter contract: applyLegacyOptions() and the documented\n// 'classification-selector-closed' payload reference these types, so they must\n// be importable from the domain entry by integration consumers.\nexport type {\n LegacyEventArgs,\n LegacyEventArgsNode,\n LegacyEventArgsNodeReference,\n LegacyEventType,\n LegacyOptions,\n LegacyParameters,\n LegacyTreeCode,\n} from './api/salesforce/SalesforceLegacy';\n"],"mappings":";;;AAQA,IAAa,IAAb,MAA+C;;EAkE7C,AAjEA,EAAA,MAAA,eAAiD;GAC/C,SAAS;GACT,UAAU;EACZ,CAAA,GAEA,EAAA,MAAA,UAA4B,CAAC,CAAA,GAE7B,EAAA,MAAA,cAA+B,EAC7B,SAAS;GACP,QAAQ,EACN,SAAS;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