@onereach/ui-components 3.0.2-beta.2481.0 → 3.0.2-beta.2641.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundled/v2/{OrCardCollection-1b797c0b.js → OrCardCollection-a7706585.js} +3 -3
- package/dist/bundled/v2/{OrConfirm-98d9a7b0.js → OrConfirm-f14ac69d.js} +1 -1
- package/dist/bundled/v2/{OrIconButton-50f3e359.js → OrIconButton-d427d121.js} +1 -1
- package/dist/bundled/v2/{OrInlineInput-2395a4c6.js → OrInlineInput-916fd2b8.js} +1 -1
- package/dist/bundled/v2/{OrInlineTextarea-5ea9f01a.js → OrInlineTextarea-f26824e4.js} +1 -1
- package/dist/bundled/v2/{OrInput-900df60c.js → OrInput-059a67b6.js} +1 -1
- package/dist/bundled/v2/{OrMenu-cbb0c2c8.js → OrMenu-e1cf47b8.js} +1 -1
- package/dist/bundled/v2/{OrModal-e66519f4.js → OrModal-6cbeb15e.js} +1 -1
- package/dist/bundled/v2/{OrNotification-8a219610.js → OrNotification-8695c59e.js} +1 -1
- package/dist/bundled/v2/{OrPagination-cf47d71c.js → OrPagination-203a86f1.js} +1 -1
- package/dist/bundled/v2/{OrPopover-f3d58fff.js → OrPopover-06448d74.js} +1 -5
- package/dist/bundled/v2/{OrSearch-9d11a3f1.js → OrSearch-a8d4cf95.js} +1 -1
- package/dist/bundled/v2/{OrSelect-0675a404.js → OrSelect-0b9b27e9.js} +4 -4
- package/dist/bundled/v2/{OrSidebar-0509e5f8.js → OrSidebar-0d6177e2.js} +1 -1
- package/dist/bundled/v2/{OrSidebarCollapseButton-3382ea38.js → OrSidebarCollapseButton-730a948a.js} +1 -1
- package/dist/bundled/v2/{OrTabs-10f7e668.js → OrTabs-85d7036a.js} +1 -1
- package/dist/bundled/v2/{OrTag-11c078db.js → OrTag-7879a9fa.js} +1 -1
- package/dist/bundled/v2/{OrTooltip-a2a90db8.js → OrTooltip-e34783de.js} +1 -1
- package/dist/bundled/v2/OrTree-b8e47647.js +236 -0
- package/dist/bundled/v2/components/index.d.ts +1 -0
- package/dist/bundled/v2/components/index.js +20 -19
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +7 -7
- package/dist/bundled/v2/components/or-confirm-v3/index.js +5 -5
- package/dist/bundled/v2/components/or-icon-button-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-inline-input-v3/index.js +4 -4
- package/dist/bundled/v2/components/or-inline-textarea-v3/index.js +4 -4
- package/dist/bundled/v2/components/or-input-v3/index.js +4 -4
- package/dist/bundled/v2/components/or-menu-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-modal-v3/index.js +4 -4
- package/dist/bundled/v2/components/or-notification-v3/index.js +4 -4
- package/dist/bundled/v2/components/or-pagination-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-popover-v3/OrPopover.vue.d.ts +0 -11
- package/dist/bundled/v2/components/or-popover-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-search-v3/index.js +5 -5
- package/dist/bundled/v2/components/or-select-v3/index.js +6 -6
- package/dist/bundled/v2/components/or-sidebar-v3/index.js +5 -5
- package/dist/bundled/v2/components/or-sidebar-v3/partials/index.js +4 -4
- package/dist/bundled/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +4 -4
- package/dist/bundled/v2/components/or-tabs-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-tag-v3/index.js +4 -4
- package/dist/bundled/v2/components/or-toast-v3/index.js +4 -4
- package/dist/bundled/v2/components/or-tooltip-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-tree-v3/OrTree.vue.d.ts +47 -0
- package/dist/bundled/v2/components/or-tree-v3/TreeNode.vue.d.ts +82 -0
- package/dist/bundled/v2/components/or-tree-v3/index.d.ts +2 -0
- package/dist/bundled/v2/components/or-tree-v3/index.js +17 -0
- package/dist/bundled/v2/components/or-tree-v3/styles.d.ts +1 -0
- package/dist/bundled/v2/components/or-tree-v3/types.d.ts +10 -0
- package/dist/bundled/v2/components/or-tree-v3/utils.d.ts +5 -0
- package/dist/bundled/v2/index.js +21 -20
- package/dist/bundled/v2/{types-8d0c1236.js → types-79c4992b.js} +1 -1
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-7dd04efe.js → OrCardCollection.vue_vue_type_script_lang-dda3f349.js} +5 -5
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-9bfe8cdd.js → OrConfirm.vue_vue_type_script_lang-f8a75cf0.js} +2 -2
- package/dist/bundled/v3/{OrIconButton-55238a89.js → OrIconButton-b3e4997b.js} +1 -1
- package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-3aeb76ac.js → OrIconButton.vue_vue_type_script_lang-de03b47c.js} +1 -1
- package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-d1fd44af.js → OrInlineInput.vue_vue_type_script_lang-3d76b4b8.js} +2 -2
- package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-a9e69aff.js → OrInlineTextarea.vue_vue_type_script_lang-5b87295b.js} +2 -2
- package/dist/bundled/v3/{OrInput-d23f9223.js → OrInput-0141dbad.js} +1 -1
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-fde0f78f.js → OrInput.vue_vue_type_script_lang-831761b8.js} +2 -2
- package/dist/bundled/v3/{OrMenu-89afef68.js → OrMenu-97b74f43.js} +1 -1
- package/dist/bundled/v3/{OrMenu.vue_vue_type_script_lang-f6748a99.js → OrMenu.vue_vue_type_script_lang-bff59dcb.js} +2 -2
- package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-63930770.js → OrModal.vue_vue_type_script_lang-87032cf0.js} +2 -2
- package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-b96d5927.js → OrNotification.vue_vue_type_script_lang-10b7460c.js} +2 -2
- package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-7673a00e.js → OrPagination.vue_vue_type_script_lang-8ec07f21.js} +2 -2
- package/dist/bundled/v3/{OrPopover-40d53b57.js → OrPopover-f09c1ad2.js} +1 -1
- package/dist/bundled/v3/{OrPopover.vue_vue_type_script_lang-9bf2361c.js → OrPopover.vue_vue_type_script_lang-1caf28d1.js} +1 -5
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-a298a8cc.js → OrSearch.vue_vue_type_script_lang-afb27ea5.js} +2 -2
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-ee304265.js → OrSelect.vue_vue_type_script_lang-1574d816.js} +5 -5
- package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-123eab91.js → OrSidebar.vue_vue_type_script_lang-bfaee185.js} +1 -1
- package/dist/bundled/v3/{OrSidebarCollapseButton.vue_vue_type_script_lang-d6860d69.js → OrSidebarCollapseButton.vue_vue_type_script_lang-15f995a0.js} +2 -2
- package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-ebd2a59d.js → OrTabs.vue_vue_type_script_lang-4b181fc5.js} +2 -2
- package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-0f6207e6.js → OrTag.vue_vue_type_script_lang-429e76ad.js} +2 -2
- package/dist/bundled/v3/{OrToastContainer-a70f69eb.js → OrToastContainer-056470e4.js} +1 -1
- package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-27591090.js → OrTooltip.vue_vue_type_script_lang-ce2158d0.js} +2 -2
- package/dist/bundled/v3/OrTree.vue_vue_type_script_lang-9a31b9b4.js +146 -0
- package/dist/bundled/v3/components/index.d.ts +1 -0
- package/dist/bundled/v3/components/index.js +24 -23
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +11 -11
- package/dist/bundled/v3/components/or-confirm-v3/index.js +8 -8
- package/dist/bundled/v3/components/or-icon-button-v3/index.js +4 -4
- package/dist/bundled/v3/components/or-inline-input-v3/index.js +6 -6
- package/dist/bundled/v3/components/or-inline-textarea-v3/index.js +6 -6
- package/dist/bundled/v3/components/or-input-v3/index.js +6 -6
- package/dist/bundled/v3/components/or-menu-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-modal-v3/index.js +6 -6
- package/dist/bundled/v3/components/or-notification-v3/index.js +6 -6
- package/dist/bundled/v3/components/or-pagination-v3/index.js +5 -5
- package/dist/bundled/v3/components/or-popover-v3/OrPopover.vue.d.ts +0 -11
- package/dist/bundled/v3/components/or-popover-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-search-v3/index.js +8 -8
- package/dist/bundled/v3/components/or-select-v3/index.js +9 -9
- package/dist/bundled/v3/components/or-sidebar-v3/index.js +7 -7
- package/dist/bundled/v3/components/or-sidebar-v3/partials/index.js +6 -6
- package/dist/bundled/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +6 -6
- package/dist/bundled/v3/components/or-tabs-v3/index.js +5 -5
- package/dist/bundled/v3/components/or-tag-v3/index.js +6 -6
- package/dist/bundled/v3/components/or-toast-v3/index.js +7 -7
- package/dist/bundled/v3/components/or-tooltip-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-tree-v3/OrTree.vue.d.ts +47 -0
- package/dist/bundled/v3/components/or-tree-v3/TreeNode.vue.d.ts +82 -0
- package/dist/bundled/v3/components/or-tree-v3/index.d.ts +2 -0
- package/dist/bundled/v3/components/or-tree-v3/index.js +16 -0
- package/dist/bundled/v3/components/or-tree-v3/styles.d.ts +1 -0
- package/dist/bundled/v3/components/or-tree-v3/types.d.ts +10 -0
- package/dist/bundled/v3/components/or-tree-v3/utils.d.ts +5 -0
- package/dist/bundled/v3/index.js +173 -147
- package/dist/bundled/v3/{types-e9ab8869.js → types-f428a884.js} +2 -2
- package/dist/esm/v2/{OrCardCollection-fcc2bec5.js → OrCardCollection-f4c27d14.js} +4 -4
- package/dist/esm/v2/{OrConfirm-7eee1481.js → OrConfirm-216060ac.js} +1 -1
- package/dist/esm/v2/{OrIconButton-ec2e21aa.js → OrIconButton-5c4ef664.js} +2 -2
- package/dist/esm/v2/{OrInlineInput-34f28593.js → OrInlineInput-46e7f140.js} +1 -1
- package/dist/esm/v2/{OrInlineTextarea-07a2cdc1.js → OrInlineTextarea-d016f618.js} +1 -1
- package/dist/esm/v2/{OrInput-a7903c0f.js → OrInput-9e6040e4.js} +1 -1
- package/dist/esm/v2/{OrMenu-47b319a6.js → OrMenu-fb119a7b.js} +1 -1
- package/dist/esm/v2/{OrModal-69791114.js → OrModal-b759863f.js} +1 -1
- package/dist/esm/v2/{OrNotification-5e98ac28.js → OrNotification-f9e48250.js} +1 -1
- package/dist/esm/v2/{OrPagination-4d330d4f.js → OrPagination-dc27788c.js} +2 -2
- package/dist/esm/v2/{OrPopover-83c885d0.js → OrPopover-aa9f4918.js} +1 -5
- package/dist/esm/v2/{OrSearch-5eba1989.js → OrSearch-da9725b4.js} +1 -1
- package/dist/esm/v2/{OrSelect-2d48ddee.js → OrSelect-8307ad20.js} +4 -4
- package/dist/esm/v2/{OrSidebar-6431f9f0.js → OrSidebar-5ca2144a.js} +1 -1
- package/dist/esm/v2/{OrSidebarCollapseButton-fbbac5f0.js → OrSidebarCollapseButton-b8e678d4.js} +1 -1
- package/dist/esm/v2/{OrTabs-f0e4db08.js → OrTabs-32d46f77.js} +2 -2
- package/dist/esm/v2/{OrTag-335525e6.js → OrTag-0153f01d.js} +1 -1
- package/dist/esm/v2/{OrTooltip-2c09dcaf.js → OrTooltip-f5d1e4f0.js} +1 -1
- package/dist/esm/v2/OrTree-32b2fede.js +233 -0
- package/dist/esm/v2/components/index.d.ts +1 -0
- package/dist/esm/v2/components/index.js +20 -19
- package/dist/esm/v2/components/or-card-collection-v3/index.js +7 -7
- package/dist/esm/v2/components/or-confirm-v3/index.js +5 -5
- package/dist/esm/v2/components/or-icon-button-v3/index.js +3 -3
- package/dist/esm/v2/components/or-inline-input-v3/index.js +4 -4
- package/dist/esm/v2/components/or-inline-textarea-v3/index.js +4 -4
- package/dist/esm/v2/components/or-input-v3/index.js +4 -4
- package/dist/esm/v2/components/or-menu-v3/index.js +2 -2
- package/dist/esm/v2/components/or-modal-v3/index.js +4 -4
- package/dist/esm/v2/components/or-notification-v3/index.js +4 -4
- package/dist/esm/v2/components/or-pagination-v3/index.js +3 -3
- package/dist/esm/v2/components/or-popover-v3/OrPopover.vue.d.ts +0 -11
- package/dist/esm/v2/components/or-popover-v3/index.js +1 -1
- package/dist/esm/v2/components/or-search-v3/index.js +5 -5
- package/dist/esm/v2/components/or-select-v3/index.js +6 -6
- package/dist/esm/v2/components/or-sidebar-v3/index.js +5 -5
- package/dist/esm/v2/components/or-sidebar-v3/partials/index.js +4 -4
- package/dist/esm/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +4 -4
- package/dist/esm/v2/components/or-tabs-v3/index.js +3 -3
- package/dist/esm/v2/components/or-tag-v3/index.js +4 -4
- package/dist/esm/v2/components/or-toast-v3/index.js +4 -4
- package/dist/esm/v2/components/or-tooltip-v3/index.js +2 -2
- package/dist/esm/v2/components/or-tree-v3/OrTree.vue.d.ts +47 -0
- package/dist/esm/v2/components/or-tree-v3/TreeNode.vue.d.ts +82 -0
- package/dist/esm/v2/components/or-tree-v3/index.d.ts +2 -0
- package/dist/esm/v2/components/or-tree-v3/index.js +15 -0
- package/dist/esm/v2/components/or-tree-v3/styles.d.ts +1 -0
- package/dist/esm/v2/components/or-tree-v3/types.d.ts +10 -0
- package/dist/esm/v2/components/or-tree-v3/utils.d.ts +5 -0
- package/dist/esm/v2/index.js +20 -19
- package/dist/esm/v2/{types-b1ac5808.js → types-1e607d9c.js} +1 -1
- package/dist/esm/v3/{OrCardCollection-fd019cf5.js → OrCardCollection-8bdbf9b7.js} +4 -4
- package/dist/esm/v3/{OrConfirm-b74191d6.js → OrConfirm-8067c5c4.js} +1 -1
- package/dist/esm/v3/{OrIconButton-e3f4d060.js → OrIconButton-41ee266c.js} +2 -2
- package/dist/esm/v3/{OrInlineInput-c0e61e6b.js → OrInlineInput-0ebb39b5.js} +1 -1
- package/dist/esm/v3/{OrInlineTextarea-6d5e7ceb.js → OrInlineTextarea-9fe81d0c.js} +1 -1
- package/dist/esm/v3/{OrInput-f0748c95.js → OrInput-18a1b41a.js} +1 -1
- package/dist/esm/v3/{OrMenu-053a9ab7.js → OrMenu-693b2bb8.js} +1 -1
- package/dist/esm/v3/{OrModal-7d4158d1.js → OrModal-18b6a0d2.js} +1 -1
- package/dist/esm/v3/{OrNotification-9e00aa97.js → OrNotification-b8a59ce3.js} +1 -1
- package/dist/esm/v3/{OrPagination-f2d104d9.js → OrPagination-9f8380a9.js} +2 -2
- package/dist/esm/v3/{OrPopover-3ac8f589.js → OrPopover-52250a03.js} +1 -5
- package/dist/esm/v3/{OrSearch-6673c583.js → OrSearch-b6a0f0e6.js} +1 -1
- package/dist/esm/v3/{OrSelect-b9d45ab4.js → OrSelect-c3a50846.js} +5 -5
- package/dist/esm/v3/{OrSidebar-c4dfb35c.js → OrSidebar-22253d76.js} +1 -1
- package/dist/esm/v3/{OrSidebarCollapseButton-e4b2eedb.js → OrSidebarCollapseButton-5154e452.js} +1 -1
- package/dist/esm/v3/{OrTabs-d9e2a07e.js → OrTabs-6ee4b984.js} +2 -2
- package/dist/esm/v3/{OrTag-1b49531d.js → OrTag-43ca7029.js} +1 -1
- package/dist/esm/v3/{OrTooltip-d91128f4.js → OrTooltip-02f07fa2.js} +1 -1
- package/dist/esm/v3/OrTree-bf625e80.js +170 -0
- package/dist/esm/v3/components/index.d.ts +1 -0
- package/dist/esm/v3/components/index.js +20 -19
- package/dist/esm/v3/components/or-card-collection-v3/index.js +7 -7
- package/dist/esm/v3/components/or-confirm-v3/index.js +5 -5
- package/dist/esm/v3/components/or-icon-button-v3/index.js +3 -3
- package/dist/esm/v3/components/or-inline-input-v3/index.js +4 -4
- package/dist/esm/v3/components/or-inline-textarea-v3/index.js +4 -4
- package/dist/esm/v3/components/or-input-v3/index.js +4 -4
- package/dist/esm/v3/components/or-menu-v3/index.js +2 -2
- package/dist/esm/v3/components/or-modal-v3/index.js +4 -4
- package/dist/esm/v3/components/or-notification-v3/index.js +4 -4
- package/dist/esm/v3/components/or-pagination-v3/index.js +3 -3
- package/dist/esm/v3/components/or-popover-v3/OrPopover.vue.d.ts +0 -11
- package/dist/esm/v3/components/or-popover-v3/index.js +1 -1
- package/dist/esm/v3/components/or-search-v3/index.js +5 -5
- package/dist/esm/v3/components/or-select-v3/index.js +6 -6
- package/dist/esm/v3/components/or-sidebar-v3/index.js +5 -5
- package/dist/esm/v3/components/or-sidebar-v3/partials/index.js +4 -4
- package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +4 -4
- package/dist/esm/v3/components/or-tabs-v3/index.js +3 -3
- package/dist/esm/v3/components/or-tag-v3/index.js +4 -4
- package/dist/esm/v3/components/or-toast-v3/index.js +4 -4
- package/dist/esm/v3/components/or-tooltip-v3/index.js +2 -2
- package/dist/esm/v3/components/or-tree-v3/OrTree.vue.d.ts +47 -0
- package/dist/esm/v3/components/or-tree-v3/TreeNode.vue.d.ts +82 -0
- package/dist/esm/v3/components/or-tree-v3/index.d.ts +2 -0
- package/dist/esm/v3/components/or-tree-v3/index.js +14 -0
- package/dist/esm/v3/components/or-tree-v3/styles.d.ts +1 -0
- package/dist/esm/v3/components/or-tree-v3/types.d.ts +10 -0
- package/dist/esm/v3/components/or-tree-v3/utils.d.ts +5 -0
- package/dist/esm/v3/index.js +20 -19
- package/dist/esm/v3/{types-af033805.js → types-9ab3399d.js} +1 -1
- package/package.json +2 -2
- package/src/components/index.ts +1 -0
- package/src/components/or-popover-v3/OrPopover.vue +0 -6
- package/src/components/or-select-v3/OrSelect.vue +1 -1
- package/src/components/or-tree-v3/OrTree.stories3.ts +105 -0
- package/src/components/or-tree-v3/OrTree.vue +85 -0
- package/src/components/or-tree-v3/TreeNode.vue +72 -0
- package/src/components/or-tree-v3/index.ts +2 -0
- package/src/components/or-tree-v3/styles.ts +13 -0
- package/src/components/or-tree-v3/types.ts +12 -0
- package/src/components/or-tree-v3/utils.ts +31 -0
package/dist/esm/v3/index.js
CHANGED
|
@@ -6,7 +6,7 @@ export { b as BUTTON_COLOR, d as BUTTON_LOADER_TYPE, c as BUTTON_SIZE, B as BUTT
|
|
|
6
6
|
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, s as OrButtonV3 } from './OrButton-5a850657.js';
|
|
7
7
|
export { s as OrCard } from './OrCard-e3a5aea4.js';
|
|
8
8
|
export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from './OrCardCollection-70131a12.js';
|
|
9
|
-
export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-
|
|
9
|
+
export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-8bdbf9b7.js';
|
|
10
10
|
export { s as OrCardV3 } from './OrCard-cc82902c.js';
|
|
11
11
|
export { a as OrCarousel, s as OrCarouselItem } from './OrCarouselItem-a3a855e8.js';
|
|
12
12
|
export { s as OrCheckbox } from './OrCheckbox-8d8887ea.js';
|
|
@@ -16,7 +16,7 @@ export { s as OrCode, O as OrCodeLanguages } from './OrCode-b5822f4e.js';
|
|
|
16
16
|
export { s as OrCollapse } from './OrCollapse-37a52e8f.js';
|
|
17
17
|
export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-9a149e6b.js';
|
|
18
18
|
export { s as OrConfirm } from './OrConfirm-f408faf5.js';
|
|
19
|
-
export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-
|
|
19
|
+
export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-8067c5c4.js';
|
|
20
20
|
export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-30749526.js';
|
|
21
21
|
export { s as OrError } from './OrError-f90296db.js';
|
|
22
22
|
export { s as OrErrorTagV3 } from './OrErrorTag-ade9192b.js';
|
|
@@ -28,14 +28,14 @@ export { s as OrFloating, a as OrFloatingHideStrategy, O as OrFloatingPlacements
|
|
|
28
28
|
export { s as OrHint } from './OrHint-1414c530.js';
|
|
29
29
|
export { s as OrHintV3 } from './OrHint-06ab89d7.js';
|
|
30
30
|
export { s as OrIcon, O as OrIconColors, a as OrIconType } from './OrIcon-ed3e10b4.js';
|
|
31
|
-
export { I as IconButtonColor, s as OrIconButtonV3 } from './OrIconButton-
|
|
31
|
+
export { I as IconButtonColor, s as OrIconButtonV3 } from './OrIconButton-41ee266c.js';
|
|
32
32
|
export { I as IconButtonSize, I as IconSize, a as IconVariant, s as OrIconV3 } from './OrIcon-62793572.js';
|
|
33
33
|
export { I as InlineInputBoxSize, I as InlineInputSize, s as OrInlineInputBoxV3 } from './OrInlineInputBox-01fb2cb2.js';
|
|
34
|
-
export { I as InlineInputType, s as OrInlineInputV3 } from './OrInlineInput-
|
|
34
|
+
export { I as InlineInputType, s as OrInlineInputV3 } from './OrInlineInput-0ebb39b5.js';
|
|
35
35
|
export { a as InlineTextEditTrimmingTypes, I as InlineTextEditTypes, s as OrInlineTextEdit } from './OrInlineTextEdit-328c89ca.js';
|
|
36
|
-
export { s as OrInlineTextareaV3 } from './OrInlineTextarea-
|
|
36
|
+
export { s as OrInlineTextareaV3 } from './OrInlineTextarea-9fe81d0c.js';
|
|
37
37
|
export { a as InputBoxSize, I as InputBoxVariant, a as InputSize, s as OrInputBoxV3, a as SearchSize, a as SelectSize, a as TextareaSize } from './OrInputBox-11389afd.js';
|
|
38
|
-
export { I as InputType, s as OrInputV3 } from './OrInput-
|
|
38
|
+
export { I as InputType, s as OrInputV3 } from './OrInput-18a1b41a.js';
|
|
39
39
|
export { s as OrInput } from './OrInput-0dbd5a01.js';
|
|
40
40
|
export { s as OrLabel } from './OrLabel-876f8729.js';
|
|
41
41
|
export { L as LabelVariant, s as OrLabelV3 } from './OrLabel-4da56db0.js';
|
|
@@ -45,31 +45,31 @@ export { s as OrListOfInputs } from './OrListOfInputs-5a834c95.js';
|
|
|
45
45
|
export { L as LoaderViews, s as OrLoader } from './OrLoader-15174477.js';
|
|
46
46
|
export { a as LoaderColor, b as LoaderSize, L as LoaderVariant, s as OrLoaderV3 } from './OrLoader-b79022da.js';
|
|
47
47
|
export { s as OrMenuItemV3 } from './OrMenuItem-dbee450f.js';
|
|
48
|
-
export { s as OrMenuV3 } from './OrMenu-
|
|
49
|
-
export { P as MenuPlacement, s as OrPopoverV3, P as PopoverPlacement, a as PopoverVariant, P as TooltipPlacement } from './OrPopover-
|
|
48
|
+
export { s as OrMenuV3 } from './OrMenu-693b2bb8.js';
|
|
49
|
+
export { P as MenuPlacement, s as OrPopoverV3, P as PopoverPlacement, a as PopoverVariant, P as TooltipPlacement } from './OrPopover-52250a03.js';
|
|
50
50
|
export { s as OrModal, O as OrModalSizes } from './OrModal-f3b2e0f4.js';
|
|
51
|
-
export { M as ModalSize, s as OrModalV3 } from './OrModal-
|
|
51
|
+
export { M as ModalSize, s as OrModalV3 } from './OrModal-18b6a0d2.js';
|
|
52
52
|
export { a as OR_NOTIFICATION_SIZE, O as OR_NOTIFICATION_TYPE, s as OrNotification } from './OrNotification-6d2e0cf5.js';
|
|
53
|
-
export { N as NotificationVariant, s as OrNotificationV3 } from './OrNotification-
|
|
53
|
+
export { N as NotificationVariant, s as OrNotificationV3 } from './OrNotification-b8a59ce3.js';
|
|
54
54
|
export { s as OrNumberInput } from './OrNumberInput-dca5e850.js';
|
|
55
55
|
export { s as OrOverflowMenu } from './OrOverflowMenu-08626d66.js';
|
|
56
56
|
export { s as OrOverlay } from './OrOverlay-451dce49.js';
|
|
57
57
|
export { s as OrOverlayV3 } from './OrOverlay-7cf03aea.js';
|
|
58
58
|
export { s as OrPassword } from './OrPassword-4a37f3ac.js';
|
|
59
|
-
export { s as OrPaginationV3 } from './OrPagination-
|
|
59
|
+
export { s as OrPaginationV3 } from './OrPagination-9f8380a9.js';
|
|
60
60
|
export { s as OrProgress, O as OrProgressColors, a as OrProgressTypes } from './OrProgress-d0d52c86.js';
|
|
61
61
|
export { s as OrProgressV3, P as ProgressColor, a as ProgressType } from './OrProgress-33cf7445.js';
|
|
62
62
|
export { s as OrRadio } from './OrRadio-c3ab11f2.js';
|
|
63
63
|
export { s as OrRadioGroup } from './OrRadioGroup-00785e41.js';
|
|
64
64
|
export { s as OrRadioV3 } from './OrRadio-a890ee7c.js';
|
|
65
65
|
export { s as OrSearch } from './OrSearch-1f80760e.js';
|
|
66
|
-
export { s as OrSearchV3 } from './OrSearch-
|
|
66
|
+
export { s as OrSearchV3 } from './OrSearch-b6a0f0e6.js';
|
|
67
67
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-4587c7a9.js';
|
|
68
68
|
export { s as OrSelect } from './OrSelect-88e5dfaf.js';
|
|
69
|
-
export { s as OrSelectV3 } from './OrSelect-
|
|
69
|
+
export { s as OrSelectV3 } from './OrSelect-c3a50846.js';
|
|
70
70
|
export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-375c85a3.js';
|
|
71
|
-
export { s as OrSidebarV3 } from './OrSidebar-
|
|
72
|
-
export { O as OrSidebarPlacement } from './OrSidebarCollapseButton-
|
|
71
|
+
export { s as OrSidebarV3 } from './OrSidebar-22253d76.js';
|
|
72
|
+
export { O as OrSidebarPlacement } from './OrSidebarCollapseButton-5154e452.js';
|
|
73
73
|
export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-0546754d.js';
|
|
74
74
|
export { s as OrSkeletonCircleV3, a as OrSkeletonRectV3, b as OrSkeletonTextV3 } from './OrSkeletonText-718a89f0.js';
|
|
75
75
|
export { s as OrSlider } from './OrSlider-858576e2.js';
|
|
@@ -81,9 +81,9 @@ export { s as OrTab } from './OrTab-bc98be02.js';
|
|
|
81
81
|
export { s as OrTabHeaderItem } from './OrTabHeaderItem-d668cc59.js';
|
|
82
82
|
export { s as OrTabV3 } from './OrTab-c11d94f6.js';
|
|
83
83
|
export { s as OrTabs } from './OrTabs-d3812c11.js';
|
|
84
|
-
export { s as OrTabsV3, T as TabsVariant } from './OrTabs-
|
|
84
|
+
export { s as OrTabsV3, T as TabsVariant } from './OrTabs-6ee4b984.js';
|
|
85
85
|
export { s as OrTag } from './OrTag-2192a3cf.js';
|
|
86
|
-
export { s as OrTagV3, a as TagColor, T as TagVariant } from './OrTag-
|
|
86
|
+
export { s as OrTagV3, a as TagColor, T as TagVariant } from './OrTag-43ca7029.js';
|
|
87
87
|
export { s as OrTeleport } from './OrTeleport.vue3-9bce0c02.js';
|
|
88
88
|
export { s as OrTeleportV3 } from './OrTeleport.vue3-8099178c.js';
|
|
89
89
|
export { s as OrTextV3 } from './OrText-de6b2fe2.js';
|
|
@@ -92,10 +92,11 @@ export { s as OrTextareaV3 } from './OrTextarea-08b22d36.js';
|
|
|
92
92
|
export { s as OrTextbox, T as TextboxTypes } from './OrTextbox-b025d6e4.js';
|
|
93
93
|
export { s as OrToast, a as OrToastContainer } from './OrToastContainer-70cd8d1d.js';
|
|
94
94
|
export { P as PositionsX, b as PositionsY, c as ToastType, T as TransitionType, a as useQueue, u as useToast } from './useToast-4fbe0e5a.js';
|
|
95
|
-
export { a as OrToastContainerV3, s as OrToastV3, t as TypesV3 } from './types-
|
|
95
|
+
export { a as OrToastContainerV3, s as OrToastV3, t as TypesV3 } from './types-9ab3399d.js';
|
|
96
96
|
export { p as PropsV3, a as useQueueV3, u as useToastV3 } from './useToast-0665462d.js';
|
|
97
97
|
export { s as OrTooltip, a as OrTooltipContent } from './OrTooltip-8d7385bc.js';
|
|
98
|
-
export { s as OrTooltipV3 } from './OrTooltip-
|
|
98
|
+
export { s as OrTooltipV3 } from './OrTooltip-02f07fa2.js';
|
|
99
|
+
export { s as OrTreeV3 } from './OrTree-bf625e80.js';
|
|
99
100
|
export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
|
|
100
101
|
export { u as useControlAttributes, a as useIdAttribute } from './useIdAttribute-859439f0.js';
|
|
101
102
|
export { u as useElevation } from './useElevation-92fce12c.js';
|
|
@@ -2,7 +2,7 @@ import { useToggle } from '@vueuse/core';
|
|
|
2
2
|
import { defineComponent, ref, computed, onBeforeMount, onBeforeUnmount, nextTick } from 'vue-demi';
|
|
3
3
|
import { s as script$4 } from './OrTeleport.vue3-8099178c.js';
|
|
4
4
|
import { T as ToastType, P as PositionsX, b as PositionsY, c as TransitionType, d as useToastEventBus, a as useQueue } from './useToast-0665462d.js';
|
|
5
|
-
import { s as script$2 } from './OrIconButton-
|
|
5
|
+
import { s as script$2 } from './OrIconButton-41ee266c.js';
|
|
6
6
|
import { s as script$3 } from './OrLoader-b79022da.js';
|
|
7
7
|
import { resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, createVNode, createElementVNode, toDisplayString, createBlock, withModifiers, withCtx, TransitionGroup, Fragment, renderList, mergeProps } from 'vue';
|
|
8
8
|
import { s as styleInject } from './style-inject.es-4c6f2515.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components",
|
|
3
|
-
"version": "3.0.2-beta.
|
|
3
|
+
"version": "3.0.2-beta.2641.0",
|
|
4
4
|
"description": "Vue components library for v2/3",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/auto/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@codemirror/lang-json": "6.0.0",
|
|
39
39
|
"@codemirror/lang-markdown": "6.0.1",
|
|
40
40
|
"@floating-ui/dom": "0.3.1",
|
|
41
|
-
"@onereach/styles": "^2.37.
|
|
41
|
+
"@onereach/styles": "^2.37.4-beta.2641.0",
|
|
42
42
|
"@splidejs/splide": "4.0.6",
|
|
43
43
|
"@types/lodash": "4.14.173",
|
|
44
44
|
"@types/sortablejs": "1.10.7",
|
package/src/components/index.ts
CHANGED
|
@@ -75,11 +75,6 @@ export default defineComponent({
|
|
|
75
75
|
default: false,
|
|
76
76
|
},
|
|
77
77
|
|
|
78
|
-
customStyles: {
|
|
79
|
-
type: Array as PropType<string[]>,
|
|
80
|
-
default: () => [],
|
|
81
|
-
},
|
|
82
|
-
|
|
83
78
|
disableDefaultStyles: {
|
|
84
79
|
type: Boolean,
|
|
85
80
|
default: false,
|
|
@@ -111,7 +106,6 @@ export default defineComponent({
|
|
|
111
106
|
const rootStyles = computed(() => [
|
|
112
107
|
'or-popover-v3',
|
|
113
108
|
...PopoverRoot,
|
|
114
|
-
...props.customStyles,
|
|
115
109
|
]);
|
|
116
110
|
|
|
117
111
|
const bodyStyles = computed(() => [
|
|
@@ -91,11 +91,11 @@
|
|
|
91
91
|
|
|
92
92
|
<OrPopover
|
|
93
93
|
ref="popover"
|
|
94
|
+
:class="dropdownStyles"
|
|
94
95
|
:variant="'auto'"
|
|
95
96
|
:trigger="inputBoxRoot"
|
|
96
97
|
:placement="'bottom'"
|
|
97
98
|
:full-width="true"
|
|
98
|
-
:custom-styles="dropdownStyles"
|
|
99
99
|
:disable-default-styles="true"
|
|
100
100
|
>
|
|
101
101
|
<template v-if="enableSearch">
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { action } from '@storybook/addon-actions';
|
|
2
|
+
import { StoryFn } from '@storybook/vue3';
|
|
3
|
+
import OrTree from './OrTree.vue';
|
|
4
|
+
|
|
5
|
+
const TREE_DATA = [
|
|
6
|
+
{
|
|
7
|
+
key: '0-0',
|
|
8
|
+
children: [
|
|
9
|
+
{
|
|
10
|
+
key: '0-0-0',
|
|
11
|
+
children: [
|
|
12
|
+
{
|
|
13
|
+
key: '0-0-0-0',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
key: '0-0-0-1',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
key: '0-0-0-2',
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
key: '0-0-1',
|
|
25
|
+
children: [
|
|
26
|
+
{
|
|
27
|
+
key: '0-0-1-0',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
key: '0-0-1-1',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
key: '0-0-1-2',
|
|
34
|
+
children: [
|
|
35
|
+
{
|
|
36
|
+
key: '0-0-1-2-0',
|
|
37
|
+
isLeaf: true,
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
key: '0-0-2',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
key: '0-1',
|
|
50
|
+
children: [
|
|
51
|
+
{
|
|
52
|
+
key: '0-1-0-0',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
key: '0-1-0-1',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
key: '0-1-0-2',
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
key: '0-2',
|
|
64
|
+
isLeaf: true,
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
export default {
|
|
69
|
+
title: 'Components/Tree',
|
|
70
|
+
component: OrTree,
|
|
71
|
+
argTypes: {
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const Template: StoryFn<typeof OrTree> = (args) => ({
|
|
76
|
+
components: {
|
|
77
|
+
OrTree,
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
data() {
|
|
81
|
+
return {
|
|
82
|
+
TREE_DATA,
|
|
83
|
+
};
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
setup() {
|
|
87
|
+
return {
|
|
88
|
+
args,
|
|
89
|
+
onUpdateState: action('update:state'),
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
template: `
|
|
94
|
+
<OrTree
|
|
95
|
+
v-bind="args"
|
|
96
|
+
/>
|
|
97
|
+
`,
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
export const Default = Template.bind({});
|
|
101
|
+
|
|
102
|
+
Default.args = {
|
|
103
|
+
// Props
|
|
104
|
+
initialData: TREE_DATA,
|
|
105
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="or-tree"
|
|
4
|
+
@drop="onDrop"
|
|
5
|
+
>
|
|
6
|
+
<tree-node
|
|
7
|
+
v-for="node in visibleItems"
|
|
8
|
+
:key="node[identifierKey]"
|
|
9
|
+
:node="node"
|
|
10
|
+
:node-key="node[identifierKey]"
|
|
11
|
+
:is-expanded="nodeMetadataByKey[node.key].isExpanded"
|
|
12
|
+
:is-leaf="!!node.isLeaf"
|
|
13
|
+
:level="nodeMetadataByKey[node.key].level"
|
|
14
|
+
@trigger-expand="onTriggerExpand"
|
|
15
|
+
>
|
|
16
|
+
<template
|
|
17
|
+
v-slot:default="props"
|
|
18
|
+
>
|
|
19
|
+
<slot v-bind="props" />
|
|
20
|
+
</template>
|
|
21
|
+
</tree-node>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script lang="ts">
|
|
26
|
+
import { defineComponent, PropType } from 'vue-demi';
|
|
27
|
+
import { ITreeNode, ITreeNodeMetadata } from './types';
|
|
28
|
+
import { getFlatTree } from './utils';
|
|
29
|
+
import TreeNode from './TreeNode.vue';
|
|
30
|
+
|
|
31
|
+
export default defineComponent({
|
|
32
|
+
components: {
|
|
33
|
+
TreeNode,
|
|
34
|
+
},
|
|
35
|
+
props: {
|
|
36
|
+
initialData: {
|
|
37
|
+
type: Array as PropType<ITreeNode[]>,
|
|
38
|
+
default: () => ([]),
|
|
39
|
+
},
|
|
40
|
+
identifierKey: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: 'key',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
data() {
|
|
47
|
+
return {
|
|
48
|
+
flatTree: [] as ITreeNode[],
|
|
49
|
+
nodeMetadataByKey: {} as Record<string, ITreeNodeMetadata>,
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
computed: {
|
|
54
|
+
visibleItems() {
|
|
55
|
+
return this.flatTree.filter(treeNode => {
|
|
56
|
+
return this.isNodeExpanded(treeNode.key);
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
mounted() {
|
|
62
|
+
const {
|
|
63
|
+
nodeMetadataByKey, flatTree,
|
|
64
|
+
} = getFlatTree(this.initialData);
|
|
65
|
+
this.flatTree = flatTree;
|
|
66
|
+
this.nodeMetadataByKey = nodeMetadataByKey;
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
methods: {
|
|
70
|
+
onTriggerExpand(key: string) {
|
|
71
|
+
this.nodeMetadataByKey[key].isExpanded = !this.nodeMetadataByKey[key].isExpanded;
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
isNodeExpanded(key: string): boolean {
|
|
75
|
+
const { parentNodeKey, level } = this.nodeMetadataByKey[key];
|
|
76
|
+
const parentMetadata = this.nodeMetadataByKey[parentNodeKey];
|
|
77
|
+
|
|
78
|
+
if (level === 0) return true;
|
|
79
|
+
if (!parentMetadata.isExpanded) return false;
|
|
80
|
+
|
|
81
|
+
return this.isNodeExpanded(parentNodeKey);
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
</script>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="tree-node"
|
|
4
|
+
:class="rootClasses"
|
|
5
|
+
:style="styleCSS"
|
|
6
|
+
>
|
|
7
|
+
<or-icon-button
|
|
8
|
+
v-if="!isLeaf"
|
|
9
|
+
:icon="expandIcon"
|
|
10
|
+
@click="$emit('trigger-expand', nodeKey)"
|
|
11
|
+
/>
|
|
12
|
+
|
|
13
|
+
<slot v-bind="$props">
|
|
14
|
+
{{ nodeKey }}
|
|
15
|
+
</slot>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script lang="ts">
|
|
20
|
+
import { defineComponent, PropType } from 'vue-demi';
|
|
21
|
+
import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
|
|
22
|
+
import { TreeNodeRoot } from './styles';
|
|
23
|
+
import { ITreeNode } from './types';
|
|
24
|
+
|
|
25
|
+
export default defineComponent({
|
|
26
|
+
components: {
|
|
27
|
+
OrIconButton,
|
|
28
|
+
},
|
|
29
|
+
props: {
|
|
30
|
+
node: {
|
|
31
|
+
type: Object as PropType<ITreeNode>,
|
|
32
|
+
default: undefined,
|
|
33
|
+
},
|
|
34
|
+
nodeKey: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: '',
|
|
37
|
+
},
|
|
38
|
+
isExpanded: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: false,
|
|
41
|
+
},
|
|
42
|
+
isLeaf: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false,
|
|
45
|
+
},
|
|
46
|
+
level: {
|
|
47
|
+
type: Number,
|
|
48
|
+
default: 0,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
emits: ['trigger-expand'],
|
|
52
|
+
|
|
53
|
+
setup() {
|
|
54
|
+
return {
|
|
55
|
+
rootClasses: TreeNodeRoot,
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
computed: {
|
|
60
|
+
expandIcon() {
|
|
61
|
+
return this.isExpanded ? 'keyboard_arrow_down' : 'arrow_right';
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
styleCSS() {
|
|
65
|
+
return {
|
|
66
|
+
// 24px -- gap-sm + tooltip width
|
|
67
|
+
'padding-left': (this.isLeaf && this.level === 0) ? '24px' : `${(this.isLeaf ? 24 : 0) + (this.level * 10)}px`,
|
|
68
|
+
};
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const TreeNodeRoot: string[] = [
|
|
2
|
+
'flex',
|
|
3
|
+
'items-center',
|
|
4
|
+
'gap-sm',
|
|
5
|
+
'pt-6',
|
|
6
|
+
'my-sm',
|
|
7
|
+
|
|
8
|
+
// Theme
|
|
9
|
+
'text-on-background',
|
|
10
|
+
'dark:text-on-background-dark',
|
|
11
|
+
'hover:bg-primary-opacity-0-08',
|
|
12
|
+
'dark:hover:bg-primary-opacity-0-08-dark',
|
|
13
|
+
];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ITreeNode, ITreeNodeMetadata } from './types';
|
|
2
|
+
|
|
3
|
+
export const getFlatTree = (tree: ITreeNode[]) => {
|
|
4
|
+
const flatTree: ITreeNode[] = [];
|
|
5
|
+
const nodeMetadataByKey: Record<string, ITreeNodeMetadata> = {};
|
|
6
|
+
|
|
7
|
+
const goDeeper = (treeNode: ITreeNode, level: number, parentNodeKey: string) => {
|
|
8
|
+
flatTree.push(treeNode);
|
|
9
|
+
nodeMetadataByKey[treeNode.key] = {
|
|
10
|
+
level,
|
|
11
|
+
isExpanded: false,
|
|
12
|
+
parentNodeKey,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
if (treeNode.children) {
|
|
16
|
+
for (const child of treeNode.children) {
|
|
17
|
+
goDeeper(child, level + 1, treeNode.key);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
for (const node of tree) {
|
|
24
|
+
goDeeper(node, 0, '');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
flatTree,
|
|
29
|
+
nodeMetadataByKey,
|
|
30
|
+
};
|
|
31
|
+
};
|