@vc-shell/framework 2.0.0-alpha.33 → 2.0.0-alpha.34
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/CHANGELOG.md +258 -207
- package/dist/ai-agent/index.js +4 -4
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-D0kWIlz3.js +4485 -0
- package/dist/chunks/VcTableAdapter.vue_vue_type_style_index_0_lang-D71wkuIU.js +22109 -0
- package/dist/chunks/{index-HNCQdWHc.js → index-CDUdOax4.js} +2 -2
- package/dist/chunks/{vendor-boolbase-Cyd7_957.js → vendor-boolbase-DYkUBG-P.js} +1 -1
- package/dist/chunks/{vendor-cheerio-DKt5ox2U.js → vendor-cheerio-DE71XQ9x.js} +1 -1
- package/dist/chunks/{vendor-cheerio-select-B8BTSEdK.js → vendor-cheerio-select-D-qK1Cpo.js} +2 -2
- package/dist/chunks/{vendor-css-select-C4b9igDP.js → vendor-css-select-DqoO1-RK.js} +2 -2
- package/dist/chunks/{vendor-dompurify-BIuh5IAZ.js → vendor-dompurify-DpIUMBYC.js} +228 -221
- package/dist/chunks/{vendor-gridstack-Dkfw452e.js → vendor-gridstack-Beau2jQ7.js} +230 -160
- package/dist/chunks/{vendor-intlify-core-base-BfDxYEHM.js → vendor-intlify-core-base-Cf8V01l9.js} +260 -260
- package/dist/chunks/{vendor-intlify-message-compiler-B2Y3gZDu.js → vendor-intlify-message-compiler-h1txdYa8.js} +2 -2
- package/dist/chunks/{vendor-intlify-shared-Drx6AmQ9.js → vendor-intlify-shared-D4BJYR57.js} +3 -3
- package/dist/chunks/{vendor-iso-639-1-ig8i9Svg.js → vendor-iso-639-1-BEjYyfKo.js} +17 -14
- package/dist/chunks/{vendor-lodash-es-BB-IQCna.js → vendor-lodash-es-CfnUOh0o.js} +364 -371
- package/dist/chunks/vendor-markdown-it-task-lists-CHKeJZfk.js +69 -0
- package/dist/chunks/vendor-microsoft-applicationinsights-analytics-js-ufpnHxNR.js +1142 -0
- package/dist/chunks/vendor-microsoft-applicationinsights-cfgsync-js-BmGq5cEx.js +247 -0
- package/dist/chunks/vendor-microsoft-applicationinsights-channel-js-BdtUi1l8.js +1907 -0
- package/dist/chunks/vendor-microsoft-applicationinsights-core-js-CR3vyuZc.js +8406 -0
- package/dist/chunks/vendor-microsoft-applicationinsights-dependencies-js-DXmYt4tG.js +1441 -0
- package/dist/chunks/vendor-microsoft-applicationinsights-properties-js-CLbNzgkN.js +610 -0
- package/dist/chunks/{vendor-microsoft-applicationinsights-shims-Ds7KyOsR.js → vendor-microsoft-applicationinsights-shims-CGX8KXgN.js} +13 -12
- package/dist/chunks/vendor-microsoft-applicationinsights-web-DzgnK2Mn.js +970 -0
- package/dist/chunks/{vendor-microsoft-dynamicproto-js-CMXJqDx1.js → vendor-microsoft-dynamicproto-js-D7567TLZ.js} +15 -15
- package/dist/chunks/vendor-nevware21-ts-async-BxN_lmkD.js +271 -0
- package/dist/chunks/vendor-nevware21-ts-utils-Dr-hD3q9.js +973 -0
- package/dist/chunks/{vendor-nth-check-CuyQT_ny.js → vendor-nth-check-D0N1qpsw.js} +1 -1
- package/dist/chunks/{vendor-prettier-B0zlh-ye.js → vendor-prettier-2Sf6a5jB.js} +876 -782
- package/dist/chunks/{vendor-prosemirror-commands-Bv4ChObl.js → vendor-prosemirror-commands-BaRVaTVO.js} +2 -2
- package/dist/chunks/{vendor-prosemirror-dropcursor-kF5UKNFM.js → vendor-prosemirror-dropcursor-PuLxL9JM.js} +2 -2
- package/dist/chunks/{vendor-prosemirror-gapcursor-D3tpkzBp.js → vendor-prosemirror-gapcursor-C7MEx13L.js} +3 -3
- package/dist/chunks/{vendor-prosemirror-history-CQYKHz3u.js → vendor-prosemirror-history-_AfZxoMt.js} +2 -2
- package/dist/chunks/{vendor-prosemirror-keymap-CAfQyvJ7.js → vendor-prosemirror-keymap-tvZqK1zZ.js} +1 -1
- package/dist/chunks/{vendor-prosemirror-schema-list-BNJkECdS.js → vendor-prosemirror-schema-list-qDgvFydE.js} +1 -1
- package/dist/chunks/{vendor-prosemirror-state-IeimrELV.js → vendor-prosemirror-state-BvFA7AjG.js} +1 -1
- package/dist/chunks/{vendor-prosemirror-tables-DIAkeGRL.js → vendor-prosemirror-tables-CbmHRq4G.js} +4 -4
- package/dist/chunks/{vendor-prosemirror-transform-BUjWd5Tb.js → vendor-prosemirror-transform-DVGD47fI.js} +118 -102
- package/dist/chunks/{vendor-prosemirror-view-Chu67Jpw.js → vendor-prosemirror-view-BW4UqvjQ.js} +7 -5
- package/dist/chunks/{vendor-striptags--4dtoP3u.js → vendor-striptags-DtlgQudQ.js} +1 -1
- package/dist/chunks/{vendor-tiptap-core-BWgKs47g.js → vendor-tiptap-core-CZbeo7XQ.js} +722 -703
- package/dist/chunks/{vendor-tiptap-extension-blockquote-B1RV9c0W.js → vendor-tiptap-extension-blockquote-B8uwrgnZ.js} +1 -1
- package/dist/chunks/{vendor-tiptap-extension-bold-BdAf6fWQ.js → vendor-tiptap-extension-bold-Ch9pbrZY.js} +1 -1
- package/dist/chunks/{vendor-tiptap-extension-code-_cv4EOBy.js → vendor-tiptap-extension-code-CVh_mZgz.js} +1 -1
- package/dist/chunks/{vendor-tiptap-extension-code-block-CT5P4x0D.js → vendor-tiptap-extension-code-block-CfoUSR2N.js} +2 -2
- package/dist/chunks/{vendor-tiptap-extension-document-C41wXth1.js → vendor-tiptap-extension-document-C4tn-v0L.js} +1 -1
- package/dist/chunks/{vendor-tiptap-extension-hard-break-Ds2hA4at.js → vendor-tiptap-extension-hard-break-CbK1eM89.js} +1 -1
- package/dist/chunks/{vendor-tiptap-extension-heading-DvnqoCO-.js → vendor-tiptap-extension-heading-BlkYF-RD.js} +1 -1
- package/dist/chunks/{vendor-tiptap-extension-horizontal-rule-BceRNOIu.js → vendor-tiptap-extension-horizontal-rule-DjMOsQCA.js} +2 -2
- package/dist/chunks/{vendor-tiptap-extension-image-DLERQS1u.js → vendor-tiptap-extension-image-BpqLcXdw.js} +1 -1
- package/dist/chunks/{vendor-tiptap-extension-italic-BGv0ktjJ.js → vendor-tiptap-extension-italic-YDdh6jEW.js} +1 -1
- package/dist/chunks/{vendor-tiptap-extension-link-BAzgztbX.js → vendor-tiptap-extension-link-CETrc0Mo.js} +2 -2
- package/dist/chunks/{vendor-tiptap-extension-list-rFRwhCY_.js → vendor-tiptap-extension-list-DsiDvJxK.js} +209 -180
- package/dist/chunks/vendor-tiptap-extension-paragraph-Bcss4jc0.js +49 -0
- package/dist/chunks/vendor-tiptap-extension-placeholder-ClNjQXk_.js +1 -0
- package/dist/chunks/{vendor-tiptap-extension-strike-Cqq1i9pe.js → vendor-tiptap-extension-strike-BZiBed9b.js} +1 -1
- package/dist/chunks/vendor-tiptap-extension-table-QVjcLO_H.js +409 -0
- package/dist/chunks/vendor-tiptap-extension-table-cell-CuXZTKj8.js +1 -0
- package/dist/chunks/vendor-tiptap-extension-table-header-CuXZTKj8.js +1 -0
- package/dist/chunks/vendor-tiptap-extension-table-row-CuXZTKj8.js +1 -0
- package/dist/chunks/{vendor-tiptap-extension-text-BaLQc3hC.js → vendor-tiptap-extension-text-Wofhchrp.js} +1 -1
- package/dist/chunks/{vendor-tiptap-extension-text-style-BDbT1PMb.js → vendor-tiptap-extension-text-style-Bc6nvmn0.js} +1 -1
- package/dist/chunks/{vendor-tiptap-extension-underline-CiUEdG6D.js → vendor-tiptap-extension-underline-Bo1pXXDN.js} +1 -1
- package/dist/chunks/{vendor-tiptap-extensions-pwHVUzkb.js → vendor-tiptap-extensions-D7eaegpB.js} +6 -6
- package/dist/chunks/{vendor-tiptap-markdown-D0feGfKk.js → vendor-tiptap-markdown-18K1hcU0.js} +3 -3
- package/dist/chunks/vendor-tiptap-pm-yqZPZQMU.js +1 -0
- package/dist/chunks/{vendor-tiptap-starter-kit-BEsLVJ4Q.js → vendor-tiptap-starter-kit-ny-AoaO_.js} +17 -17
- package/dist/chunks/{vendor-tiptap-vue-3-CdIBiRMV.js → vendor-tiptap-vue-3-BNAw8onj.js} +1 -1
- package/dist/chunks/{vendor-truncate-html-DDVwXwPl.js → vendor-truncate-html-ChA1T5zy.js} +1 -1
- package/dist/chunks/{vendor-unovis-ts-D3MmJ11i.js → vendor-unovis-ts-stSsHr9j.js} +1 -1
- package/dist/chunks/{vendor-unovis-vue-CMGNLXsC.js → vendor-unovis-vue-CZWGT3-0.js} +1 -1
- package/dist/chunks/{vendor-vue-i18n-BSCeQYoP.js → vendor-vue-i18n-LO-EJStU.js} +27 -27
- package/dist/chunks/{vendor-vue3-application-insights-Cq46Q3rj.js → vendor-vue3-application-insights-CAgbt8pk.js} +2 -2
- package/dist/chunks/{vendor-vueuse-components-DRdTsx6e.js → vendor-vueuse-components-BW7i7Uhb.js} +1 -1
- package/dist/chunks/{vendor-vueuse-core-D4-2M4AW.js → vendor-vueuse-core-CEdpDfzx.js} +9 -9
- package/dist/chunks/{vendor-vueuse-shared-PQ04AyOW.js → vendor-vueuse-shared-BlCOXw5g.js} +8 -8
- package/dist/core/api/platform.d.ts +5 -5
- package/dist/core/api/platform.d.ts.map +1 -1
- package/dist/core/blade-navigation/types/index.d.ts +1 -1
- package/dist/core/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/core/composables/useAppInsights/index.d.ts.map +1 -1
- package/dist/core/composables/useBladeRegistry/index.d.ts.map +1 -1
- package/dist/core/composables/usePlatformLocaleSync/index.d.ts +17 -0
- package/dist/core/composables/usePlatformLocaleSync/index.d.ts.map +1 -0
- package/dist/core/composables/useTheme/index.d.ts.map +1 -1
- package/dist/core/composables/useUser/index.d.ts +1 -0
- package/dist/core/composables/useUser/index.d.ts.map +1 -1
- package/dist/core/composables/useUserManagement/index.d.ts.map +1 -1
- package/dist/core/directives/index.d.ts +2 -0
- package/dist/core/directives/index.d.ts.map +1 -1
- package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentHeader.vue.d.ts +2 -2
- package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentHeader.vue.d.ts.map +1 -1
- package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentIframe.vue.d.ts.map +1 -1
- package/dist/core/plugins/ai-agent/composables/useAiAgentContext.d.ts.map +1 -1
- package/dist/core/plugins/ai-agent/services/ai-agent-service.d.ts.map +1 -1
- package/dist/core/plugins/modularity/index.d.ts +1 -1
- package/dist/core/plugins/modularity/index.d.ts.map +1 -1
- package/dist/core/services/widget-service.d.ts.map +1 -1
- package/dist/core/types/menu-types.d.ts.map +1 -1
- package/dist/framework.js +3188 -3934
- package/dist/index.css +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/modules/assets/index.d.ts +0 -5
- package/dist/modules/assets/index.d.ts.map +1 -1
- package/dist/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
- package/dist/modules/assets-manager/index.d.ts +0 -6
- package/dist/modules/assets-manager/index.d.ts.map +1 -1
- package/dist/scripts/check-locales.cjs +3 -0
- package/dist/shell/_internal/blade-navigation/plugin-v2.d.ts +0 -6
- package/dist/shell/_internal/blade-navigation/plugin-v2.d.ts.map +1 -1
- package/dist/shell/_internal/notifications/components/notification-container/index.d.ts +2 -2
- package/dist/shell/_internal/notifications/composables/useInstance/index.d.ts.map +1 -1
- package/dist/shell/_internal/popup/common/vc-popup-base.vue.d.ts +1 -1
- package/dist/shell/_internal/popup/common/vc-popup-base.vue.d.ts.map +1 -1
- package/dist/shell/_internal/popup/index.d.ts +0 -4
- package/dist/shell/_internal/popup/index.d.ts.map +1 -1
- package/dist/shell/auth/ChangePasswordPage/components/change-password/ChangePassword.vue.d.ts.map +1 -1
- package/dist/shell/auth/ForgotPasswordPage/components/forgot-password/ForgotPassword.vue.d.ts.map +1 -1
- package/dist/shell/auth/InvitePage/components/invite/Invite.vue.d.ts +2 -2
- package/dist/shell/auth/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
- package/dist/shell/auth/LoginPage/components/login/Login.vue.d.ts.map +1 -1
- package/dist/shell/auth/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts +2 -2
- package/dist/shell/auth/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
- package/dist/shell/auth/_test-utils/shared-dependency-mocks.d.ts +8 -0
- package/dist/shell/auth/_test-utils/shared-dependency-mocks.d.ts.map +1 -0
- package/dist/shell/auth/_test-utils/shared-mock-factories.d.ts +13 -0
- package/dist/shell/auth/_test-utils/shared-mock-factories.d.ts.map +1 -0
- package/dist/shell/auth/_test-utils/shared-stubs.d.ts +33 -0
- package/dist/shell/auth/_test-utils/shared-stubs.d.ts.map +1 -0
- package/dist/shell/auth/utils.d.ts +25 -0
- package/dist/shell/auth/utils.d.ts.map +1 -0
- package/dist/shell/components/change-password/change-password.vue.d.ts.map +1 -1
- package/dist/shell/components/change-password/index.d.ts +0 -5
- package/dist/shell/components/change-password/index.d.ts.map +1 -1
- package/dist/shell/components/error-interceptor/index.d.ts +0 -5
- package/dist/shell/components/error-interceptor/index.d.ts.map +1 -1
- package/dist/shell/components/language-selector/index.d.ts +0 -5
- package/dist/shell/components/language-selector/index.d.ts.map +1 -1
- package/dist/shell/components/notification-dropdown/_internal/notification/notification.vue.d.ts.map +1 -1
- package/dist/shell/components/notification-dropdown/index.d.ts +0 -5
- package/dist/shell/components/notification-dropdown/index.d.ts.map +1 -1
- package/dist/shell/components/notification-template/index.d.ts +0 -5
- package/dist/shell/components/notification-template/index.d.ts.map +1 -1
- package/dist/shell/components/sidebar/index.d.ts +3 -3
- package/dist/shell/components/sidebar/sidebar.vue.d.ts +1 -1
- package/dist/shell/components/sidebar/sidebar.vue.d.ts.map +1 -1
- package/dist/shell/components/user-dropdown-button/index.d.ts +0 -5
- package/dist/shell/components/user-dropdown-button/index.d.ts.map +1 -1
- package/dist/shell/dashboard/dashboard-widget-card/dashboard-widget-card.vue.d.ts.map +1 -1
- package/dist/test-helpers.d.ts +6 -18
- package/dist/test-helpers.d.ts.map +1 -1
- package/dist/test-mock-factories.d.ts +48 -0
- package/dist/test-mock-factories.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts +3 -3
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts +2 -2
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-skeleton/vc-skeleton.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-skeleton/vc-skeleton.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-tooltip/vc-tooltip.vue.d.ts +2 -2
- package/dist/ui/components/atoms/vc-tooltip/vc-tooltip.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/index.d.ts +1 -0
- package/dist/ui/components/molecules/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/multilanguage-selector/multilanguage-selector.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-accordion/_internal/vc-accordion-item/vc-accordion-item.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-accordion/_internal/vc-accordion-item/vc-accordion-item.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-accordion/vc-accordion.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-accordion/vc-accordion.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-color-input/vc-color-input.vue.d.ts +3 -3
- package/dist/ui/components/molecules/vc-color-input/vc-color-input.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-date-picker/vc-date-picker.vue.d.ts +3 -3
- package/dist/ui/components/molecules/vc-date-picker/vc-date-picker.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-dropdown/vc-dropdown.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-dropdown/vc-dropdown.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-toolbar.vue.d.ts +2 -2
- package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-toolbar.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +3 -3
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-menu/vc-menu-group.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-menu/vc-menu-group.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-menu/vc-menu-item.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-menu/vc-menu-item.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-multivalue/_internal/MultivalueTrigger.vue.d.ts +2 -2
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/_internal/SelectTrigger.vue.d.ts +2 -2
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts +10 -27
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/app-bar/components/AppBarWidgetItem.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/app-bar/composables/useToggleableContent.d.ts +3 -3
- package/dist/ui/components/organisms/vc-app/_internal/app-bar/composables/useToggleableContent.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/sidebar/SidebarHeader.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/sidebar/SidebarHeader.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/composables/useShellBootstrap.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/BladeHeader.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-blade/_internal/BladeToolbar.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/BladeToolbar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/toolbar/ToolbarBaseButton.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +3 -3
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/VcDataTable.vue.d.ts +19 -17
- package/dist/ui/components/organisms/vc-data-table/VcDataTable.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/VcTableAdapter.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-data-table/VcTableAdapter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-empty/vc-table-empty.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/ColumnFilter.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/ColumnFilter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/DataTableBody.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/GlobalFiltersPanel.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-data-table/components/GlobalFiltersPanel.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/TableCell.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/TableCheckbox.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-data-table/components/TableHead.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/TableRow.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/TableRowActions.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/TableRowActions.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/VcColumn.vue.d.ts +7 -7
- package/dist/ui/components/organisms/vc-data-table/components/mobile/DataTableMobileCard.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-data-table/components/mobile/DataTableMobileCard.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/mobile/DataTableMobileView.vue.d.ts +4 -4
- package/dist/ui/components/organisms/vc-data-table/components/mobile/DataTableMobileView.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/components/mobile/MobileActionSheet.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-data-table/components/mobile/PullToRefresh.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/composables/useColumnWidthEngine.d.ts +46 -0
- package/dist/ui/components/organisms/vc-data-table/composables/useColumnWidthEngine.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-data-table/composables/useDataTableOrchestrator.d.ts +6 -5
- package/dist/ui/components/organisms/vc-data-table/composables/useDataTableOrchestrator.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/composables/useDataTableState.d.ts +6 -6
- package/dist/ui/components/organisms/vc-data-table/composables/useDataTableState.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/composables/useTableColumns.d.ts +24 -11
- package/dist/ui/components/organisms/vc-data-table/composables/useTableColumns.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsReorder.d.ts +6 -9
- package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsReorder.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsResize.d.ts +18 -13
- package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsResize.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/composables/useTableEditing.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/composables/useTableSort.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/keys.d.ts +2 -2
- package/dist/ui/components/organisms/vc-data-table/keys.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/types.d.ts +26 -0
- package/dist/ui/components/organisms/vc-data-table/types.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/utils/ColumnCollector.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-data-table/utils/columnHelpers.d.ts +30 -0
- package/dist/ui/components/organisms/vc-data-table/utils/columnHelpers.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-data-table/utils/index.d.ts +1 -0
- package/dist/ui/components/organisms/vc-data-table/utils/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-filmstrip/vc-gallery-filmstrip.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-filmstrip/vc-gallery-filmstrip.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/composables/useGalleryUpload.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +2 -1
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-image-upload/vc-image-upload.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-image-upload/vc-image-upload.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +4 -4
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts +8 -8
- package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts.map +1 -1
- package/dist/ui/composables/useCollapsible.d.ts.map +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +87 -81
- package/dist/vitest-axe.setup.d.ts.map +1 -1
- package/dist/vitest-mocks.setup.d.ts +2 -0
- package/dist/vitest-mocks.setup.d.ts.map +1 -0
- package/package.json +8 -6
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-CrmX4_5C.js +0 -4256
- package/dist/chunks/VcTableAdapter.vue_vue_type_style_index_0_lang-D9BrIj43.js +0 -21552
- package/dist/chunks/vendor-markdown-it-task-lists-xwqUBSah.js +0 -72
- package/dist/chunks/vendor-microsoft-applicationinsights-analytics-js-Dvbvo5Dl.js +0 -1207
- package/dist/chunks/vendor-microsoft-applicationinsights-cfgsync-js-9wxxo7yB.js +0 -261
- package/dist/chunks/vendor-microsoft-applicationinsights-channel-js-c-UYe0ly.js +0 -1822
- package/dist/chunks/vendor-microsoft-applicationinsights-common-DgFOCv6a.js +0 -1921
- package/dist/chunks/vendor-microsoft-applicationinsights-core-js-DYtaESwI.js +0 -4276
- package/dist/chunks/vendor-microsoft-applicationinsights-dependencies-js-BoRkSVPF.js +0 -1407
- package/dist/chunks/vendor-microsoft-applicationinsights-properties-js-Ymy9TFDL.js +0 -572
- package/dist/chunks/vendor-microsoft-applicationinsights-web-gIbMmGYP.js +0 -487
- package/dist/chunks/vendor-nevware21-ts-async-CP171WHM.js +0 -261
- package/dist/chunks/vendor-nevware21-ts-utils-Dl8msUu_.js +0 -853
- package/dist/chunks/vendor-tiptap-extension-paragraph-EwqudBl5.js +0 -49
- package/dist/chunks/vendor-tiptap-extension-placeholder-D1_k7Sra.js +0 -1
- package/dist/chunks/vendor-tiptap-extension-table-cell-odWoHoTv.js +0 -1
- package/dist/chunks/vendor-tiptap-extension-table-header-odWoHoTv.js +0 -1
- package/dist/chunks/vendor-tiptap-extension-table-row-odWoHoTv.js +0 -1
- package/dist/chunks/vendor-tiptap-extension-table-tNWQInwa.js +0 -374
- package/dist/chunks/vendor-tiptap-pm-CG4ksPkF.js +0 -1
- package/dist/ui/types/global-components.d.ts +0 -10
- package/dist/ui/types/global-components.d.ts.map +0 -1
|
@@ -359,20 +359,12 @@ class h {
|
|
|
359
359
|
const e = t.style;
|
|
360
360
|
e.position && e.removeProperty("position"), e.left && e.removeProperty("left"), e.top && e.removeProperty("top"), e.width && e.removeProperty("width"), e.height && e.removeProperty("height");
|
|
361
361
|
}
|
|
362
|
-
/** @internal returns the passed element if scrollable, else the closest parent that will, up to the entire document scrolling element */
|
|
362
|
+
/** @internal returns the passed element if vertically scrollable, else the closest parent that will, up to the entire document scrolling element */
|
|
363
363
|
static getScrollElement(t) {
|
|
364
364
|
if (!t)
|
|
365
365
|
return document.scrollingElement || document.documentElement;
|
|
366
|
-
const e = getComputedStyle(t);
|
|
367
|
-
return
|
|
368
|
-
}
|
|
369
|
-
/** @internal */
|
|
370
|
-
static updateScrollPosition(t, e, i) {
|
|
371
|
-
const s = h.getScrollElement(t);
|
|
372
|
-
if (!s)
|
|
373
|
-
return;
|
|
374
|
-
const r = t.getBoundingClientRect(), n = s.getBoundingClientRect(), o = window.innerHeight || document.documentElement.clientHeight, d = r.bottom - Math.min(n.bottom, o), l = r.top - Math.max(n.top, 0), a = s.scrollTop;
|
|
375
|
-
l < 0 && i < 0 ? t.offsetHeight > n.height ? s.scrollTop += i : s.scrollTop += Math.abs(l) > Math.abs(i) ? i : l : d > 0 && i > 0 && (t.offsetHeight > n.height ? s.scrollTop += i : s.scrollTop += d > i ? i : d), e.top += s.scrollTop - a;
|
|
366
|
+
const e = getComputedStyle(t).overflowY;
|
|
367
|
+
return (e === "auto" || e === "scroll") && t.scrollHeight > t.clientHeight ? t : h.getScrollElement(t.parentElement);
|
|
376
368
|
}
|
|
377
369
|
/**
|
|
378
370
|
* @internal Function used to scroll the page.
|
|
@@ -603,8 +595,8 @@ class x {
|
|
|
603
595
|
const l = d._rect;
|
|
604
596
|
let a = Number.MAX_VALUE, u = Number.MAX_VALUE;
|
|
605
597
|
s.y < l.y ? a = (r.y + r.h - l.y) / l.h : s.y + s.h > l.y + l.h && (a = (l.y + l.h - r.y) / l.h), s.x < l.x ? u = (r.x + r.w - l.x) / l.w : s.x + s.w > l.x + l.w && (u = (l.x + l.w - r.x) / l.w);
|
|
606
|
-
const
|
|
607
|
-
|
|
598
|
+
const c = Math.min(u, a);
|
|
599
|
+
c > o && (o = c, n = d);
|
|
608
600
|
}
|
|
609
601
|
return e.collide = n, n;
|
|
610
602
|
}
|
|
@@ -1060,8 +1052,8 @@ class x {
|
|
|
1060
1052
|
const l = t._moving && !e.nested;
|
|
1061
1053
|
let a = l ? this.directionCollideCoverage(t, e, o) : o[0];
|
|
1062
1054
|
if (l && a && t.grid?.opts?.subGridDynamic && !t.grid._isTemp) {
|
|
1063
|
-
const u = h.areaIntercept(e.rect, a._rect),
|
|
1064
|
-
u / (
|
|
1055
|
+
const u = h.areaIntercept(e.rect, a._rect), c = h.area(e.rect), p = h.area(a._rect);
|
|
1056
|
+
u / (c < p ? c : p) > 0.8 && (a.grid.makeSubGrid(a.el, void 0, t), a = void 0);
|
|
1065
1057
|
}
|
|
1066
1058
|
a ? d = !this._fixCollisions(t, r, a, e) : (d = !1, i && delete e.pack);
|
|
1067
1059
|
}
|
|
@@ -1246,13 +1238,13 @@ class w {
|
|
|
1246
1238
|
function D(m, t) {
|
|
1247
1239
|
m.touches.length > 1 || (m.cancelable && m.preventDefault(), h.simulateMouseEvent(m.changedTouches[0], t));
|
|
1248
1240
|
}
|
|
1249
|
-
function
|
|
1241
|
+
function W(m, t) {
|
|
1250
1242
|
m.cancelable && m.preventDefault(), h.simulateMouseEvent(m, t);
|
|
1251
1243
|
}
|
|
1252
|
-
function
|
|
1244
|
+
function H(m) {
|
|
1253
1245
|
w.touchHandled || (w.touchHandled = !0, D(m, "mousedown"));
|
|
1254
1246
|
}
|
|
1255
|
-
function
|
|
1247
|
+
function N(m) {
|
|
1256
1248
|
w.touchHandled && D(m, "mousemove");
|
|
1257
1249
|
}
|
|
1258
1250
|
function T(m) {
|
|
@@ -1265,15 +1257,15 @@ function T(m) {
|
|
|
1265
1257
|
function k(m) {
|
|
1266
1258
|
m.pointerType !== "mouse" && m.target.releasePointerCapture(m.pointerId);
|
|
1267
1259
|
}
|
|
1268
|
-
function
|
|
1269
|
-
f.dragElement && m.pointerType !== "mouse" &&
|
|
1260
|
+
function P(m) {
|
|
1261
|
+
f.dragElement && m.pointerType !== "mouse" && W(m, "mouseenter");
|
|
1270
1262
|
}
|
|
1271
|
-
function
|
|
1263
|
+
function B(m) {
|
|
1272
1264
|
f.dragElement && m.pointerType !== "mouse" && (w.pointerLeaveTimeout = window.setTimeout(() => {
|
|
1273
|
-
delete w.pointerLeaveTimeout,
|
|
1265
|
+
delete w.pointerLeaveTimeout, W(m, "mouseleave");
|
|
1274
1266
|
}, 10));
|
|
1275
1267
|
}
|
|
1276
|
-
class
|
|
1268
|
+
class M {
|
|
1277
1269
|
constructor(t, e, i) {
|
|
1278
1270
|
this.host = t, this.dir = e, this.option = i, this.moving = !1, this._mouseDown = this._mouseDown.bind(this), this._mouseMove = this._mouseMove.bind(this), this._mouseUp = this._mouseUp.bind(this), this._keyEvent = this._keyEvent.bind(this), this._init();
|
|
1279
1271
|
}
|
|
@@ -1285,15 +1277,15 @@ class L {
|
|
|
1285
1277
|
} catch (t) {
|
|
1286
1278
|
this.option.element = void 0, console.error("Query for resizeable handle failed, falling back", t);
|
|
1287
1279
|
}
|
|
1288
|
-
return this.el || (this.el = document.createElement("div"), this.host.appendChild(this.el)), this.el.classList.add("ui-resizable-handle"), this.el.classList.add(`${
|
|
1280
|
+
return this.el || (this.el = document.createElement("div"), this.host.appendChild(this.el)), this.el.classList.add("ui-resizable-handle"), this.el.classList.add(`${M.prefix}${this.dir}`), this.el.style.zIndex = "100", this.el.style.userSelect = "none", this.el.addEventListener("mousedown", this._mouseDown), b && (this.el.addEventListener("touchstart", H), this.el.addEventListener("pointerdown", k)), this;
|
|
1289
1281
|
}
|
|
1290
1282
|
/** call this when resize handle needs to be removed and cleaned up */
|
|
1291
1283
|
destroy() {
|
|
1292
|
-
return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), b && (this.el.removeEventListener("touchstart",
|
|
1284
|
+
return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), b && (this.el.removeEventListener("touchstart", H), this.el.removeEventListener("pointerdown", k)), this.option.element || this.host.removeChild(this.el), delete this.el, delete this.host, this;
|
|
1293
1285
|
}
|
|
1294
1286
|
/** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */
|
|
1295
1287
|
_mouseDown(t) {
|
|
1296
|
-
this.mouseDownEvent = t, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), b && (this.el.addEventListener("touchmove",
|
|
1288
|
+
this.mouseDownEvent = t, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), b && (this.el.addEventListener("touchmove", N), this.el.addEventListener("touchend", T)), t.stopPropagation(), t.preventDefault();
|
|
1297
1289
|
}
|
|
1298
1290
|
/** @internal */
|
|
1299
1291
|
_mouseMove(t) {
|
|
@@ -1302,7 +1294,7 @@ class L {
|
|
|
1302
1294
|
}
|
|
1303
1295
|
/** @internal */
|
|
1304
1296
|
_mouseUp(t) {
|
|
1305
|
-
this.moving && (this._triggerEvent("stop", t), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), b && (this.el.removeEventListener("touchmove",
|
|
1297
|
+
this.moving && (this._triggerEvent("stop", t), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), b && (this.el.removeEventListener("touchmove", N), this.el.removeEventListener("touchend", T)), delete this.moving, delete this.mouseDownEvent, t.stopPropagation(), t.preventDefault();
|
|
1306
1298
|
}
|
|
1307
1299
|
/** @internal call when keys are being pressed - use Esc to cancel */
|
|
1308
1300
|
_keyEvent(t) {
|
|
@@ -1313,7 +1305,7 @@ class L {
|
|
|
1313
1305
|
return this.option[t] && this.option[t](e), this;
|
|
1314
1306
|
}
|
|
1315
1307
|
}
|
|
1316
|
-
|
|
1308
|
+
M.prefix = "ui-resizable-";
|
|
1317
1309
|
class S {
|
|
1318
1310
|
constructor() {
|
|
1319
1311
|
this._eventRegister = {};
|
|
@@ -1383,11 +1375,12 @@ class R extends S {
|
|
|
1383
1375
|
width: this.originalRect.width,
|
|
1384
1376
|
height: this.originalRect.height + this.scrolled,
|
|
1385
1377
|
left: this.originalRect.left,
|
|
1378
|
+
right: this.originalRect.right,
|
|
1386
1379
|
top: this.originalRect.top - this.scrolled
|
|
1387
1380
|
}, n = this.temporalRect || r;
|
|
1388
1381
|
return {
|
|
1389
1382
|
position: {
|
|
1390
|
-
left: (n.left - s.left) * this.rectScale.x,
|
|
1383
|
+
left: this.option.rtl ? (s.right - n.right) * this.rectScale.x : (n.left - s.left) * this.rectScale.x,
|
|
1391
1384
|
top: (n.top - s.top) * this.rectScale.y
|
|
1392
1385
|
},
|
|
1393
1386
|
size: {
|
|
@@ -1445,7 +1438,7 @@ class R extends S {
|
|
|
1445
1438
|
}
|
|
1446
1439
|
/** @internal */
|
|
1447
1440
|
_setupHandlers() {
|
|
1448
|
-
return this.handlers = this.option.handles.split(",").map((t) => t.trim()).map((t) => new
|
|
1441
|
+
return this.handlers = this.option.handles.split(",").map((t) => t.trim()).map((t) => new M(this.el, t, {
|
|
1449
1442
|
element: this.option.element,
|
|
1450
1443
|
start: (e) => this._resizeStart(e),
|
|
1451
1444
|
stop: (e) => this._resizeStop(e),
|
|
@@ -1462,7 +1455,7 @@ class R extends S {
|
|
|
1462
1455
|
_resizing(t, e) {
|
|
1463
1456
|
this.scrolled = this.scrollEl.scrollTop - this.scrollY, this.temporalRect = this._getChange(t, e), this._applyChange();
|
|
1464
1457
|
const i = h.initEvent(t, { type: "resize", target: this.el });
|
|
1465
|
-
return this.option.resize && this.option.resize(i, this._ui()), this.triggerEvent("resize", i), this;
|
|
1458
|
+
return i.resizeDir = e, i.hasMovedX = this.option.rtl ? e.includes("e") : e.includes("w"), i.hasMovedY = e.includes("n"), this.option.resize && this.option.resize(i, this._ui()), this.triggerEvent("resize", i), this;
|
|
1466
1459
|
}
|
|
1467
1460
|
/** @internal */
|
|
1468
1461
|
_resizeStop(t) {
|
|
@@ -1490,12 +1483,14 @@ class R extends S {
|
|
|
1490
1483
|
width: this.originalRect.width,
|
|
1491
1484
|
height: this.originalRect.height + this.scrolled,
|
|
1492
1485
|
left: this.originalRect.left,
|
|
1486
|
+
right: this.originalRect.right,
|
|
1493
1487
|
top: this.originalRect.top - this.scrolled
|
|
1494
1488
|
}, r = t.clientX - i.clientX, n = this.sizeToContent ? 0 : t.clientY - i.clientY;
|
|
1495
1489
|
let o, d;
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1490
|
+
const l = this.option.rtl;
|
|
1491
|
+
!l && e.indexOf("e") > -1 ? s.width += r : l && e.indexOf("w") > -1 ? s.width -= r : !l && e.indexOf("w") > -1 ? (s.width -= r, s.left += r, o = !0) : l && e.indexOf("e") > -1 && (s.width += r, s.right += r, o = !0), e.indexOf("s") > -1 ? s.height += n : e.indexOf("n") > -1 && (s.height -= n, s.top += n, d = !0);
|
|
1492
|
+
const a = this._constrainSize(s.width, s.height, o, d);
|
|
1493
|
+
return Math.round(s.width) !== Math.round(a.width) && (!l && e.indexOf("w") > -1 ? s.left += s.width - a.width : l && e.indexOf("e") > -1 && (s.right -= s.width - a.width), s.width = a.width), Math.round(s.height) !== Math.round(a.height) && (e.indexOf("n") > -1 && (s.top += s.height - a.height), s.height = a.height), s;
|
|
1499
1494
|
}
|
|
1500
1495
|
/** @internal constrain the size to the set min/max values */
|
|
1501
1496
|
_constrainSize(t, e, i, s) {
|
|
@@ -1504,14 +1499,17 @@ class R extends S {
|
|
|
1504
1499
|
}
|
|
1505
1500
|
/** @internal */
|
|
1506
1501
|
_applyChange() {
|
|
1507
|
-
let t = { left: 0, top: 0, width: 0, height: 0 };
|
|
1502
|
+
let t = { left: 0, right: 0, top: 0, width: 0, height: 0 };
|
|
1508
1503
|
if (this.el.style.position === "absolute") {
|
|
1509
|
-
const e = this.el.parentElement, { left: i,
|
|
1510
|
-
t = { left: i,
|
|
1504
|
+
const e = this.el.parentElement, { left: i, right: s, top: r } = e.getBoundingClientRect();
|
|
1505
|
+
t = { left: i, right: s, top: r, width: 0, height: 0 };
|
|
1511
1506
|
}
|
|
1512
|
-
return this.temporalRect ? (Object.
|
|
1513
|
-
|
|
1514
|
-
|
|
1507
|
+
return this.temporalRect ? (Object.entries(this.temporalRect).forEach(([e, i]) => {
|
|
1508
|
+
if (this.option.rtl ? e === "left" : e === "right")
|
|
1509
|
+
return;
|
|
1510
|
+
const s = e === "width" || e === "left" || e === "right" ? this.rectScale.x : e === "height" || e === "top" ? this.rectScale.y : 1;
|
|
1511
|
+
let r;
|
|
1512
|
+
e === "right" ? r = (t.right - i) * this.rectScale.x + "px" : r = (i - t[e]) * s + "px", this.el.style[e] = r;
|
|
1515
1513
|
}), this) : this;
|
|
1516
1514
|
}
|
|
1517
1515
|
/** @internal */
|
|
@@ -1519,8 +1517,8 @@ class R extends S {
|
|
|
1519
1517
|
return this.handlers.forEach((t) => t.destroy()), delete this.handlers, this;
|
|
1520
1518
|
}
|
|
1521
1519
|
}
|
|
1522
|
-
R._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
|
|
1523
|
-
const
|
|
1520
|
+
R._originStyleProp = ["width", "height", "position", "left", "right", "top", "opacity", "zIndex"];
|
|
1521
|
+
const U = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
|
|
1524
1522
|
class z extends S {
|
|
1525
1523
|
constructor(t, e = {}) {
|
|
1526
1524
|
super(), this.el = t, this.option = e, this.dragTransform = {
|
|
@@ -1528,9 +1526,39 @@ class z extends S {
|
|
|
1528
1526
|
yScale: 1,
|
|
1529
1527
|
xOffset: 0,
|
|
1530
1528
|
yOffset: 0
|
|
1529
|
+
}, this._autoScrollTick = () => {
|
|
1530
|
+
const r = this.helper, n = this._autoScrollContainer;
|
|
1531
|
+
if (!r || !n) {
|
|
1532
|
+
this._stopScrolling();
|
|
1533
|
+
return;
|
|
1534
|
+
}
|
|
1535
|
+
const o = this._getClipping(r, n);
|
|
1536
|
+
if (o === 0) {
|
|
1537
|
+
this._stopScrolling();
|
|
1538
|
+
return;
|
|
1539
|
+
}
|
|
1540
|
+
if (!this._autoScrollMaxSpeed) {
|
|
1541
|
+
const c = window.innerHeight || document.documentElement.clientHeight;
|
|
1542
|
+
this._autoScrollMaxSpeed = Math.max(c / 150, 4);
|
|
1543
|
+
}
|
|
1544
|
+
const d = Math.abs(o), l = Math.min(d * 0.5, this._autoScrollMaxSpeed), a = o > 0 ? l : -l, u = n.scrollTop;
|
|
1545
|
+
if (n.scrollTop += a, n.scrollTop === u) {
|
|
1546
|
+
this._stopScrolling();
|
|
1547
|
+
return;
|
|
1548
|
+
}
|
|
1549
|
+
this.dragging && this.lastDrag && (this._dragFollow(this.lastDrag), this._callDrag(this.lastDrag)), this._autoScrollAnimId = requestAnimationFrame(this._autoScrollTick);
|
|
1531
1550
|
};
|
|
1532
1551
|
const i = e?.handle?.substring(1), s = t.gridstackNode;
|
|
1533
|
-
this.dragEls = !i || t.classList.contains(i) ? [t] : s?.subGrid ? [t.querySelector(e.handle) || t] :
|
|
1552
|
+
this.dragEls = !i || t.classList.contains(i) ? [t] : s?.subGrid ? [t.querySelector(e.handle) || t] : this.getAllHandles(), this.dragEls.length === 0 && (this.dragEls = [t]), this._mouseDown = this._mouseDown.bind(this), this._mouseMove = this._mouseMove.bind(this), this._mouseUp = this._mouseUp.bind(this), this._keyEvent = this._keyEvent.bind(this), this.enable();
|
|
1553
|
+
}
|
|
1554
|
+
/** return all handles omitting other nested `.grid-stack-item` children (in case node.subGrid isn't set for some reason) */
|
|
1555
|
+
getAllHandles() {
|
|
1556
|
+
return Array.from(this.el.querySelectorAll(this.option.handle)).filter((t) => {
|
|
1557
|
+
if (!(t instanceof HTMLElement))
|
|
1558
|
+
return !1;
|
|
1559
|
+
const e = t.closest(".grid-stack-item");
|
|
1560
|
+
return e === this.el || !e;
|
|
1561
|
+
});
|
|
1534
1562
|
}
|
|
1535
1563
|
on(t, e) {
|
|
1536
1564
|
super.on(t, e);
|
|
@@ -1540,12 +1568,12 @@ class z extends S {
|
|
|
1540
1568
|
}
|
|
1541
1569
|
enable() {
|
|
1542
1570
|
this.disabled !== !1 && (super.enable(), this.dragEls.forEach((t) => {
|
|
1543
|
-
t.addEventListener("mousedown", this._mouseDown), b && (t.addEventListener("touchstart",
|
|
1571
|
+
t.addEventListener("mousedown", this._mouseDown), b && (t.addEventListener("touchstart", H), t.addEventListener("pointerdown", k));
|
|
1544
1572
|
}), this.el.classList.remove("ui-draggable-disabled"));
|
|
1545
1573
|
}
|
|
1546
1574
|
disable(t = !1) {
|
|
1547
1575
|
this.disabled !== !0 && (super.disable(), this.dragEls.forEach((e) => {
|
|
1548
|
-
e.removeEventListener("mousedown", this._mouseDown), b && (e.removeEventListener("touchstart",
|
|
1576
|
+
e.removeEventListener("mousedown", this._mouseDown), b && (e.removeEventListener("touchstart", H), e.removeEventListener("pointerdown", k));
|
|
1549
1577
|
}), t || this.el.classList.add("ui-draggable-disabled"));
|
|
1550
1578
|
}
|
|
1551
1579
|
destroy() {
|
|
@@ -1557,7 +1585,7 @@ class z extends S {
|
|
|
1557
1585
|
/** @internal call when mouse goes down before a dragstart happens */
|
|
1558
1586
|
_mouseDown(t) {
|
|
1559
1587
|
if (w.touchHandled && t.isTrusted && (w.touchHandled = !1), !f.mouseHandled)
|
|
1560
|
-
return t.button !== 0 || !this.dragEls.find((e) => e === t.target) && t.target.closest(
|
|
1588
|
+
return t.button !== 0 || !this.dragEls.find((e) => e === t.target) && t.target.closest(U) || this.option.cancel && t.target.closest(this.option.cancel) || (this.mouseDownEvent = t, delete this.dragging, delete f.dragElement, delete f.dropElement, delete this._autoScrollMaxSpeed, delete this._autoScrollContainer, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), b && (t.currentTarget.addEventListener("touchmove", N), t.currentTarget.addEventListener("touchend", T)), t.preventDefault(), document.activeElement && document.activeElement.blur(), f.mouseHandled = !0), !0;
|
|
1561
1589
|
}
|
|
1562
1590
|
/** @internal method to call actual drag event */
|
|
1563
1591
|
_callDrag(t) {
|
|
@@ -1586,7 +1614,7 @@ class z extends S {
|
|
|
1586
1614
|
}
|
|
1587
1615
|
/** @internal call when the mouse gets released to drop the item at current location */
|
|
1588
1616
|
_mouseUp(t) {
|
|
1589
|
-
if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), b && t.currentTarget && (t.currentTarget.removeEventListener("touchmove",
|
|
1617
|
+
if (this._stopScrolling(), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), b && t.currentTarget && (t.currentTarget.removeEventListener("touchmove", N, !0), t.currentTarget.removeEventListener("touchend", T, !0)), this.dragging) {
|
|
1590
1618
|
delete this.dragging, delete this.el.gridstackNode?._origRotate, document.removeEventListener("keydown", this._keyEvent), f.dropElement?.el === this.el.parentElement && delete f.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
|
|
1591
1619
|
const e = h.initEvent(t, { target: this.el, type: "dragstop" });
|
|
1592
1620
|
this.option.stop && this.option.stop(e), this.triggerEvent("dragstop", e), f.dropElement && f.dropElement.drop(t);
|
|
@@ -1601,7 +1629,10 @@ class z extends S {
|
|
|
1601
1629
|
else if (e && i && (t.key === "r" || t.key === "R")) {
|
|
1602
1630
|
if (!h.canBeRotated(e))
|
|
1603
1631
|
return;
|
|
1604
|
-
e._origRotate = e._origRotate || { ...e._orig }, delete e._moving, i.setAnimation(!1).rotate(e.el, {
|
|
1632
|
+
e._origRotate = e._origRotate || { ...e._orig }, delete e._moving, i.setAnimation(!1).rotate(e.el, {
|
|
1633
|
+
top: -this.dragOffset.offsetTop,
|
|
1634
|
+
left: -this.dragOffset.offsetX
|
|
1635
|
+
}).setAnimation(), e._moving = !0, this.dragOffset = this._getDragOffset(this.lastDrag, e.el, this.helperContainment), this.helper.style.width = this.dragOffset.width + "px", this.helper.style.height = this.dragOffset.height + "px", h.swap(e._orig, "w", "h"), delete e._rect, this._mouseMove(this.lastDrag);
|
|
1605
1636
|
}
|
|
1606
1637
|
}
|
|
1607
1638
|
/** @internal create a clone copy (or user defined method) of the original drag item if set */
|
|
@@ -1613,7 +1644,7 @@ class z extends S {
|
|
|
1613
1644
|
_setupHelperStyle(t) {
|
|
1614
1645
|
this.helper.classList.add("ui-draggable-dragging"), this.el.gridstackNode?.grid?.el.classList.add("grid-stack-dragging");
|
|
1615
1646
|
const e = this.helper.style;
|
|
1616
|
-
return e.pointerEvents = "none", e.width = this.dragOffset.width + "px", e.height = this.dragOffset.height + "px", e.willChange = "left, top", e.position = "fixed", this._dragFollow(t), e.transition = "none", setTimeout(() => {
|
|
1647
|
+
return e.pointerEvents = "none", e.width = this.dragOffset.width + "px", e.height = this.dragOffset.height + "px", e.willChange = "left, right, top", e.position = "fixed", this._dragFollow(t), e.transition = "none", setTimeout(() => {
|
|
1617
1648
|
this.helper && (e.transition = null);
|
|
1618
1649
|
}, 0), this;
|
|
1619
1650
|
}
|
|
@@ -1627,8 +1658,8 @@ class z extends S {
|
|
|
1627
1658
|
}
|
|
1628
1659
|
/** @internal updates the top/left position to follow the mouse */
|
|
1629
1660
|
_dragFollow(t) {
|
|
1630
|
-
const e =
|
|
1631
|
-
|
|
1661
|
+
const e = this.helper.style, i = this.dragOffset;
|
|
1662
|
+
this.option.rtl ? (e.right = (window.innerWidth - t.clientX + i.offsetX) * this.dragTransform.xScale + "px", e.left && (e.left = "")) : (e.left = (t.clientX + i.offsetX) * this.dragTransform.xScale + "px", e.right && (e.right = "")), e.top = (t.clientY + i.offsetTop) * this.dragTransform.yScale + "px";
|
|
1632
1663
|
}
|
|
1633
1664
|
/** @internal */
|
|
1634
1665
|
_setupHelperContainmentStyle() {
|
|
@@ -1639,22 +1670,40 @@ class z extends S {
|
|
|
1639
1670
|
let s = 0, r = 0;
|
|
1640
1671
|
i && (s = this.dragTransform.xOffset, r = this.dragTransform.yOffset);
|
|
1641
1672
|
const n = e.getBoundingClientRect();
|
|
1673
|
+
let o = this.option.rtl ? n.right : n.left, d = this.option.rtl ? t.clientX - n.right + s : -t.clientX + n.left - s;
|
|
1642
1674
|
return {
|
|
1643
|
-
|
|
1675
|
+
x: o,
|
|
1644
1676
|
top: n.top,
|
|
1645
|
-
|
|
1677
|
+
offsetX: d,
|
|
1646
1678
|
offsetTop: -t.clientY + n.top - r,
|
|
1647
1679
|
width: n.width * this.dragTransform.xScale,
|
|
1648
1680
|
height: n.height * this.dragTransform.yScale
|
|
1649
1681
|
};
|
|
1650
1682
|
}
|
|
1683
|
+
/** @internal starts or continues auto-scroll when the dragged helper is clipped by the scroll container.
|
|
1684
|
+
* Takes the grid's own element to find the scroll container so external/sidebar drags work too (#2074). */
|
|
1685
|
+
updateScrollPosition(t) {
|
|
1686
|
+
this._autoScrollContainer = h.getScrollElement(t), this._getClipping(this.helper, this._autoScrollContainer) === 0 ? this._stopScrolling() : this._autoScrollAnimId || (this._autoScrollAnimId = requestAnimationFrame(this._autoScrollTick));
|
|
1687
|
+
}
|
|
1688
|
+
/** @internal compute how many pixels the element is clipped: negative = above, positive = below, 0 = fully inside OR outside (stop scrolling) */
|
|
1689
|
+
_getClipping(t, e) {
|
|
1690
|
+
const i = t.getBoundingClientRect(), s = e.getBoundingClientRect(), r = window.innerHeight || document.documentElement.clientHeight;
|
|
1691
|
+
if (i.bottom < s.top || i.top > s.bottom)
|
|
1692
|
+
return 0;
|
|
1693
|
+
const n = i.bottom - Math.min(s.bottom, r), o = i.top - Math.max(s.top, 0);
|
|
1694
|
+
return o < 0 ? o : n > 0 ? n : 0;
|
|
1695
|
+
}
|
|
1696
|
+
/** @internal stop any active auto-scroll animation */
|
|
1697
|
+
_stopScrolling() {
|
|
1698
|
+
this._autoScrollAnimId && (cancelAnimationFrame(this._autoScrollAnimId), delete this._autoScrollAnimId);
|
|
1699
|
+
}
|
|
1651
1700
|
/** @internal TODO: set to public as called by DDDroppable! */
|
|
1652
1701
|
ui() {
|
|
1653
|
-
const e = this.el.parentElement.getBoundingClientRect(), i = this.helper.getBoundingClientRect();
|
|
1702
|
+
const e = this.el.parentElement.getBoundingClientRect(), i = this.helper.getBoundingClientRect(), s = this.option.rtl ? (e.right - i.right) * this.dragTransform.xScale : (i.left - e.left) * this.dragTransform.xScale;
|
|
1654
1703
|
return {
|
|
1655
1704
|
position: {
|
|
1656
1705
|
top: (i.top - e.top) * this.dragTransform.yScale,
|
|
1657
|
-
left:
|
|
1706
|
+
left: s
|
|
1658
1707
|
}
|
|
1659
1708
|
/* not used by GridStack for now...
|
|
1660
1709
|
helper: [this.helper], //The object arr representing the helper that's being dragged.
|
|
@@ -1663,8 +1712,8 @@ class z extends S {
|
|
|
1663
1712
|
};
|
|
1664
1713
|
}
|
|
1665
1714
|
}
|
|
1666
|
-
z.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
|
|
1667
|
-
class
|
|
1715
|
+
z.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "right", "top", "minWidth", "willChange"];
|
|
1716
|
+
class F extends S {
|
|
1668
1717
|
constructor(t, e = {}) {
|
|
1669
1718
|
super(), this.el = t, this.option = e, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
|
|
1670
1719
|
}
|
|
@@ -1675,10 +1724,10 @@ class Y extends S {
|
|
|
1675
1724
|
super.off(t);
|
|
1676
1725
|
}
|
|
1677
1726
|
enable() {
|
|
1678
|
-
this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), b && (this.el.addEventListener("pointerenter",
|
|
1727
|
+
this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), b && (this.el.addEventListener("pointerenter", P), this.el.addEventListener("pointerleave", B)));
|
|
1679
1728
|
}
|
|
1680
1729
|
disable(t = !1) {
|
|
1681
|
-
this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), t || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), b && (this.el.removeEventListener("pointerenter",
|
|
1730
|
+
this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), t || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), b && (this.el.removeEventListener("pointerenter", P), this.el.removeEventListener("pointerleave", B)));
|
|
1682
1731
|
}
|
|
1683
1732
|
destroy() {
|
|
1684
1733
|
this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
|
|
@@ -1690,7 +1739,7 @@ class Y extends S {
|
|
|
1690
1739
|
_mouseEnter(t) {
|
|
1691
1740
|
if (!f.dragElement || w.touchHandled && t.isTrusted || !this._canDrop(f.dragElement.el))
|
|
1692
1741
|
return;
|
|
1693
|
-
t.preventDefault(), t.stopPropagation(), f.dropElement && f.dropElement !== this && f.dropElement._mouseLeave(t, !0), f.dropElement = this;
|
|
1742
|
+
t.preventDefault(), t.stopPropagation(), f.dragElement._stopScrolling(), f.dropElement && f.dropElement !== this && f.dropElement._mouseLeave(t, !0), f.dropElement = this;
|
|
1694
1743
|
const e = h.initEvent(t, { target: this.el, type: "dropover" });
|
|
1695
1744
|
this.option.over && this.option.over(e, this._ui(f.dragElement)), this.triggerEvent("dropover", e), this.el.classList.add("ui-droppable-over");
|
|
1696
1745
|
}
|
|
@@ -1698,7 +1747,7 @@ class Y extends S {
|
|
|
1698
1747
|
_mouseLeave(t, e = !1) {
|
|
1699
1748
|
if (!f.dragElement || f.dropElement !== this)
|
|
1700
1749
|
return;
|
|
1701
|
-
t.preventDefault(), t.stopPropagation();
|
|
1750
|
+
t.preventDefault(), t.stopPropagation(), e && f.dragElement._stopScrolling();
|
|
1702
1751
|
const i = h.initEvent(t, { target: this.el, type: "dropout" });
|
|
1703
1752
|
if (this.option.out && this.option.out(i, this._ui(f.dragElement)), this.triggerEvent("dropout", i), f.dropElement === this && (delete f.dropElement, !e)) {
|
|
1704
1753
|
let s, r = this.el.parentElement;
|
|
@@ -1729,9 +1778,9 @@ class Y extends S {
|
|
|
1729
1778
|
};
|
|
1730
1779
|
}
|
|
1731
1780
|
}
|
|
1732
|
-
class
|
|
1781
|
+
class O {
|
|
1733
1782
|
static init(t) {
|
|
1734
|
-
return t.ddElement || (t.ddElement = new
|
|
1783
|
+
return t.ddElement || (t.ddElement = new O(t)), t.ddElement;
|
|
1735
1784
|
}
|
|
1736
1785
|
constructor(t) {
|
|
1737
1786
|
this.el = t;
|
|
@@ -1755,13 +1804,13 @@ class P {
|
|
|
1755
1804
|
return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
|
|
1756
1805
|
}
|
|
1757
1806
|
setupDroppable(t) {
|
|
1758
|
-
return this.ddDroppable ? this.ddDroppable.updateOption(t) : this.ddDroppable = new
|
|
1807
|
+
return this.ddDroppable ? this.ddDroppable.updateOption(t) : this.ddDroppable = new F(this.el, t), this;
|
|
1759
1808
|
}
|
|
1760
1809
|
cleanDroppable() {
|
|
1761
1810
|
return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
|
|
1762
1811
|
}
|
|
1763
1812
|
}
|
|
1764
|
-
class
|
|
1813
|
+
class X {
|
|
1765
1814
|
/**
|
|
1766
1815
|
* Enable/disable/configure resizing for grid elements.
|
|
1767
1816
|
*
|
|
@@ -1794,7 +1843,8 @@ class q {
|
|
|
1794
1843
|
autoHide: l,
|
|
1795
1844
|
start: e.start,
|
|
1796
1845
|
stop: e.stop,
|
|
1797
|
-
resize: e.resize
|
|
1846
|
+
resize: e.resize,
|
|
1847
|
+
rtl: e.rtl
|
|
1798
1848
|
});
|
|
1799
1849
|
}
|
|
1800
1850
|
}), this;
|
|
@@ -1806,6 +1856,7 @@ class q {
|
|
|
1806
1856
|
* @param opts - Drag options or command ('enable', 'disable', 'destroy', 'option', or config object)
|
|
1807
1857
|
* @param key - Option key when using 'option' command
|
|
1808
1858
|
* @param value - Option value when using 'option' command
|
|
1859
|
+
* @param rtl - Are we in rtl mode?
|
|
1809
1860
|
* @returns this instance for chaining
|
|
1810
1861
|
*
|
|
1811
1862
|
* @example
|
|
@@ -1827,7 +1878,8 @@ class q {
|
|
|
1827
1878
|
// containment: (grid.parentGridNode && grid.opts.dragOut === false) ? grid.el.parentElement : (grid.opts.draggable.containment || null),
|
|
1828
1879
|
start: e.start,
|
|
1829
1880
|
stop: e.stop,
|
|
1830
|
-
drag: e.drag
|
|
1881
|
+
drag: e.drag,
|
|
1882
|
+
rtl: e.rtl
|
|
1831
1883
|
});
|
|
1832
1884
|
}
|
|
1833
1885
|
}), this;
|
|
@@ -1863,18 +1915,18 @@ class q {
|
|
|
1863
1915
|
/** @internal returns a list of DD elements, creating them on the fly by default unless option is to destroy or disable */
|
|
1864
1916
|
_getDDElements(t, e) {
|
|
1865
1917
|
const i = t.gridstack || e !== "destroy" && e !== "disable", s = h.getElements(t);
|
|
1866
|
-
return s.length ? s.map((n) => n.ddElement || (i ?
|
|
1918
|
+
return s.length ? s.map((n) => n.ddElement || (i ? O.init(n) : null)).filter((n) => n) : [];
|
|
1867
1919
|
}
|
|
1868
1920
|
}
|
|
1869
1921
|
/*!
|
|
1870
|
-
* GridStack 12.
|
|
1922
|
+
* GridStack 12.6.0
|
|
1871
1923
|
* https://gridstackjs.com/
|
|
1872
1924
|
*
|
|
1873
1925
|
* Copyright (c) 2021-2025 Alain Dumesny
|
|
1874
1926
|
* see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
|
|
1875
1927
|
*/
|
|
1876
|
-
const y = new
|
|
1877
|
-
class
|
|
1928
|
+
const y = new X();
|
|
1929
|
+
class g {
|
|
1878
1930
|
/**
|
|
1879
1931
|
* initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
|
|
1880
1932
|
* simply return the existing instance (ignore any passed options). There is also an initAll() version that support
|
|
@@ -1891,8 +1943,8 @@ class c {
|
|
|
1891
1943
|
static init(t = {}, e = ".grid-stack") {
|
|
1892
1944
|
if (typeof document > "u")
|
|
1893
1945
|
return null;
|
|
1894
|
-
const i =
|
|
1895
|
-
return i ? (i.gridstack || (i.gridstack = new
|
|
1946
|
+
const i = g.getGridElement(e);
|
|
1947
|
+
return i ? (i.gridstack || (i.gridstack = new g(i, h.cloneDeep(t))), i.gridstack) : (console.error(typeof e == "string" ? 'GridStack.initAll() no grid was found with selector "' + e + `" - element missing or wrong selector ?
|
|
1896
1948
|
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.` : "GridStack.init() no grid element was passed."), null);
|
|
1897
1949
|
}
|
|
1898
1950
|
/**
|
|
@@ -1906,8 +1958,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
1906
1958
|
*/
|
|
1907
1959
|
static initAll(t = {}, e = ".grid-stack") {
|
|
1908
1960
|
const i = [];
|
|
1909
|
-
return typeof document > "u" || (
|
|
1910
|
-
s.gridstack || (s.gridstack = new
|
|
1961
|
+
return typeof document > "u" || (g.getGridElements(e).forEach((s) => {
|
|
1962
|
+
s.gridstack || (s.gridstack = new g(s, h.cloneDeep(t))), i.push(s.gridstack);
|
|
1911
1963
|
}), i.length === 0 && console.error('GridStack.initAll() no grid was found with selector "' + e + `" - element missing or wrong selector ?
|
|
1912
1964
|
Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`)), i;
|
|
1913
1965
|
}
|
|
@@ -1926,14 +1978,14 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
1926
1978
|
const n = i.gridstack;
|
|
1927
1979
|
return e && (n.opts = { ...n.opts, ...e }), e.children !== void 0 && n.load(e.children), n;
|
|
1928
1980
|
}
|
|
1929
|
-
return (!t.classList.contains("grid-stack") ||
|
|
1981
|
+
return (!t.classList.contains("grid-stack") || g.addRemoveCB) && (g.addRemoveCB ? i = g.addRemoveCB(t, e, !0, !0) : i = h.createDiv(["grid-stack", e.class], t)), g.init(e, i);
|
|
1930
1982
|
}
|
|
1931
1983
|
/** call this method to register your engine instead of the default one.
|
|
1932
1984
|
* See instead `GridStackOptions.engineClass` if you only need to
|
|
1933
1985
|
* replace just one instance.
|
|
1934
1986
|
*/
|
|
1935
1987
|
static registerEngine(t) {
|
|
1936
|
-
|
|
1988
|
+
g.engineClass = t;
|
|
1937
1989
|
}
|
|
1938
1990
|
/**
|
|
1939
1991
|
* @internal create placeholder DIV as needed
|
|
@@ -1986,7 +2038,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
1986
2038
|
delete e.cellHeight, this.cellHeight(l);
|
|
1987
2039
|
}
|
|
1988
2040
|
e.alwaysShowResizeHandle === "mobile" && (e.alwaysShowResizeHandle = b), this._setStaticClass();
|
|
1989
|
-
const d = e.engineClass ||
|
|
2041
|
+
const d = e.engineClass || g.engineClass || x;
|
|
1990
2042
|
if (this.engine = new d({
|
|
1991
2043
|
column: this.getColumn(),
|
|
1992
2044
|
float: e.float,
|
|
@@ -2029,7 +2081,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2029
2081
|
if (t.ELEMENT_NODE)
|
|
2030
2082
|
return console.error("V11: GridStack.addWidget() does not support HTMLElement anymore. use makeWidget()"), this.makeWidget(t);
|
|
2031
2083
|
let e, i = t;
|
|
2032
|
-
if (i.grid = this, i.el ? e = i.el :
|
|
2084
|
+
if (i.grid = this, i.el ? e = i.el : g.addRemoveCB ? e = g.addRemoveCB(this.el, t, !0, !1) : e = this.createWidgetDivs(i), !e)
|
|
2033
2085
|
return;
|
|
2034
2086
|
if (i = e.gridstackNode, i && e.parentElement === this.el && this.engine.nodes.find((r) => r._id === i._id))
|
|
2035
2087
|
return e;
|
|
@@ -2048,8 +2100,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2048
2100
|
createWidgetDivs(t) {
|
|
2049
2101
|
const e = h.createDiv(["grid-stack-item", this.opts.itemClass]), i = h.createDiv(["grid-stack-item-content"], e);
|
|
2050
2102
|
return h.lazyLoad(t) ? t.visibleObservable || (t.visibleObservable = new IntersectionObserver(([s]) => {
|
|
2051
|
-
s.isIntersecting && (t.visibleObservable?.disconnect(), delete t.visibleObservable,
|
|
2052
|
-
}), window.setTimeout(() => t.visibleObservable?.observe(e))) :
|
|
2103
|
+
s.isIntersecting && (t.visibleObservable?.disconnect(), delete t.visibleObservable, g.renderCB(i, t), t.grid?.prepareDragDrop(t.el));
|
|
2104
|
+
}), window.setTimeout(() => t.visibleObservable?.observe(e))) : g.renderCB(i, t), e;
|
|
2053
2105
|
}
|
|
2054
2106
|
/**
|
|
2055
2107
|
* Convert an existing gridItem element into a sub-grid with the given (optional) options, else inherit them
|
|
@@ -2082,12 +2134,12 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2082
2134
|
let d;
|
|
2083
2135
|
e.column === "auto" && (d = !0, e.column = Math.max(r.w || 1, i?.w || 1), delete e.columnOpts);
|
|
2084
2136
|
let l = r.el.querySelector(".grid-stack-item-content"), a, u;
|
|
2085
|
-
if (s && (this._removeDD(r.el), u = { ...r, x: 0, y: 0 }, h.removeInternalForSave(u), delete u.subGridOpts, r.content && (u.content = r.content, delete r.content),
|
|
2137
|
+
if (s && (this._removeDD(r.el), u = { ...r, x: 0, y: 0 }, h.removeInternalForSave(u), delete u.subGridOpts, r.content && (u.content = r.content, delete r.content), g.addRemoveCB ? a = g.addRemoveCB(this.el, u, !0, !1) : (a = h.createDiv(["grid-stack-item"]), a.appendChild(l), l = h.createDiv(["grid-stack-item-content"], r.el)), this.prepareDragDrop(r.el)), i) {
|
|
2086
2138
|
const p = d ? e.column : r.w, _ = r.h + i.h, E = r.el.style;
|
|
2087
2139
|
E.transition = "none", this.update(r.el, { w: p, h: _ }), setTimeout(() => E.transition = null);
|
|
2088
2140
|
}
|
|
2089
|
-
const
|
|
2090
|
-
return i?._moving && (
|
|
2141
|
+
const c = r.subGrid = g.addGrid(l, e);
|
|
2142
|
+
return i?._moving && (c._isTemp = !0), d && (c._autoColumn = !0), s && c.makeWidget(a, u), i && (i._moving ? window.setTimeout(() => h.simulateMouseEvent(i._event, "mouseenter", c.el), 0) : c.makeWidget(r.el, r)), this.resizeToContentCheck(!1, r), c;
|
|
2091
2143
|
}
|
|
2092
2144
|
/**
|
|
2093
2145
|
* called when an item was converted into a nested grid to accommodate a dragged over item, but then item leaves - return back
|
|
@@ -2112,7 +2164,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2112
2164
|
* NOTE2: nested grids will ALWAYS save to the container size to be in sync with parent.
|
|
2113
2165
|
* @returns list of widgets or full grid option, including .children list of widgets
|
|
2114
2166
|
*/
|
|
2115
|
-
save(t = !0, e = !1, i =
|
|
2167
|
+
save(t = !0, e = !1, i = g.saveCB, s) {
|
|
2116
2168
|
const r = this.engine.save(t, i, s);
|
|
2117
2169
|
if (r.forEach((n) => {
|
|
2118
2170
|
if (t && n.el && !n.subGrid && !i) {
|
|
@@ -2166,36 +2218,36 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2166
2218
|
*
|
|
2167
2219
|
* @see {@link http://gridstackjs.com/demo/serialization.html} for complete example
|
|
2168
2220
|
*/
|
|
2169
|
-
load(t, e =
|
|
2170
|
-
t = h.cloneDeep(t);
|
|
2171
|
-
const i = this.getColumn();
|
|
2221
|
+
load(t, e = g.addRemoveCB || !0) {
|
|
2172
2222
|
t.forEach((a) => {
|
|
2173
2223
|
a.w = a.w || a.minW || 1, a.h = a.h || a.minH || 1;
|
|
2174
2224
|
}), t = h.sort(t), this.engine.skipCacheUpdate = this._ignoreLayoutsNodeChange = !0;
|
|
2175
|
-
let
|
|
2225
|
+
let i = 0;
|
|
2176
2226
|
t.forEach((a) => {
|
|
2177
|
-
|
|
2178
|
-
}),
|
|
2179
|
-
const
|
|
2180
|
-
|
|
2227
|
+
i = Math.max(i, (a.x || 0) + a.w);
|
|
2228
|
+
}), i > this.engine.defaultColumn && (this.engine.defaultColumn = i);
|
|
2229
|
+
const s = this.getColumn();
|
|
2230
|
+
i > s && (this.engine.nodes.length === 0 && this.responseLayout ? (this.engine.nodes = t, this.engine.columnChanged(i, s, this.responseLayout), t = this.engine.nodes, this.engine.nodes = [], delete this.responseLayout) : this.engine.cacheLayout(t, i, !0));
|
|
2231
|
+
const r = g.addRemoveCB;
|
|
2232
|
+
typeof e == "function" && (g.addRemoveCB = e);
|
|
2181
2233
|
const n = [];
|
|
2182
2234
|
this.batchUpdate();
|
|
2183
2235
|
const o = !this.engine.nodes.length, d = o && this.opts.animate;
|
|
2184
2236
|
d && this.setAnimation(!1), !o && e && [...this.engine.nodes].forEach((u) => {
|
|
2185
2237
|
if (!u.id)
|
|
2186
2238
|
return;
|
|
2187
|
-
h.find(t, u.id) || (
|
|
2239
|
+
h.find(t, u.id) || (g.addRemoveCB && g.addRemoveCB(this.el, u, !1, !1), n.push(u), this.removeWidget(u.el, !0, !1));
|
|
2188
2240
|
}), this.engine._loading = !0;
|
|
2189
2241
|
const l = [];
|
|
2190
2242
|
return this.engine.nodes = this.engine.nodes.filter((a) => h.find(t, a.id) ? (l.push(a), !1) : !0), t.forEach((a) => {
|
|
2191
2243
|
const u = h.find(l, a.id);
|
|
2192
2244
|
if (u) {
|
|
2193
2245
|
if (h.shouldSizeToContent(u) && (a.h = u.h), this.engine.nodeBoundFix(a), (a.autoPosition || a.x === void 0 || a.y === void 0) && (a.w = a.w || u.w, a.h = a.h || u.h, this.engine.findEmptyPosition(a)), this.engine.nodes.push(u), h.samePos(u, a) && this.engine.nodes.length > 1 && (this.moveNode(u, { ...a, forceCollide: !0 }), h.copyPos(a, u)), this.update(u.el, a), a.subGridOpts?.children) {
|
|
2194
|
-
const
|
|
2195
|
-
|
|
2246
|
+
const c = u.el.querySelector(".grid-stack");
|
|
2247
|
+
c && c.gridstack && c.gridstack.load(a.subGridOpts.children);
|
|
2196
2248
|
}
|
|
2197
2249
|
} else e && this.addWidget(a);
|
|
2198
|
-
}), delete this.engine._loading, this.engine.removedNodes = n, this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this.engine.skipCacheUpdate, r ?
|
|
2250
|
+
}), delete this.engine._loading, this.engine.removedNodes = n, this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this.engine.skipCacheUpdate, r ? g.addRemoveCB = r : delete g.addRemoveCB, d && this.setAnimation(!0, !0), this;
|
|
2199
2251
|
}
|
|
2200
2252
|
/**
|
|
2201
2253
|
* use before calling a bunch of `addWidget()` to prevent un-necessary relayouts in between (more efficient)
|
|
@@ -2508,7 +2560,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2508
2560
|
* grid.makeWidget(element, {x: 0, y: 1, w: 4, h: 2});
|
|
2509
2561
|
*/
|
|
2510
2562
|
makeWidget(t, e) {
|
|
2511
|
-
const i =
|
|
2563
|
+
const i = g.getElement(t);
|
|
2512
2564
|
if (!i || i.gridstackNode)
|
|
2513
2565
|
return i;
|
|
2514
2566
|
i.parentElement || this.el.appendChild(i), this._prepareElement(i, !0, e);
|
|
@@ -2547,11 +2599,11 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2547
2599
|
* @param triggerEvent if `false` (quiet mode) element will not be added to removed list and no 'removed' callbacks will be called (Default? true).
|
|
2548
2600
|
*/
|
|
2549
2601
|
removeWidget(t, e = !0, i = !0) {
|
|
2550
|
-
return t ? (
|
|
2602
|
+
return t ? (g.getElements(t).forEach((s) => {
|
|
2551
2603
|
if (s.parentElement && s.parentElement !== this.el)
|
|
2552
2604
|
return;
|
|
2553
2605
|
let r = s.gridstackNode;
|
|
2554
|
-
r || (r = this.engine.nodes.find((n) => s === n.el)), r && (e &&
|
|
2606
|
+
r || (r = this.engine.nodes.find((n) => s === n.el)), r && (e && g.addRemoveCB && g.addRemoveCB(this.el, r, !1, !1), delete s.gridstackNode, this._removeDD(s), this.engine.removeNode(r, e, i), e && s.parentElement && s.remove());
|
|
2555
2607
|
}), i && (this._triggerRemoveEvent(), this._triggerChangeEvent()), this) : (console.error("Error: GridStack.removeWidget(undefined) called"), this);
|
|
2556
2608
|
}
|
|
2557
2609
|
/**
|
|
@@ -2561,7 +2613,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2561
2613
|
*/
|
|
2562
2614
|
removeAll(t = !0, e = !0) {
|
|
2563
2615
|
return this.engine.nodes.forEach((i) => {
|
|
2564
|
-
t &&
|
|
2616
|
+
t && g.addRemoveCB && g.addRemoveCB(this.el, i, !1, !1), delete i.el.gridstackNode, this.opts.staticGrid || this._removeDD(i.el);
|
|
2565
2617
|
}), this.engine.removeAll(t, e), e && this._triggerRemoveEvent(), this;
|
|
2566
2618
|
}
|
|
2567
2619
|
/**
|
|
@@ -2597,7 +2649,13 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2597
2649
|
*/
|
|
2598
2650
|
updateOptions(t) {
|
|
2599
2651
|
const e = this.opts;
|
|
2600
|
-
|
|
2652
|
+
if (t === e)
|
|
2653
|
+
return this;
|
|
2654
|
+
if (t.acceptWidgets !== void 0 && (e.acceptWidgets = t.acceptWidgets, this._setupAcceptWidget()), t.animate !== void 0 && this.setAnimation(t.animate), t.cellHeight && this.cellHeight(t.cellHeight), t.class !== void 0 && t.class !== e.class && (e.class && this.el.classList.remove(e.class), t.class && this.el.classList.add(t.class)), t.columnOpts) {
|
|
2655
|
+
const i = !!this.opts.columnOpts;
|
|
2656
|
+
this.opts.columnOpts = t.columnOpts, i !== !!this.opts.columnOpts && this._updateResizeEvent(), this.checkDynamicColumn();
|
|
2657
|
+
} else t.columnOpts === null && this.opts.columnOpts ? (delete this.opts.columnOpts, this._updateResizeEvent()) : typeof t.column == "number" && this.column(t.column);
|
|
2658
|
+
return t.margin !== void 0 && this.margin(t.margin), t.staticGrid !== void 0 && this.setStatic(t.staticGrid), t.disableDrag !== void 0 && !t.staticGrid && this.enableMove(!t.disableDrag), t.disableResize !== void 0 && !t.staticGrid && this.enableResize(!t.disableResize), t.float !== void 0 && this.float(t.float), t.row !== void 0 ? (e.minRow = e.maxRow = e.row = t.row, this._updateContainerHeight()) : (t.minRow !== void 0 && (e.minRow = t.minRow, this._updateContainerHeight()), t.maxRow !== void 0 && (e.maxRow = this.engine.maxRow = t.maxRow)), t.lazyLoad !== void 0 && (e.lazyLoad = t.lazyLoad), t.children?.length && this.load(t.children), this;
|
|
2601
2659
|
}
|
|
2602
2660
|
/**
|
|
2603
2661
|
* Updates widget position/size and other info. This is used to change widget properties after creation.
|
|
@@ -2626,7 +2684,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2626
2684
|
* });
|
|
2627
2685
|
*/
|
|
2628
2686
|
update(t, e) {
|
|
2629
|
-
return
|
|
2687
|
+
return g.getElements(t).forEach((i) => {
|
|
2630
2688
|
const s = i?.gridstackNode;
|
|
2631
2689
|
if (!s)
|
|
2632
2690
|
return;
|
|
@@ -2638,7 +2696,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2638
2696
|
o[a] = r[a] !== void 0 ? r[a] : s[a], delete r[a];
|
|
2639
2697
|
})), !o && (r.minW || r.minH || r.maxW || r.maxH) && (o = {}), r.content !== void 0) {
|
|
2640
2698
|
const a = i.querySelector(".grid-stack-item-content");
|
|
2641
|
-
a && a.textContent !== r.content && (s.content = r.content,
|
|
2699
|
+
a && a.textContent !== r.content && (s.content = r.content, g.renderCB(a, r), s.subGrid?.el && (a.appendChild(s.subGrid.el), s.subGrid._updateContainerHeight())), delete r.content;
|
|
2642
2700
|
}
|
|
2643
2701
|
let d = !1, l = !1;
|
|
2644
2702
|
for (const a in r)
|
|
@@ -2647,7 +2705,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2647
2705
|
const a = o.w !== void 0 && o.w !== s.w;
|
|
2648
2706
|
this.moveNode(s, o), a && s.subGrid ? s.subGrid.onResize(this.hasAnimationCSS() ? s.w : void 0) : this.resizeToContentCheck(a, s), delete s._orig;
|
|
2649
2707
|
}
|
|
2650
|
-
(o || d) && this._writeAttr(i, s), l && this.prepareDragDrop(s.el),
|
|
2708
|
+
(o || d) && this._writeAttr(i, s), l && this.prepareDragDrop(s.el), g.updateCB && g.updateCB(s);
|
|
2651
2709
|
}), this;
|
|
2652
2710
|
}
|
|
2653
2711
|
moveNode(t, e) {
|
|
@@ -2685,24 +2743,24 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2685
2743
|
if (!s)
|
|
2686
2744
|
return;
|
|
2687
2745
|
let r = e.h ? e.h * s : t.clientHeight, n;
|
|
2688
|
-
if (e.resizeToContentParent && (n = t.querySelector(e.resizeToContentParent)), n || (n = t.querySelector(
|
|
2746
|
+
if (e.resizeToContentParent && (n = t.querySelector(e.resizeToContentParent)), n || (n = t.querySelector(g.resizeToContentParent)), !n)
|
|
2689
2747
|
return;
|
|
2690
2748
|
const o = t.clientHeight - n.clientHeight, d = e.h ? e.h * s - o : n.clientHeight;
|
|
2691
2749
|
let l;
|
|
2692
2750
|
if (e.subGrid) {
|
|
2693
2751
|
l = e.subGrid.getRow() * e.subGrid.getCellHeight(!0);
|
|
2694
|
-
const
|
|
2695
|
-
l +=
|
|
2752
|
+
const c = e.subGrid.el.getBoundingClientRect(), p = t.getBoundingClientRect();
|
|
2753
|
+
l += c.top - p.top;
|
|
2696
2754
|
} else {
|
|
2697
2755
|
if (e.subGridOpts?.children?.length)
|
|
2698
2756
|
return;
|
|
2699
2757
|
{
|
|
2700
|
-
const
|
|
2701
|
-
if (!
|
|
2702
|
-
console.error(`Error: GridStack.resizeToContent() widget id:${e.id} '${
|
|
2758
|
+
const c = n.firstElementChild;
|
|
2759
|
+
if (!c) {
|
|
2760
|
+
console.error(`Error: GridStack.resizeToContent() widget id:${e.id} '${g.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
|
|
2703
2761
|
return;
|
|
2704
2762
|
}
|
|
2705
|
-
l =
|
|
2763
|
+
l = c.getBoundingClientRect().height || d;
|
|
2706
2764
|
}
|
|
2707
2765
|
}
|
|
2708
2766
|
if (d === l)
|
|
@@ -2714,7 +2772,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2714
2772
|
}
|
|
2715
2773
|
/** call the user resize (so they can do extra work) else our build in version */
|
|
2716
2774
|
resizeToContentCBCheck(t) {
|
|
2717
|
-
|
|
2775
|
+
g.resizeToContentCB ? g.resizeToContentCB(t) : this.resizeToContent(t);
|
|
2718
2776
|
}
|
|
2719
2777
|
/**
|
|
2720
2778
|
* Rotate widgets by swapping their width and height. This is typically called when the user presses 'r' during dragging.
|
|
@@ -2732,7 +2790,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2732
2790
|
* grid.rotate(widget, { left: 50, top: 30 });
|
|
2733
2791
|
*/
|
|
2734
2792
|
rotate(t, e) {
|
|
2735
|
-
return
|
|
2793
|
+
return g.getElements(t).forEach((i) => {
|
|
2736
2794
|
const s = i.gridstackNode;
|
|
2737
2795
|
if (!h.canBeRotated(s))
|
|
2738
2796
|
return;
|
|
@@ -2867,7 +2925,11 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2867
2925
|
}
|
|
2868
2926
|
/** @internal write position CSS vars and x,y,w,h attributes (not used for CSS but by users) back to element */
|
|
2869
2927
|
_writePosAttr(t, e) {
|
|
2870
|
-
|
|
2928
|
+
if (!e._moving && !e._resizing || this._placeholder === t) {
|
|
2929
|
+
const i = this.opts.rtl ? "right" : "left";
|
|
2930
|
+
t.style.top = e.y ? e.y === 1 ? "var(--gs-cell-height)" : `calc(${e.y} * var(--gs-cell-height))` : null, t.style[i] = e.x ? e.x === 1 ? "var(--gs-column-width)" : `calc(${e.x} * var(--gs-column-width))` : null, t.style.width = e.w > 1 ? `calc(${e.w} * var(--gs-column-width))` : null, t.style.height = e.h > 1 ? `calc(${e.h} * var(--gs-cell-height))` : null;
|
|
2931
|
+
}
|
|
2932
|
+
return t.setAttribute("gs-x", String(e.x)), t.setAttribute("gs-y", String(e.y)), e.w > 1 ? t.setAttribute("gs-w", String(e.w)) : t.removeAttribute("gs-w"), e.h > 1 ? t.setAttribute("gs-h", String(e.h)) : t.removeAttribute("gs-h"), this;
|
|
2871
2933
|
}
|
|
2872
2934
|
/** @internal call to write any default attributes back to element */
|
|
2873
2935
|
_writeAttr(t, e) {
|
|
@@ -2949,7 +3011,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2949
3011
|
}
|
|
2950
3012
|
/** @internal */
|
|
2951
3013
|
static getGridElement(t) {
|
|
2952
|
-
return
|
|
3014
|
+
return g.getElement(t);
|
|
2953
3015
|
}
|
|
2954
3016
|
/** @internal */
|
|
2955
3017
|
static getGridElements(t) {
|
|
@@ -3015,7 +3077,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3015
3077
|
* grid.movable('#fixed-widget', false);
|
|
3016
3078
|
*/
|
|
3017
3079
|
movable(t, e) {
|
|
3018
|
-
return this.opts.staticGrid ? this : (
|
|
3080
|
+
return this.opts.staticGrid ? this : (g.getElements(t).forEach((i) => {
|
|
3019
3081
|
const s = i.gridstackNode;
|
|
3020
3082
|
s && (e ? delete s.noMove : s.noMove = !0, this.prepareDragDrop(s.el));
|
|
3021
3083
|
}), this);
|
|
@@ -3036,7 +3098,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3036
3098
|
* grid.resizable('#fixed-size-widget', false);
|
|
3037
3099
|
*/
|
|
3038
3100
|
resizable(t, e) {
|
|
3039
|
-
return this.opts.staticGrid ? this : (
|
|
3101
|
+
return this.opts.staticGrid ? this : (g.getElements(t).forEach((i) => {
|
|
3040
3102
|
const s = i.gridstackNode;
|
|
3041
3103
|
s && (e ? delete s.noResize : s.noResize = !0, this.prepareDragDrop(s.el));
|
|
3042
3104
|
}), this);
|
|
@@ -3140,7 +3202,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3140
3202
|
/** @internal call when drag (and drop) needs to be cancelled (Esc key) */
|
|
3141
3203
|
cancelDrag() {
|
|
3142
3204
|
const t = this._placeholder?.gridstackNode;
|
|
3143
|
-
t && (t._isExternal ? (t._isAboutToRemove = !0, this.engine.removeNode(t)) : t._isAboutToRemove &&
|
|
3205
|
+
t && (t._isExternal ? (t._isAboutToRemove = !0, this.engine.removeNode(t)) : t._isAboutToRemove && g._itemRemoving(t.el, !1), this.engine.restoreInitial());
|
|
3144
3206
|
}
|
|
3145
3207
|
/** @internal removes any drag&drop present (called during destroy) */
|
|
3146
3208
|
_removeDD(t) {
|
|
@@ -3158,8 +3220,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3158
3220
|
return;
|
|
3159
3221
|
if (!o.grid?.el) {
|
|
3160
3222
|
n.style.transform = `scale(${1 / this.dragTransform.xScale},${1 / this.dragTransform.yScale})`;
|
|
3161
|
-
const
|
|
3162
|
-
n.style.left =
|
|
3223
|
+
const c = n.getBoundingClientRect();
|
|
3224
|
+
n.style.left = c.x + (this.dragTransform.xScale - 1) * (s.clientX - c.x) / this.dragTransform.xScale + "px", n.style.top = c.y + (this.dragTransform.yScale - 1) * (s.clientY - c.y) / this.dragTransform.yScale + "px", n.style.transformOrigin = "0px 0px";
|
|
3163
3225
|
}
|
|
3164
3226
|
let { top: d, left: l } = n.getBoundingClientRect();
|
|
3165
3227
|
const a = this.el.getBoundingClientRect();
|
|
@@ -3221,7 +3283,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3221
3283
|
o.grid || (o.el || (o = { ...o }), o._isExternal = !0, n.gridstackNode = o);
|
|
3222
3284
|
const d = o.w || Math.round(n.offsetWidth / e) || 1, l = o.h || Math.round(n.offsetHeight / t) || 1;
|
|
3223
3285
|
return o.grid && o.grid !== this ? (r._gridstackNodeOrig || (r._gridstackNodeOrig = o), r.gridstackNode = o = { ...o, w: d, h: l, grid: this }, delete o.x, delete o.y, this.engine.cleanupNode(o).nodeBoundFix(o), o._initDD = o._isExternal = // DOM needs to be re-parented on a drop
|
|
3224
|
-
o._temporaryRemoved = !0) : (o.w = d, o.h = l, o._temporaryRemoved = !0),
|
|
3286
|
+
o._temporaryRemoved = !0) : (o.w = d, o.h = l, o._temporaryRemoved = !0), g._itemRemoving(o.el, !1), y.on(r, "drag", i), i(s, r, n), !1;
|
|
3225
3287
|
}).on(this.el, "dropout", (s, r, n) => {
|
|
3226
3288
|
const o = n?.gridstackNode || r.gridstackNode;
|
|
3227
3289
|
return o && (!o.grid || o.grid === this) && (this._leave(r, n), this._isTemp && this.removeAsSubGrid(o)), !1;
|
|
@@ -3233,13 +3295,13 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3233
3295
|
this.placeholder.remove(), delete this.placeholder.gridstackNode, d && this.opts.animate && (this.setAnimation(!1), this.setAnimation(!0, !0));
|
|
3234
3296
|
const a = r._gridstackNodeOrig;
|
|
3235
3297
|
if (delete r._gridstackNodeOrig, d && a?.grid && a.grid !== this) {
|
|
3236
|
-
const
|
|
3237
|
-
|
|
3298
|
+
const c = a.grid;
|
|
3299
|
+
c.engine.removeNodeFromLayoutCache(a), c.engine.removedNodes.push(a), c._triggerRemoveEvent()._triggerChangeEvent(), c.parentGridNode && !c.engine.nodes.length && c.opts.subGridDynamic && c.removeAsSubGrid();
|
|
3238
3300
|
}
|
|
3239
3301
|
if (!o || (d && (this.engine.cleanupNode(o), o.grid = this), delete o.grid?._isTemp, y.off(r, "drag"), n !== r ? (n.remove(), r = n) : r.remove(), this._removeDD(r), !d))
|
|
3240
3302
|
return !1;
|
|
3241
3303
|
const u = o.subGrid?.el?.gridstack;
|
|
3242
|
-
return h.copyPos(o, this._readAttr(this.placeholder)), h.removePositioningStyles(r), l && (o.content || o.subGridOpts ||
|
|
3304
|
+
return h.copyPos(o, this._readAttr(this.placeholder)), h.removePositioningStyles(r), l && (o.content || o.subGridOpts || g.addRemoveCB) ? (delete o.el, r = this.addWidget(o)) : (this._prepareElement(r, !0, o), this.el.appendChild(r), this.resizeToContentCheck(!1, o), u && (u.parentGridNode = o), this._updateContainerHeight()), this.engine.addedNodes.push(o), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({ ...s, type: "dropped" }, a && a.grid ? a : void 0, o), !1;
|
|
3243
3305
|
}), this;
|
|
3244
3306
|
}
|
|
3245
3307
|
/** @internal mark item for removal */
|
|
@@ -3254,7 +3316,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3254
3316
|
if (typeof this.opts.removable != "string")
|
|
3255
3317
|
return this;
|
|
3256
3318
|
const t = document.querySelector(this.opts.removable);
|
|
3257
|
-
return t ? (!this.opts.staticGrid && !y.isDroppable(t) && y.droppable(t, this.opts.removableOptions).on(t, "dropover", (e, i) =>
|
|
3319
|
+
return t ? (!this.opts.staticGrid && !y.isDroppable(t) && y.droppable(t, this.opts.removableOptions).on(t, "dropover", (e, i) => g._itemRemoving(i, !0)).on(t, "dropout", (e, i) => g._itemRemoving(i, !1)), this) : this;
|
|
3258
3320
|
}
|
|
3259
3321
|
/**
|
|
3260
3322
|
* prepares the element for drag&drop - this is normally called by makeWidget() unless are are delay loading
|
|
@@ -3266,34 +3328,36 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3266
3328
|
if (!i)
|
|
3267
3329
|
return;
|
|
3268
3330
|
const s = i.noMove || this.opts.disableDrag, r = i.noResize || this.opts.disableResize, n = this.opts.staticGrid || s && r;
|
|
3269
|
-
if ((e || n) && (i._initDD && (this._removeDD(t), delete i._initDD), n
|
|
3270
|
-
return this;
|
|
3331
|
+
if ((e || n) && (i._initDD && (this._removeDD(t), delete i._initDD), n))
|
|
3332
|
+
return t.classList.add("ui-draggable-disabled", "ui-resizable-disabled"), this;
|
|
3271
3333
|
if (!i._initDD) {
|
|
3272
3334
|
let o, d;
|
|
3273
|
-
const l = (
|
|
3274
|
-
this.triggerEvent(
|
|
3275
|
-
}, a = (
|
|
3276
|
-
this._dragOrResize(t,
|
|
3277
|
-
}, u = (
|
|
3335
|
+
const l = (c, p) => {
|
|
3336
|
+
this.triggerEvent(c, c.target), o = this.cellWidth(), d = this.getCellHeight(!0), this._onStartMoving(t, c, p, i, o, d);
|
|
3337
|
+
}, a = (c, p) => {
|
|
3338
|
+
this._dragOrResize(t, c, p, i, o, d);
|
|
3339
|
+
}, u = (c) => {
|
|
3278
3340
|
this.placeholder.remove(), delete this.placeholder.gridstackNode, delete i._moving, delete i._resizing, delete i._event, delete i._lastTried;
|
|
3279
|
-
const p = i.w !== i._orig.w, _ =
|
|
3341
|
+
const p = i.w !== i._orig.w, _ = c.target;
|
|
3280
3342
|
if (!(!_.gridstackNode || _.gridstackNode.grid !== this)) {
|
|
3281
3343
|
if (i.el = _, i._isAboutToRemove) {
|
|
3282
3344
|
const E = t.gridstackNode.grid;
|
|
3283
|
-
E._gsEventHandler[
|
|
3345
|
+
E._gsEventHandler[c.type] && E._gsEventHandler[c.type](c, _), E.engine.nodes.push(i), E.removeWidget(t, !0, !0);
|
|
3284
3346
|
} else
|
|
3285
|
-
h.removePositioningStyles(_), i._temporaryRemoved ? (this._writePosAttr(_, i), this.engine.addNode(i)) : this._writePosAttr(_, i), this.triggerEvent(
|
|
3286
|
-
this._extraDragRow = 0, this._updateContainerHeight(), this._triggerChangeEvent(), this.engine.endUpdate(),
|
|
3347
|
+
h.removePositioningStyles(_), i._temporaryRemoved ? (this._writePosAttr(_, i), this.engine.addNode(i)) : this._writePosAttr(_, i), this.triggerEvent(c, _);
|
|
3348
|
+
this._extraDragRow = 0, this._updateContainerHeight(), this._triggerChangeEvent(), this.engine.endUpdate(), c.type === "resizestop" && (Number.isInteger(i.sizeToContent) && (i.sizeToContent = i.h), this.resizeToContentCheck(p, i));
|
|
3287
3349
|
}
|
|
3288
3350
|
};
|
|
3289
3351
|
y.draggable(t, {
|
|
3290
3352
|
start: l,
|
|
3291
3353
|
stop: u,
|
|
3292
|
-
drag: a
|
|
3354
|
+
drag: a,
|
|
3355
|
+
rtl: this.opts.rtl
|
|
3293
3356
|
}).resizable(t, {
|
|
3294
3357
|
start: l,
|
|
3295
3358
|
stop: u,
|
|
3296
|
-
resize: a
|
|
3359
|
+
resize: a,
|
|
3360
|
+
rtl: this.opts.rtl
|
|
3297
3361
|
}), i._initDD = !0;
|
|
3298
3362
|
}
|
|
3299
3363
|
return y.draggable(t, s ? "disable" : "enable").resizable(t, r ? "disable" : "enable"), this;
|
|
@@ -3320,39 +3384,45 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3320
3384
|
/** @internal handles actual drag/resize */
|
|
3321
3385
|
_dragOrResize(t, e, i, s, r, n) {
|
|
3322
3386
|
const o = { ...s._orig };
|
|
3323
|
-
let d, l = this.opts.marginLeft, a = this.opts.marginRight, u = this.opts.marginTop,
|
|
3387
|
+
let d, l = this.opts.marginLeft, a = this.opts.marginRight, u = this.opts.marginTop, c = this.opts.marginBottom;
|
|
3324
3388
|
const p = Math.round(n * 0.1), _ = Math.round(r * 0.1);
|
|
3325
|
-
if (l = Math.min(l, _), a = Math.min(a, _), u = Math.min(u, p),
|
|
3389
|
+
if (l = Math.min(l, _), a = Math.min(a, _), u = Math.min(u, p), c = Math.min(c, p), e.type === "drag") {
|
|
3326
3390
|
if (s._temporaryRemoved)
|
|
3327
3391
|
return;
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
const U = this._extraDragRow;
|
|
3392
|
+
s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && f.dragElement?.updateScrollPosition(this.el);
|
|
3393
|
+
const C = i.position.left + (i.position.left > s._lastUiPosition.left ? -a : l), G = i.position.top + (i.position.top > s._lastUiPosition.top ? -c : u);
|
|
3394
|
+
o.x = Math.round(C / r), o.y = Math.round(G / n);
|
|
3395
|
+
const I = this._extraDragRow;
|
|
3333
3396
|
if (this.engine.collide(s, o)) {
|
|
3334
3397
|
const A = this.getRow();
|
|
3335
|
-
let
|
|
3336
|
-
this.opts.maxRow && A +
|
|
3398
|
+
let L = Math.max(0, o.y + s.h - A);
|
|
3399
|
+
this.opts.maxRow && A + L > this.opts.maxRow && (L = Math.max(0, this.opts.maxRow - A)), this._extraDragRow = L;
|
|
3337
3400
|
} else
|
|
3338
3401
|
this._extraDragRow = 0;
|
|
3339
|
-
if (this._extraDragRow !==
|
|
3402
|
+
if (this._extraDragRow !== I && this._updateContainerHeight(), s.x === o.x && s.y === o.y)
|
|
3340
3403
|
return;
|
|
3341
3404
|
} else if (e.type === "resize") {
|
|
3342
3405
|
if (o.x < 0 || (h.updateScrollResize(e, t, n), o.w = Math.round((i.size.width - l) / r), o.h = Math.round((i.size.height - u) / n), s.w === o.w && s.h === o.h) || s._lastTried && s._lastTried.w === o.w && s._lastTried.h === o.h)
|
|
3343
3406
|
return;
|
|
3344
|
-
|
|
3345
|
-
|
|
3407
|
+
if (e.hasMovedX) {
|
|
3408
|
+
const C = i.position.left + l;
|
|
3409
|
+
o.x = Math.round(C / r);
|
|
3410
|
+
}
|
|
3411
|
+
if (e.hasMovedY) {
|
|
3412
|
+
const C = i.position.top + u;
|
|
3413
|
+
o.y = Math.round(C / n);
|
|
3414
|
+
}
|
|
3415
|
+
d = !0;
|
|
3346
3416
|
}
|
|
3347
3417
|
s._event = e, s._lastTried = o;
|
|
3348
3418
|
const E = {
|
|
3349
3419
|
x: i.position.left + l,
|
|
3350
3420
|
y: i.position.top + u,
|
|
3351
3421
|
w: (i.size ? i.size.width : s.w * r) - l - a,
|
|
3352
|
-
h: (i.size ? i.size.height : s.h * n) - u -
|
|
3422
|
+
h: (i.size ? i.size.height : s.h * n) - u - c
|
|
3353
3423
|
};
|
|
3354
3424
|
if (this.engine.moveNodeCheck(s, { ...o, cellWidth: r, cellHeight: n, rect: E, resizing: d })) {
|
|
3355
|
-
s._lastUiPosition = i.position, this.engine.cacheRects(r, n, u, a,
|
|
3425
|
+
s._lastUiPosition = i.position, this.engine.cacheRects(r, n, u, a, c, l), delete s._skipDown, d && s.subGrid && s.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
|
|
3356
3426
|
const C = e.target;
|
|
3357
3427
|
s._sidebarOrig || this._writePosAttr(C, s), this.triggerEvent(e, C);
|
|
3358
3428
|
}
|
|
@@ -3375,16 +3445,16 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3375
3445
|
return;
|
|
3376
3446
|
i._temporaryRemoved = !0, this.engine.removeNode(i), i.el = i._isExternal && e ? e : t;
|
|
3377
3447
|
const s = i._sidebarOrig;
|
|
3378
|
-
i._isExternal && this.engine.cleanupNode(i), i._sidebarOrig = s, this.opts.removable === !0 &&
|
|
3448
|
+
i._isExternal && this.engine.cleanupNode(i), i._sidebarOrig = s, this.opts.removable === !0 && g._itemRemoving(t, !0), t._gridstackNodeOrig ? (t.gridstackNode = t._gridstackNodeOrig, delete t._gridstackNodeOrig) : i._isExternal && this.engine.restoreInitial();
|
|
3379
3449
|
}
|
|
3380
3450
|
}
|
|
3381
|
-
|
|
3451
|
+
g.renderCB = (m, t) => {
|
|
3382
3452
|
m && t?.content && (m.textContent = t.content);
|
|
3383
3453
|
};
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3454
|
+
g.resizeToContentParent = ".grid-stack-item-content";
|
|
3455
|
+
g.Utils = h;
|
|
3456
|
+
g.Engine = x;
|
|
3457
|
+
g.GDRev = "12.6.0";
|
|
3388
3458
|
export {
|
|
3389
|
-
|
|
3459
|
+
g as G
|
|
3390
3460
|
};
|