@dso-toolkit/core 93.0.1 → 95.0.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/bundle/dso-accordion-section.js +16 -22
- package/dist/bundle/dso-accordion.js +1 -1
- package/dist/bundle/dso-action-list-item.js +2 -2
- package/dist/bundle/dso-action-list.js +1 -1
- package/dist/bundle/dso-advanced-select.js +36 -26
- package/dist/bundle/dso-alert.js +1 -1
- package/dist/bundle/dso-annotation-activiteit.js +15 -21
- package/dist/bundle/dso-annotation-gebiedsaanwijzing.js +14 -20
- package/dist/bundle/dso-annotation-kaart.js +6 -6
- package/dist/bundle/dso-annotation-locatie.js +1 -1
- package/dist/bundle/dso-annotation-omgevingsnormwaarde.js +15 -21
- package/dist/bundle/dso-attachments-counter.js +1 -1
- package/dist/bundle/dso-autosuggest.js +6 -6
- package/dist/bundle/dso-badge.js +1 -1
- package/dist/bundle/dso-banner.js +1 -1
- package/dist/bundle/dso-button-group.js +1 -1
- package/dist/bundle/dso-card-container.js +1 -1
- package/dist/bundle/dso-card.js +3 -3
- package/dist/bundle/dso-contact-information.js +1 -1
- package/dist/bundle/dso-cursor-tooltip.js +1 -1
- package/dist/bundle/dso-date-picker.js +1 -1
- package/dist/bundle/dso-document-card.js +2 -2
- package/dist/bundle/dso-document-component.js +1 -1
- package/dist/bundle/dso-dropdown-menu.js +1 -1
- package/dist/bundle/dso-expandable.js +1 -1
- package/dist/bundle/dso-header.js +4 -4
- package/dist/bundle/dso-highlight-box.js +1 -1
- package/dist/bundle/dso-history-item.js +2 -2
- package/dist/bundle/dso-icon-button.js +1 -1
- package/dist/bundle/dso-icon.js +1 -1
- package/dist/bundle/dso-image-overlay.js +1 -1
- package/dist/bundle/dso-info-button.js +1 -1
- package/dist/bundle/dso-info.js +1 -1
- package/dist/bundle/dso-input-range.js +1 -1
- package/dist/bundle/dso-label.js +1 -1
- package/dist/bundle/dso-legend-group.js +5 -5
- package/dist/bundle/dso-legend-item.js +8 -8
- package/dist/bundle/dso-legend.js +6 -6
- package/dist/bundle/dso-list-button.js +9 -9
- package/dist/bundle/dso-logo.js +2 -2
- package/dist/bundle/dso-map-base-layers.js +10 -10
- package/dist/bundle/dso-map-controls.js +8 -8
- package/dist/bundle/dso-map-layer-object.js +5 -5
- package/dist/bundle/dso-map-layer.js +5 -5
- package/dist/bundle/dso-map-message.js +4 -4
- package/dist/bundle/dso-map-overlays.js +10 -10
- package/dist/bundle/dso-mark-bar.js +4 -4
- package/dist/bundle/dso-modal.js +1 -130
- package/dist/bundle/dso-onboarding-tip.js +5 -5
- package/dist/bundle/dso-ozon-content-toggletip.js +2 -2
- package/dist/bundle/dso-ozon-content.js +1 -1
- package/dist/bundle/dso-pagination.js +3 -3
- package/dist/bundle/dso-panel.js +1 -1
- package/dist/bundle/dso-plekinfo-card.js +5 -5
- package/dist/bundle/dso-progress-indicator.js +1 -1
- package/dist/bundle/dso-project-item.js +8 -14
- package/dist/bundle/dso-renvooi.js +1 -1
- package/dist/bundle/dso-responsive-element.js +1 -1
- package/dist/bundle/dso-scrollable.js +1 -1
- package/dist/bundle/dso-segmented-button.js +2 -2
- package/dist/bundle/dso-selectable.js +1 -1
- package/dist/bundle/dso-skiplink.js +3 -3
- package/dist/bundle/dso-slide-toggle.js +1 -1
- package/dist/bundle/dso-survey-rating.js +7 -7
- package/dist/bundle/dso-tab.js +1 -1
- package/dist/bundle/dso-table.js +1 -1
- package/dist/bundle/dso-tabs.js +2 -2
- package/dist/bundle/dso-tijdreis-banner.js +3 -3
- package/dist/bundle/dso-tooltip.js +2114 -1
- package/dist/bundle/dso-tree-view.js +4 -4
- package/dist/bundle/dso-viewer-grid.js +3 -3
- package/dist/bundle/dsot-document-component-demo.js +28 -28
- package/dist/bundle/index.js +2 -2
- package/dist/bundle/{p-Bpxt6ayX.js → p-5nlGueoS.js} +1 -1
- package/dist/bundle/{p-kQvyXIDA.js → p-7h6dLq9M.js} +1 -1
- package/dist/bundle/{p-Cx-wt8X8.js → p-B3m8trPV.js} +1 -1
- package/dist/bundle/{p-coDX50W3.js → p-B9XEou_S.js} +4 -4
- package/dist/bundle/{p-CRPLuDWD.js → p-BLZJxjte.js} +20 -16
- package/dist/bundle/{p-DqzYyiPW.js → p-BSaHsr79.js} +1 -1
- package/dist/bundle/{p-NAG22yyq.js → p-BbrcIY5U.js} +2 -2
- package/dist/bundle/p-BcejAJTk.js +132 -0
- package/dist/bundle/{p-ZVYFxI1s.js → p-Bh6sbzpT.js} +2 -2
- package/dist/bundle/p-C3TYRjeb.js +166 -0
- package/dist/bundle/{p-DORLt6w9.js → p-CF5u2saq.js} +4 -4
- package/dist/{esm/v4-DEQj4hHE.js → bundle/p-CK3_k8jD.js} +7 -17
- package/dist/bundle/p-CR-rxxZR.js +341 -0
- package/dist/bundle/{p-BUfOvN-j.js → p-C_yE-yT4.js} +4 -4
- package/dist/bundle/p-CbZsDFSf.js +109 -0
- package/dist/bundle/p-CjrG2WYI.js +79 -0
- package/dist/bundle/{p-UID4cKLB.js → p-CpHN9nNa.js} +3 -3
- package/dist/bundle/{p-DBGoQkQq.js → p-CuGyp3WQ.js} +23 -5
- package/dist/bundle/{p-MpcavIBO.js → p-CwETV-gv.js} +2 -2
- package/dist/bundle/p-D6mShNSe.js +119 -0
- package/dist/bundle/{p-BPivYT1Y.js → p-DAF7EsKp.js} +3 -3
- package/dist/bundle/{p-ChUPoPD0.js → p-DBi6XQa8.js} +61 -19
- package/dist/bundle/{p-CIhIApHw.js → p-DIM0fY1S.js} +2 -2
- package/dist/bundle/{p-B9SM87U3.js → p-DQ4k80p_.js} +1 -1
- package/dist/bundle/p-DQAO2E8R.js +189 -0
- package/dist/bundle/{p-EL_IgcTa.js → p-DV3b_VnF.js} +1 -1
- package/dist/bundle/{p-pBMyyJLQ.js → p-DZGMkIzK.js} +5 -5
- package/dist/bundle/{p-Aw2GDcd_.js → p-DoVqfHFv.js} +1 -1
- package/dist/bundle/p-Drg4jBmd.js +1209 -0
- package/dist/{esm/i18n-ULwgxD7S.js → bundle/p-DwBHVuoZ.js} +71 -90
- package/dist/bundle/{p-B3_SLWNA.js → p-NCJ9jUD-.js} +71 -53
- package/dist/bundle/{p-DfoVRvxy.js → p-RkXc1mJn.js} +11 -9
- package/dist/bundle/p-pAprbk-K.js +100 -0
- package/dist/cjs/{annotation-body-D709UN2k.js → annotation-body-BYBiDMDz.js} +1 -1
- package/dist/cjs/{annotation-list-renvooi-values-Bf6MmhgH.js → annotation-list-renvooi-values-D5GfwuRO.js} +1 -1
- package/dist/cjs/{annotation-watcher-nmRcLxK5.js → annotation-watcher-DRtgT1BA.js} +1 -1
- package/dist/cjs/dso-accordion-section.cjs.entry.js +2 -2
- package/dist/cjs/dso-accordion.cjs.entry.js +1 -1
- package/dist/cjs/dso-action-list-item.cjs.entry.js +1 -1
- package/dist/cjs/dso-action-list.cjs.entry.js +1 -1
- package/dist/cjs/dso-advanced-select.cjs.entry.js +26 -10
- package/dist/cjs/dso-alert_7.cjs.entry.js +57 -69
- package/dist/cjs/dso-annotation-activiteit.cjs.entry.js +5 -5
- package/dist/cjs/dso-annotation-gebiedsaanwijzing.cjs.entry.js +4 -4
- package/dist/cjs/dso-annotation-kaart.cjs.entry.js +3 -3
- package/dist/cjs/dso-annotation-locatie_2.cjs.entry.js +6 -6
- package/dist/cjs/dso-annotation-omgevingsnormwaarde.cjs.entry.js +5 -5
- package/dist/cjs/dso-attachments-counter_2.cjs.entry.js +1 -1
- package/dist/cjs/dso-autosuggest.cjs.entry.js +3 -3
- package/dist/cjs/dso-banner.cjs.entry.js +1 -1
- package/dist/cjs/dso-button-group.cjs.entry.js +1 -1
- package/dist/cjs/dso-card-container.cjs.entry.js +1 -1
- package/dist/cjs/dso-card.cjs.entry.js +2 -2
- package/dist/cjs/dso-contact-information.cjs.entry.js +1 -1
- package/dist/cjs/dso-cursor-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/dso-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/dso-document-card.cjs.entry.js +1 -1
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +2 -2
- package/dist/cjs/dso-header.cjs.entry.js +2 -2
- package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
- package/dist/cjs/dso-history-item.cjs.entry.js +1 -1
- package/dist/cjs/dso-icon_2.cjs.entry.js +16 -20
- package/dist/cjs/dso-info_3.cjs.entry.js +23 -18
- package/dist/cjs/dso-input-range.cjs.entry.js +1 -1
- package/dist/cjs/dso-label_3.cjs.entry.js +36 -9
- package/dist/cjs/dso-legend-group.cjs.entry.js +3 -3
- package/dist/cjs/dso-legend-item.cjs.entry.js +3 -3
- package/dist/cjs/dso-legend.cjs.entry.js +3 -3
- package/dist/cjs/dso-list-button.cjs.entry.js +3 -3
- package/dist/cjs/dso-logo.cjs.entry.js +2 -2
- package/dist/cjs/dso-map-base-layers.cjs.entry.js +4 -4
- package/dist/cjs/dso-map-controls.cjs.entry.js +4 -4
- package/dist/cjs/dso-map-layer-object.cjs.entry.js +4 -4
- package/dist/cjs/dso-map-layer.cjs.entry.js +4 -4
- package/dist/cjs/dso-map-message.cjs.entry.js +3 -3
- package/dist/cjs/dso-map-overlays.cjs.entry.js +4 -4
- package/dist/cjs/dso-mark-bar.cjs.entry.js +2 -2
- package/dist/cjs/dso-modal.cjs.entry.js +5 -5
- package/dist/cjs/dso-onboarding-tip.cjs.entry.js +3 -3
- package/dist/cjs/dso-pagination.cjs.entry.js +1 -1
- package/dist/cjs/dso-plekinfo-card.cjs.entry.js +4 -4
- package/dist/cjs/dso-progress-indicator.cjs.entry.js +3 -3
- package/dist/cjs/dso-project-item.cjs.entry.js +2 -2
- package/dist/cjs/dso-responsive-element.cjs.entry.js +2 -2
- package/dist/cjs/dso-scrollable.cjs.entry.js +26 -8
- package/dist/cjs/dso-segmented-button.cjs.entry.js +2 -2
- package/dist/cjs/dso-skiplink.cjs.entry.js +2 -2
- package/dist/cjs/dso-survey-rating.cjs.entry.js +4 -4
- package/dist/cjs/dso-tab.cjs.entry.js +1 -1
- package/dist/cjs/dso-tabs.cjs.entry.js +2 -2
- package/dist/cjs/dso-tijdreis-banner.cjs.entry.js +2 -2
- package/dist/cjs/dso-toolkit.cjs.js +3 -3
- package/dist/cjs/dso-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/dso-tree-view.cjs.entry.js +2 -2
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +3 -3
- package/dist/cjs/dsot-document-component-demo.cjs.entry.js +1 -1
- package/dist/cjs/{i18n-EVv0JhYm.js → i18n-5XH7oHkT.js} +71 -90
- package/dist/cjs/{index-Dqk4tvHL.js → index-v3FWnSvn.js} +61 -19
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{parse-wijzigactie-from-node.function-2IxB-3Tj.js → parse-wijzigactie-from-node.function-joV1jDjd.js} +1 -1
- package/dist/cjs/{position-tooltip.function-CppeKAt4.js → position-tooltip.function-BjWi5ZKZ.js} +69 -45
- package/dist/cjs/tooltip.functional-component-Dbxr_PJe.js +7 -0
- package/dist/cjs/{v4-B9KyY_nQ.js → v4-_2BfiRUa.js} +7 -17
- package/dist/cjs/{wrap-wijzigactie.functional-component-CJUtPTJt.js → wrap-wijzigactie.functional-component-BDznkHgj.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/accordion/components/accordion-section.css +2 -2
- package/dist/collection/components/annotation/annotation.css +4 -3
- package/dist/collection/components/badge/badge.css +0 -10
- package/dist/collection/components/badge/badge.js +22 -26
- package/dist/collection/components/card/card.css +1 -0
- package/dist/collection/components/document-component/document-component.css +33 -10
- package/dist/collection/components/icon-button/icon-button.css +13 -8
- package/dist/collection/components/icon-button/icon-button.js +12 -20
- package/dist/collection/components/image-overlay/image-overlay.css +6 -6
- package/dist/collection/components/info-button/info-button.css +0 -5
- package/dist/collection/components/info-button/info-button.js +14 -10
- package/dist/collection/components/label/label.css +46 -3
- package/dist/collection/components/label/label.js +30 -6
- package/dist/collection/components/legend/legend-group/legend-group.js +1 -1
- package/dist/collection/components/legend/legend-item/legend-item.js +1 -1
- package/dist/collection/components/legend/legend.js +1 -1
- package/dist/collection/components/list-button/list-button.css +10 -4
- package/dist/collection/components/list-button/list-button.js +1 -1
- package/dist/collection/components/logo/logo.js +1 -1
- package/dist/collection/components/map-base-layers/map-base-layers.js +1 -1
- package/dist/collection/components/map-controls/map-controls.css +29 -7
- package/dist/collection/components/map-controls/map-controls.js +1 -1
- package/dist/collection/components/map-layer/components/map-layer-object.css +2 -2
- package/dist/collection/components/map-layer/components/map-layer-object.js +1 -1
- package/dist/collection/components/map-layer/map-layer.css +2 -2
- package/dist/collection/components/map-layer/map-layer.js +1 -1
- package/dist/collection/components/map-message/map-message.js +2 -2
- package/dist/collection/components/map-overlays/map-overlays.js +1 -1
- package/dist/collection/components/mark-bar/mark-bar.js +1 -1
- package/dist/collection/components/modal/modal.css +50 -69
- package/dist/collection/components/modal/modal.js +1 -1
- package/dist/collection/components/onboarding-tip/onboarding-tip.js +1 -1
- package/dist/collection/components/ozon-content/components/ozon-content-toggletip/ozon-content-toggletip.css +9 -11
- package/dist/collection/components/ozon-content/components/ozon-content-toggletip/ozon-content-toggletip.js +17 -16
- package/dist/collection/components/ozon-content/nodes/noot.node.js +2 -3
- package/dist/collection/components/ozon-content/ozon-content.css +55 -193
- package/dist/collection/components/ozon-content/ozon-content.js +2 -2
- package/dist/collection/components/panel/panel.js +1 -1
- package/dist/collection/components/plekinfo-card/plekinfo-card.css +3 -3
- package/dist/collection/components/plekinfo-card/plekinfo-card.js +1 -1
- package/dist/collection/components/progress-indicator/progress-indicator.js +1 -1
- package/dist/collection/components/project-item/project-item.js +1 -1
- package/dist/collection/components/renvooi/renvooi.css +3 -3
- package/dist/collection/components/responsive-element/responsive-element.js +1 -1
- package/dist/collection/components/scrollable/scrollable.js +22 -4
- package/dist/collection/components/segmented-button/segmented-button.js +1 -1
- package/dist/collection/components/selectable/selectable.js +8 -6
- package/dist/collection/components/skiplink/skiplink.js +1 -1
- package/dist/collection/components/slide-toggle/slide-toggle.js +1 -1
- package/dist/collection/components/survey-rating/survey-rating.css +6 -1
- package/dist/collection/components/survey-rating/survey-rating.js +2 -2
- package/dist/collection/components/table/table.css +37 -245
- package/dist/collection/components/table/table.js +1 -10
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/tijdreis-banner/tijdreis-banner.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/collection/components/tree-view/tree-view.js +1 -1
- package/dist/collection/components/viewer-grid/viewer-grid.css +9 -3
- package/dist/collection/components/viewer-grid/viewer-grid.js +1 -1
- package/dist/collection/functional-components/tooltip/position-tooltip.function.js +69 -45
- package/dist/collection/functional-components/tooltip/tooltip.functional-component.js +1 -7
- package/dist/collection/utils/i18n.js +0 -1
- package/dist/components/annotation-locatie.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/document-component.js +1 -1
- package/dist/components/dso-accordion-section.js +1 -1
- package/dist/components/dso-advanced-select.js +4 -4
- package/dist/components/dso-annotation-activiteit.js +1 -1
- package/dist/components/dso-annotation-gebiedsaanwijzing.js +1 -1
- package/dist/components/dso-annotation-kaart.js +1 -1
- package/dist/components/dso-annotation-omgevingsnormwaarde.js +1 -1
- package/dist/components/dso-card.js +1 -1
- package/dist/components/dso-legend-group.js +1 -1
- package/dist/components/dso-legend-item.js +1 -1
- package/dist/components/dso-legend.js +1 -1
- package/dist/components/dso-list-button.js +1 -1
- package/dist/components/dso-logo.js +1 -1
- package/dist/components/dso-map-base-layers.js +1 -1
- package/dist/components/dso-map-controls.js +1 -1
- package/dist/components/dso-map-layer-object.js +1 -1
- package/dist/components/dso-map-layer.js +1 -1
- package/dist/components/dso-map-message.js +1 -1
- package/dist/components/dso-map-overlays.js +1 -1
- package/dist/components/dso-mark-bar.js +1 -1
- package/dist/components/dso-modal.js +1 -1
- package/dist/components/dso-onboarding-tip.js +1 -1
- package/dist/components/dso-ozon-content-toggletip.js +1 -1
- package/dist/components/dso-plekinfo-card.js +1 -1
- package/dist/components/dso-project-item.js +1 -1
- package/dist/components/dso-segmented-button.js +1 -1
- package/dist/components/dso-skiplink.js +1 -1
- package/dist/components/dso-survey-rating.js +1 -1
- package/dist/components/dso-tabs.js +1 -1
- package/dist/components/dso-tijdreis-banner.js +1 -1
- package/dist/components/dso-tooltip.js +1 -1
- package/dist/components/dso-tree-view.js +1 -1
- package/dist/components/dso-viewer-grid.js +1 -1
- package/dist/components/dsot-document-component-demo.js +1 -1
- package/dist/components/i18n.js +1 -1
- package/dist/components/icon-button.js +1 -1
- package/dist/components/image-overlay.js +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/info-button.js +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/modal.js +1 -0
- package/dist/components/ozon-content-toggletip.js +1 -1
- package/dist/components/ozon-content.js +1 -1
- package/dist/components/panel.js +1 -1
- package/dist/components/progress-indicator.js +1 -1
- package/dist/components/renvooi.js +1 -1
- package/dist/components/responsive-element.js +1 -1
- package/dist/components/scrollable.js +1 -1
- package/dist/components/selectable.js +1 -1
- package/dist/components/slide-toggle.js +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tooltip.functional-component.js +1 -1
- package/dist/components/v4.js +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/p-015bdc99.entry.js +1 -0
- package/dist/dso-toolkit/{p-3f7b7a21.entry.js → p-037cc6e2.entry.js} +1 -1
- package/dist/dso-toolkit/{p-4f7c6b0b.entry.js → p-0d9c2c99.entry.js} +1 -1
- package/dist/dso-toolkit/{p-f6962cc7.entry.js → p-0f58bc7d.entry.js} +1 -1
- package/dist/dso-toolkit/p-13a4359b.entry.js +1 -0
- package/dist/dso-toolkit/p-151dd30f.entry.js +1 -0
- package/dist/dso-toolkit/{p-0d2c73be.entry.js → p-164492f5.entry.js} +1 -1
- package/dist/dso-toolkit/{p-6353b664.entry.js → p-169b492d.entry.js} +1 -1
- package/dist/dso-toolkit/{p-e73b1880.entry.js → p-17d68c90.entry.js} +1 -1
- package/dist/dso-toolkit/{p-de38f478.entry.js → p-19645089.entry.js} +1 -1
- package/dist/dso-toolkit/{p-d64ee7f4.entry.js → p-1d1a3740.entry.js} +1 -1
- package/dist/dso-toolkit/{p-6f5c451b.entry.js → p-20fb5b5a.entry.js} +1 -1
- package/dist/dso-toolkit/p-252007ac.entry.js +1 -0
- package/dist/dso-toolkit/{p-7a47230a.entry.js → p-25cea845.entry.js} +1 -1
- package/dist/dso-toolkit/p-2b05f2ab.entry.js +1 -0
- package/dist/dso-toolkit/{p-9a8a99a5.entry.js → p-2f0febe0.entry.js} +1 -1
- package/dist/dso-toolkit/p-39e33d16.entry.js +1 -0
- package/dist/dso-toolkit/{p-7d2a6081.entry.js → p-3d5affd8.entry.js} +1 -1
- package/dist/dso-toolkit/{p-90bf4262.entry.js → p-44552258.entry.js} +1 -1
- package/dist/dso-toolkit/{p-75a6103a.entry.js → p-455afb41.entry.js} +1 -1
- package/dist/dso-toolkit/p-4e05b633.entry.js +1 -0
- package/dist/dso-toolkit/{p-3c4c4af0.entry.js → p-4f21807b.entry.js} +3 -3
- package/dist/dso-toolkit/{p-520eb463.entry.js → p-53a165b2.entry.js} +1 -1
- package/dist/dso-toolkit/{p-4738fcf7.entry.js → p-57a0fb42.entry.js} +1 -1
- package/dist/dso-toolkit/p-57cd10e4.entry.js +1 -0
- package/dist/dso-toolkit/{p-b0a9948f.entry.js → p-61cd4ede.entry.js} +1 -1
- package/dist/dso-toolkit/{p-30286d1c.entry.js → p-6d3cc273.entry.js} +1 -1
- package/dist/dso-toolkit/{p-4bf15aa2.entry.js → p-7e817da1.entry.js} +1 -1
- package/dist/dso-toolkit/p-7f7f9551.entry.js +1 -0
- package/dist/dso-toolkit/p-846fe7d0.entry.js +1 -0
- package/dist/dso-toolkit/p-885f6260.entry.js +1 -0
- package/dist/dso-toolkit/p-89160dc8.entry.js +1 -0
- package/dist/dso-toolkit/p-8a6862d9.entry.js +1 -0
- package/dist/dso-toolkit/p-94db498f.entry.js +1 -0
- package/dist/dso-toolkit/p-978b1c1c.entry.js +1 -0
- package/dist/dso-toolkit/p-9c186af8.entry.js +1 -0
- package/dist/dso-toolkit/p-9c2cebf3.entry.js +1 -0
- package/dist/dso-toolkit/p-9e9eee7c.entry.js +1 -0
- package/dist/dso-toolkit/p-CK3_k8jD.js +1 -0
- package/dist/dso-toolkit/p-CYHYSMIz.js +1 -0
- package/dist/dso-toolkit/p-DEkvng4d.js +1 -0
- package/dist/dso-toolkit/p-DdaJdjEq.js +1 -0
- package/dist/dso-toolkit/p-DfixBhJX.js +1 -0
- package/dist/dso-toolkit/p-DwBHVuoZ.js +1 -0
- package/dist/dso-toolkit/p-ViUybizz.js +1 -0
- package/dist/dso-toolkit/{p-0833576d.entry.js → p-a56a45c0.entry.js} +1 -1
- package/dist/dso-toolkit/p-a64cbe94.entry.js +1 -0
- package/dist/dso-toolkit/{p-1796464a.entry.js → p-a85bbabe.entry.js} +1 -1
- package/dist/dso-toolkit/{p-c8b47115.entry.js → p-ab9af74a.entry.js} +1 -1
- package/dist/dso-toolkit/{p-9a8967f9.entry.js → p-b295a325.entry.js} +1 -1
- package/dist/dso-toolkit/{p-112128be.entry.js → p-b8614377.entry.js} +1 -1
- package/dist/dso-toolkit/{p-a6cd2273.entry.js → p-be187c76.entry.js} +1 -1
- package/dist/dso-toolkit/{p-a28f17f3.entry.js → p-c45e35cb.entry.js} +1 -1
- package/dist/dso-toolkit/{p-b2841387.entry.js → p-c50752f2.entry.js} +1 -1
- package/dist/dso-toolkit/{p-007fa89d.entry.js → p-c6d4aacf.entry.js} +1 -1
- package/dist/dso-toolkit/{p-deba4529.entry.js → p-c92a750b.entry.js} +1 -1
- package/dist/dso-toolkit/{p-808812c1.entry.js → p-cb1937ac.entry.js} +1 -1
- package/dist/dso-toolkit/p-ccdd9458.entry.js +1 -0
- package/dist/dso-toolkit/{p-9a36a39d.entry.js → p-d685a2f7.entry.js} +1 -1
- package/dist/dso-toolkit/{p-d0bbc40a.entry.js → p-d7c1ff76.entry.js} +1 -1
- package/dist/dso-toolkit/{p-a97aa67d.entry.js → p-dd84ff10.entry.js} +1 -1
- package/dist/dso-toolkit/{p-c86f85f1.entry.js → p-de4a1c14.entry.js} +1 -1
- package/dist/dso-toolkit/{p-fb70477b.entry.js → p-ecb84284.entry.js} +1 -1
- package/dist/dso-toolkit/p-eyz38o4U.js +1 -0
- package/dist/dso-toolkit/{p-96002988.entry.js → p-f2d1acf2.entry.js} +1 -1
- package/dist/dso-toolkit/{p-25afc236.entry.js → p-fcf93614.entry.js} +1 -1
- package/dist/dso-toolkit/{p-ea0d2c1f.entry.js → p-fe202eef.entry.js} +1 -1
- package/dist/dso-toolkit/{p-B9WLR_Pd.js → p-tZPA50GA.js} +1 -1
- package/dist/dso-toolkit/p-uGZacrki.js +2 -0
- package/dist/esm/{annotation-body-XmHPl1j-.js → annotation-body-BbGGiDzU.js} +1 -1
- package/dist/esm/{annotation-list-renvooi-values-BrskkBG_.js → annotation-list-renvooi-values-DV918XX7.js} +1 -1
- package/dist/esm/{annotation-watcher-CXzFGupS.js → annotation-watcher-D5FQ94at.js} +1 -1
- package/dist/esm/dso-accordion-section.entry.js +2 -2
- package/dist/esm/dso-accordion.entry.js +1 -1
- package/dist/esm/dso-action-list-item.entry.js +1 -1
- package/dist/esm/dso-action-list.entry.js +1 -1
- package/dist/esm/dso-advanced-select.entry.js +26 -10
- package/dist/esm/dso-alert_7.entry.js +57 -69
- package/dist/esm/dso-annotation-activiteit.entry.js +5 -5
- package/dist/esm/dso-annotation-gebiedsaanwijzing.entry.js +4 -4
- package/dist/esm/dso-annotation-kaart.entry.js +3 -3
- package/dist/esm/dso-annotation-locatie_2.entry.js +6 -6
- package/dist/esm/dso-annotation-omgevingsnormwaarde.entry.js +5 -5
- package/dist/esm/dso-attachments-counter_2.entry.js +1 -1
- package/dist/esm/dso-autosuggest.entry.js +3 -3
- package/dist/esm/dso-banner.entry.js +1 -1
- package/dist/esm/dso-button-group.entry.js +1 -1
- package/dist/esm/dso-card-container.entry.js +1 -1
- package/dist/esm/dso-card.entry.js +2 -2
- package/dist/esm/dso-contact-information.entry.js +1 -1
- package/dist/esm/dso-cursor-tooltip.entry.js +1 -1
- package/dist/esm/dso-date-picker.entry.js +1 -1
- package/dist/esm/dso-document-card.entry.js +1 -1
- package/dist/esm/dso-dropdown-menu.entry.js +2 -2
- package/dist/esm/dso-header.entry.js +2 -2
- package/dist/esm/dso-highlight-box.entry.js +1 -1
- package/dist/esm/dso-history-item.entry.js +1 -1
- package/dist/esm/dso-icon_2.entry.js +16 -20
- package/dist/esm/dso-info_3.entry.js +23 -18
- package/dist/esm/dso-input-range.entry.js +1 -1
- package/dist/esm/dso-label_3.entry.js +36 -9
- package/dist/esm/dso-legend-group.entry.js +3 -3
- package/dist/esm/dso-legend-item.entry.js +3 -3
- package/dist/esm/dso-legend.entry.js +3 -3
- package/dist/esm/dso-list-button.entry.js +3 -3
- package/dist/esm/dso-logo.entry.js +2 -2
- package/dist/esm/dso-map-base-layers.entry.js +4 -4
- package/dist/esm/dso-map-controls.entry.js +4 -4
- package/dist/esm/dso-map-layer-object.entry.js +4 -4
- package/dist/esm/dso-map-layer.entry.js +4 -4
- package/dist/esm/dso-map-message.entry.js +3 -3
- package/dist/esm/dso-map-overlays.entry.js +4 -4
- package/dist/esm/dso-mark-bar.entry.js +2 -2
- package/dist/esm/dso-modal.entry.js +5 -5
- package/dist/esm/dso-onboarding-tip.entry.js +3 -3
- package/dist/esm/dso-pagination.entry.js +1 -1
- package/dist/esm/dso-plekinfo-card.entry.js +4 -4
- package/dist/esm/dso-progress-indicator.entry.js +3 -3
- package/dist/esm/dso-project-item.entry.js +2 -2
- package/dist/esm/dso-responsive-element.entry.js +2 -2
- package/dist/esm/dso-scrollable.entry.js +23 -5
- package/dist/esm/dso-segmented-button.entry.js +2 -2
- package/dist/esm/dso-skiplink.entry.js +2 -2
- package/dist/esm/dso-survey-rating.entry.js +4 -4
- package/dist/esm/dso-tab.entry.js +1 -1
- package/dist/esm/dso-tabs.entry.js +2 -2
- package/dist/esm/dso-tijdreis-banner.entry.js +2 -2
- package/dist/esm/dso-toolkit.js +4 -4
- package/dist/esm/dso-tooltip.entry.js +2 -2
- package/dist/esm/dso-tree-view.entry.js +2 -2
- package/dist/esm/dso-viewer-grid.entry.js +3 -3
- package/dist/esm/dsot-document-component-demo.entry.js +1 -1
- package/dist/{bundle/p-ULwgxD7S.js → esm/i18n-DwBHVuoZ.js} +71 -90
- package/dist/esm/{index-BIfnbekk.js → index-uGZacrki.js} +61 -19
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{parse-wijzigactie-from-node.function-g0_S_VRv.js → parse-wijzigactie-from-node.function-BtJ4WFIK.js} +1 -1
- package/dist/esm/{position-tooltip.function-Cf2lM20T.js → position-tooltip.function-DoXRpCfQ.js} +69 -45
- package/dist/esm/tooltip.functional-component-DNqxwCG5.js +5 -0
- package/dist/{bundle/p-DEQj4hHE.js → esm/v4-CK3_k8jD.js} +7 -17
- package/dist/esm/{wrap-wijzigactie.functional-component-BB1TmP-v.js → wrap-wijzigactie.functional-component-ChvYnlwn.js} +1 -1
- package/dist/types/components/badge/badge.d.ts +5 -6
- package/dist/types/components/icon-button/icon-button.d.ts +8 -8
- package/dist/types/components/info-button/info-button.d.ts +2 -2
- package/dist/types/components/label/label.d.ts +6 -2
- package/dist/types/components/ozon-content/components/ozon-content-toggletip/ozon-content-toggletip.d.ts +6 -5
- package/dist/types/components/ozon-content/nodes/noot.node.d.ts +1 -1
- package/dist/types/components/selectable/selectable.d.ts +1 -1
- package/dist/types/components/selectable/selectable.interfaces.d.ts +2 -0
- package/dist/types/components/table/table.d.ts +0 -3
- package/dist/types/components.d.ts +3 -3
- package/dist/types/functional-components/tooltip/tooltip.functional-component.d.ts +1 -2
- package/package.json +14 -13
- package/dist/bundle/p-8Tkxj9ba.js +0 -85
- package/dist/bundle/p-BMEJps6X.js +0 -97
- package/dist/bundle/p-BW8maL6h.js +0 -341
- package/dist/bundle/p-C3yNQ7WK.js +0 -1204
- package/dist/bundle/p-CslDhrwG.js +0 -102
- package/dist/bundle/p-D3dXzdge.js +0 -2116
- package/dist/bundle/p-DALBSzfQ.js +0 -170
- package/dist/bundle/p-DHOQChpz.js +0 -172
- package/dist/bundle/p-Rz6GCQXJ.js +0 -123
- package/dist/cjs/tooltip.functional-component-DrN_v5w1.js +0 -13
- package/dist/components/tooltip.js +0 -1
- package/dist/dso-toolkit/p-0da6b02f.entry.js +0 -1
- package/dist/dso-toolkit/p-1440ff2e.entry.js +0 -1
- package/dist/dso-toolkit/p-26cd4149.entry.js +0 -1
- package/dist/dso-toolkit/p-294c3de2.entry.js +0 -1
- package/dist/dso-toolkit/p-3a49df1e.entry.js +0 -1
- package/dist/dso-toolkit/p-3c3dffc6.entry.js +0 -1
- package/dist/dso-toolkit/p-47379b28.entry.js +0 -1
- package/dist/dso-toolkit/p-53470b6d.entry.js +0 -1
- package/dist/dso-toolkit/p-5987e305.entry.js +0 -1
- package/dist/dso-toolkit/p-60bd9c8f.entry.js +0 -1
- package/dist/dso-toolkit/p-62200d9a.entry.js +0 -1
- package/dist/dso-toolkit/p-650b8ea0.entry.js +0 -1
- package/dist/dso-toolkit/p-6c8e1ef8.entry.js +0 -1
- package/dist/dso-toolkit/p-7b702683.entry.js +0 -1
- package/dist/dso-toolkit/p-BIfnbekk.js +0 -2
- package/dist/dso-toolkit/p-BaoXsbsy.js +0 -1
- package/dist/dso-toolkit/p-BuFNkQa2.js +0 -1
- package/dist/dso-toolkit/p-CJ3poofC.js +0 -1
- package/dist/dso-toolkit/p-Co-_Hv5Q.js +0 -1
- package/dist/dso-toolkit/p-DEQj4hHE.js +0 -1
- package/dist/dso-toolkit/p-DHajDj9P.js +0 -1
- package/dist/dso-toolkit/p-ULwgxD7S.js +0 -1
- package/dist/dso-toolkit/p-Vx2gP-Bl.js +0 -1
- package/dist/dso-toolkit/p-a49290e8.entry.js +0 -1
- package/dist/dso-toolkit/p-aed43ede.entry.js +0 -1
- package/dist/dso-toolkit/p-c2b4161b.entry.js +0 -1
- package/dist/dso-toolkit/p-de8977da.entry.js +0 -1
- package/dist/dso-toolkit/p-edea17c9.entry.js +0 -1
- package/dist/dso-toolkit/p-fb97e1cd.entry.js +0 -1
- package/dist/esm/tooltip.functional-component-eBucNQlw.js +0 -11
|
@@ -12,7 +12,7 @@ const defer = () => {
|
|
|
12
12
|
};
|
|
13
13
|
const makeString = object => {
|
|
14
14
|
if (object == null) return '';
|
|
15
|
-
return
|
|
15
|
+
return String(object);
|
|
16
16
|
};
|
|
17
17
|
const copy = (a, s, t) => {
|
|
18
18
|
a.forEach(m => {
|
|
@@ -20,7 +20,7 @@ const copy = (a, s, t) => {
|
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
22
|
const lastOfPathSeparatorRegExp = /###/g;
|
|
23
|
-
const cleanKey = key => key && key.
|
|
23
|
+
const cleanKey = key => key && key.includes('###') ? key.replace(lastOfPathSeparatorRegExp, '.') : key;
|
|
24
24
|
const canNotTraverseDeeper = object => !object || isString(object);
|
|
25
25
|
const getLastOfPath = (object, path, Empty) => {
|
|
26
26
|
const stack = !isString(path) ? path : path.split('.');
|
|
@@ -105,7 +105,7 @@ const deepExtend = (target, source, overwrite) => {
|
|
|
105
105
|
return target;
|
|
106
106
|
};
|
|
107
107
|
const regexEscape = str => str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
|
108
|
-
|
|
108
|
+
const _entityMap = {
|
|
109
109
|
'&': '&',
|
|
110
110
|
'<': '<',
|
|
111
111
|
'>': '>',
|
|
@@ -144,7 +144,7 @@ const looksLikeObjectPathRegExpCache = new RegExpCache(20);
|
|
|
144
144
|
const looksLikeObjectPath = (key, nsSeparator, keySeparator) => {
|
|
145
145
|
nsSeparator = nsSeparator || '';
|
|
146
146
|
keySeparator = keySeparator || '';
|
|
147
|
-
const possibleChars = chars.filter(c => nsSeparator.
|
|
147
|
+
const possibleChars = chars.filter(c => !nsSeparator.includes(c) && !keySeparator.includes(c));
|
|
148
148
|
if (possibleChars.length === 0) return true;
|
|
149
149
|
const r = looksLikeObjectPathRegExpCache.getRegExp(`(${possibleChars.map(c => c === '?' ? '\\?' : c).join('|')})`);
|
|
150
150
|
let matched = !r.test(key);
|
|
@@ -177,7 +177,7 @@ const deepFind = (obj, path, keySeparator = '.') => {
|
|
|
177
177
|
nextPath += tokens[j];
|
|
178
178
|
next = current[nextPath];
|
|
179
179
|
if (next !== undefined) {
|
|
180
|
-
if (['string', 'number', 'boolean'].
|
|
180
|
+
if (['string', 'number', 'boolean'].includes(typeof next) && j < tokens.length - 1) {
|
|
181
181
|
continue;
|
|
182
182
|
}
|
|
183
183
|
i += j - i + 1;
|
|
@@ -229,6 +229,7 @@ class Logger {
|
|
|
229
229
|
}
|
|
230
230
|
forward(args, lvl, prefix, debugOnly) {
|
|
231
231
|
if (debugOnly && !this.debug) return null;
|
|
232
|
+
args = args.map(a => isString(a) ? a.replace(/[\r\n\x00-\x1F\x7F]/g, ' ') : a);
|
|
232
233
|
if (isString(args[0])) args[0] = `${prefix}${this.prefix} ${args[0]}`;
|
|
233
234
|
return this.logger[lvl](args);
|
|
234
235
|
}
|
|
@@ -268,6 +269,14 @@ class EventEmitter {
|
|
|
268
269
|
}
|
|
269
270
|
this.observers[event].delete(listener);
|
|
270
271
|
}
|
|
272
|
+
once(event, listener) {
|
|
273
|
+
const wrapper = (...args) => {
|
|
274
|
+
listener(...args);
|
|
275
|
+
this.off(event, wrapper);
|
|
276
|
+
};
|
|
277
|
+
this.on(event, wrapper);
|
|
278
|
+
return this;
|
|
279
|
+
}
|
|
271
280
|
emit(event, ...args) {
|
|
272
281
|
if (this.observers[event]) {
|
|
273
282
|
const cloned = Array.from(this.observers[event].entries());
|
|
@@ -281,7 +290,7 @@ class EventEmitter {
|
|
|
281
290
|
const cloned = Array.from(this.observers['*'].entries());
|
|
282
291
|
cloned.forEach(([observer, numTimesAdded]) => {
|
|
283
292
|
for (let i = 0; i < numTimesAdded; i++) {
|
|
284
|
-
observer
|
|
293
|
+
observer(event, ...args);
|
|
285
294
|
}
|
|
286
295
|
});
|
|
287
296
|
}
|
|
@@ -304,7 +313,7 @@ class ResourceStore extends EventEmitter {
|
|
|
304
313
|
}
|
|
305
314
|
}
|
|
306
315
|
addNamespaces(ns) {
|
|
307
|
-
if (this.options.ns.
|
|
316
|
+
if (!this.options.ns.includes(ns)) {
|
|
308
317
|
this.options.ns.push(ns);
|
|
309
318
|
}
|
|
310
319
|
}
|
|
@@ -318,7 +327,7 @@ class ResourceStore extends EventEmitter {
|
|
|
318
327
|
const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
|
|
319
328
|
const ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
320
329
|
let path;
|
|
321
|
-
if (lng.
|
|
330
|
+
if (lng.includes('.')) {
|
|
322
331
|
path = lng.split('.');
|
|
323
332
|
} else {
|
|
324
333
|
path = [lng, ns];
|
|
@@ -333,7 +342,7 @@ class ResourceStore extends EventEmitter {
|
|
|
333
342
|
}
|
|
334
343
|
}
|
|
335
344
|
const result = getPath(this.data, path);
|
|
336
|
-
if (!result && !ns && !key && lng.
|
|
345
|
+
if (!result && !ns && !key && lng.includes('.')) {
|
|
337
346
|
lng = path[0];
|
|
338
347
|
ns = path[1];
|
|
339
348
|
key = path.slice(2).join('.');
|
|
@@ -347,7 +356,7 @@ class ResourceStore extends EventEmitter {
|
|
|
347
356
|
const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
|
|
348
357
|
let path = [lng, ns];
|
|
349
358
|
if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);
|
|
350
|
-
if (lng.
|
|
359
|
+
if (lng.includes('.')) {
|
|
351
360
|
path = lng.split('.');
|
|
352
361
|
value = ns;
|
|
353
362
|
ns = path[1];
|
|
@@ -371,7 +380,7 @@ class ResourceStore extends EventEmitter {
|
|
|
371
380
|
skipCopy: false
|
|
372
381
|
}) {
|
|
373
382
|
let path = [lng, ns];
|
|
374
|
-
if (lng.
|
|
383
|
+
if (lng.includes('.')) {
|
|
375
384
|
path = lng.split('.');
|
|
376
385
|
deep = resources;
|
|
377
386
|
resources = ns;
|
|
@@ -461,7 +470,6 @@ function keysFromSelector(selector, opts) {
|
|
|
461
470
|
return path.join(keySeparator);
|
|
462
471
|
}
|
|
463
472
|
|
|
464
|
-
const checkedLoadedFor = {};
|
|
465
473
|
const shouldHandleAsObject = res => !isString(res) && typeof res !== 'boolean' && typeof res !== 'number';
|
|
466
474
|
class Translator extends EventEmitter {
|
|
467
475
|
constructor(services, options = {}) {
|
|
@@ -472,6 +480,7 @@ class Translator extends EventEmitter {
|
|
|
472
480
|
this.options.keySeparator = '.';
|
|
473
481
|
}
|
|
474
482
|
this.logger = baseLogger.create('translator');
|
|
483
|
+
this.checkedLoadedFor = {};
|
|
475
484
|
}
|
|
476
485
|
changeLanguage(lng) {
|
|
477
486
|
if (lng) this.language = lng;
|
|
@@ -496,7 +505,7 @@ class Translator extends EventEmitter {
|
|
|
496
505
|
if (nsSeparator === undefined) nsSeparator = ':';
|
|
497
506
|
const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;
|
|
498
507
|
let namespaces = opt.ns || this.options.defaultNS || [];
|
|
499
|
-
const wouldCheckForNsInKey = nsSeparator && key.
|
|
508
|
+
const wouldCheckForNsInKey = nsSeparator && key.includes(nsSeparator);
|
|
500
509
|
const seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !opt.keySeparator && !this.options.userDefinedNsSeparator && !opt.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);
|
|
501
510
|
if (wouldCheckForNsInKey && !seemsNaturalLanguage) {
|
|
502
511
|
const m = key.match(this.interpolator.nestingRegexp);
|
|
@@ -507,7 +516,7 @@ class Translator extends EventEmitter {
|
|
|
507
516
|
};
|
|
508
517
|
}
|
|
509
518
|
const parts = key.split(nsSeparator);
|
|
510
|
-
if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.
|
|
519
|
+
if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.includes(parts[0])) namespaces = parts.shift();
|
|
511
520
|
key = parts.join(keySeparator);
|
|
512
521
|
}
|
|
513
522
|
return {
|
|
@@ -594,7 +603,7 @@ class Translator extends EventEmitter {
|
|
|
594
603
|
}
|
|
595
604
|
const handleAsObject = shouldHandleAsObject(resForObjHndl);
|
|
596
605
|
const resType = Object.prototype.toString.apply(resForObjHndl);
|
|
597
|
-
if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && noObject.
|
|
606
|
+
if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && !noObject.includes(resType) && !(isString(joinArrays) && Array.isArray(resForObjHndl))) {
|
|
598
607
|
if (!opt.returnObjects && !this.options.returnObjects) {
|
|
599
608
|
if (!this.options.returnedObjectHandler) {
|
|
600
609
|
this.logger.warn('accessing an object - but returnObjects options is not enabled!');
|
|
@@ -658,7 +667,7 @@ class Translator extends EventEmitter {
|
|
|
658
667
|
const resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;
|
|
659
668
|
const updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;
|
|
660
669
|
if (usedKey || usedDefault || updateMissing) {
|
|
661
|
-
this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ? defaultValue : res);
|
|
670
|
+
this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, needsPluralHandling && !updateMissing ? `${key}${this.pluralResolver.getSuffix(lng, opt.count, opt)}` : key, updateMissing ? defaultValue : res);
|
|
662
671
|
if (keySeparator) {
|
|
663
672
|
const fk = this.resolve(key, {
|
|
664
673
|
...opt,
|
|
@@ -690,7 +699,7 @@ class Translator extends EventEmitter {
|
|
|
690
699
|
if (this.options.saveMissingPlurals && needsPluralHandling) {
|
|
691
700
|
lngs.forEach(language => {
|
|
692
701
|
const suffixes = this.pluralResolver.getSuffixes(language, opt);
|
|
693
|
-
if (needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] && suffixes.
|
|
702
|
+
if (needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] && !suffixes.includes(`${this.options.pluralSeparator}zero`)) {
|
|
694
703
|
suffixes.push(`${this.options.pluralSeparator}zero`);
|
|
695
704
|
}
|
|
696
705
|
suffixes.forEach(suffix => {
|
|
@@ -800,8 +809,8 @@ class Translator extends EventEmitter {
|
|
|
800
809
|
namespaces.forEach(ns => {
|
|
801
810
|
if (this.isValidLookup(found)) return;
|
|
802
811
|
usedNS = ns;
|
|
803
|
-
if (!checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {
|
|
804
|
-
checkedLoadedFor[`${codes[0]}-${ns}`] = true;
|
|
812
|
+
if (!this.checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {
|
|
813
|
+
this.checkedLoadedFor[`${codes[0]}-${ns}`] = true;
|
|
805
814
|
this.logger.warn(`key "${usedKey}" for languages "${codes.join(', ')}" won't get resolved as namespace "${usedNS}" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');
|
|
806
815
|
}
|
|
807
816
|
codes.forEach(code => {
|
|
@@ -816,7 +825,7 @@ class Translator extends EventEmitter {
|
|
|
816
825
|
const zeroSuffix = `${this.options.pluralSeparator}zero`;
|
|
817
826
|
const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
818
827
|
if (needsPluralHandling) {
|
|
819
|
-
if (opt.ordinal && pluralSuffix.
|
|
828
|
+
if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {
|
|
820
829
|
finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));
|
|
821
830
|
}
|
|
822
831
|
finalKeys.push(key + pluralSuffix);
|
|
@@ -828,7 +837,7 @@ class Translator extends EventEmitter {
|
|
|
828
837
|
const contextKey = `${key}${this.options.contextSeparator || '_'}${opt.context}`;
|
|
829
838
|
finalKeys.push(contextKey);
|
|
830
839
|
if (needsPluralHandling) {
|
|
831
|
-
if (opt.ordinal && pluralSuffix.
|
|
840
|
+
if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {
|
|
832
841
|
finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));
|
|
833
842
|
}
|
|
834
843
|
finalKeys.push(contextKey + pluralSuffix);
|
|
@@ -889,7 +898,7 @@ class Translator extends EventEmitter {
|
|
|
889
898
|
static hasDefaultValue(options) {
|
|
890
899
|
const prefix = 'defaultValue';
|
|
891
900
|
for (const option in options) {
|
|
892
|
-
if (Object.prototype.hasOwnProperty.call(options, option) &&
|
|
901
|
+
if (Object.prototype.hasOwnProperty.call(options, option) && option.startsWith(prefix) && undefined !== options[option]) {
|
|
893
902
|
return true;
|
|
894
903
|
}
|
|
895
904
|
}
|
|
@@ -905,7 +914,7 @@ class LanguageUtil {
|
|
|
905
914
|
}
|
|
906
915
|
getScriptPartFromCode(code) {
|
|
907
916
|
code = getCleanedCode(code);
|
|
908
|
-
if (!code || code.
|
|
917
|
+
if (!code || !code.includes('-')) return null;
|
|
909
918
|
const p = code.split('-');
|
|
910
919
|
if (p.length === 2) return null;
|
|
911
920
|
p.pop();
|
|
@@ -914,12 +923,12 @@ class LanguageUtil {
|
|
|
914
923
|
}
|
|
915
924
|
getLanguagePartFromCode(code) {
|
|
916
925
|
code = getCleanedCode(code);
|
|
917
|
-
if (!code || code.
|
|
926
|
+
if (!code || !code.includes('-')) return code;
|
|
918
927
|
const p = code.split('-');
|
|
919
928
|
return this.formatLanguageCode(p[0]);
|
|
920
929
|
}
|
|
921
930
|
formatLanguageCode(code) {
|
|
922
|
-
if (isString(code) && code.
|
|
931
|
+
if (isString(code) && code.includes('-')) {
|
|
923
932
|
let formattedCode;
|
|
924
933
|
try {
|
|
925
934
|
formattedCode = Intl.getCanonicalLocales(code)[0];
|
|
@@ -939,7 +948,7 @@ class LanguageUtil {
|
|
|
939
948
|
if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {
|
|
940
949
|
code = this.getLanguagePartFromCode(code);
|
|
941
950
|
}
|
|
942
|
-
return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.
|
|
951
|
+
return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.includes(code);
|
|
943
952
|
}
|
|
944
953
|
getBestMatchFromCodes(codes) {
|
|
945
954
|
if (!codes) return null;
|
|
@@ -957,10 +966,11 @@ class LanguageUtil {
|
|
|
957
966
|
const lngOnly = this.getLanguagePartFromCode(code);
|
|
958
967
|
if (this.isSupportedCode(lngOnly)) return found = lngOnly;
|
|
959
968
|
found = this.options.supportedLngs.find(supportedLng => {
|
|
960
|
-
if (supportedLng === lngOnly) return
|
|
961
|
-
if (supportedLng.
|
|
962
|
-
if (supportedLng.
|
|
963
|
-
if (supportedLng.
|
|
969
|
+
if (supportedLng === lngOnly) return true;
|
|
970
|
+
if (!supportedLng.includes('-') && !lngOnly.includes('-')) return false;
|
|
971
|
+
if (supportedLng.includes('-') && !lngOnly.includes('-') && supportedLng.slice(0, supportedLng.indexOf('-')) === lngOnly) return true;
|
|
972
|
+
if (supportedLng.startsWith(lngOnly) && lngOnly.length > 1) return true;
|
|
973
|
+
return false;
|
|
964
974
|
});
|
|
965
975
|
});
|
|
966
976
|
}
|
|
@@ -991,7 +1001,7 @@ class LanguageUtil {
|
|
|
991
1001
|
this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`);
|
|
992
1002
|
}
|
|
993
1003
|
};
|
|
994
|
-
if (isString(code) && (code.
|
|
1004
|
+
if (isString(code) && (code.includes('-') || code.includes('_'))) {
|
|
995
1005
|
if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));
|
|
996
1006
|
if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));
|
|
997
1007
|
if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));
|
|
@@ -999,7 +1009,7 @@ class LanguageUtil {
|
|
|
999
1009
|
addCode(this.formatLanguageCode(code));
|
|
1000
1010
|
}
|
|
1001
1011
|
fallbackCodes.forEach(fc => {
|
|
1002
|
-
if (codes.
|
|
1012
|
+
if (!codes.includes(fc)) addCode(this.formatLanguageCode(fc));
|
|
1003
1013
|
});
|
|
1004
1014
|
return codes;
|
|
1005
1015
|
}
|
|
@@ -1125,8 +1135,8 @@ class Interpolator {
|
|
|
1125
1135
|
this.prefix = prefix ? regexEscape(prefix) : prefixEscaped || '{{';
|
|
1126
1136
|
this.suffix = suffix ? regexEscape(suffix) : suffixEscaped || '}}';
|
|
1127
1137
|
this.formatSeparator = formatSeparator || ',';
|
|
1128
|
-
this.unescapePrefix = unescapeSuffix ? '' : unescapePrefix
|
|
1129
|
-
this.unescapeSuffix = this.unescapePrefix ? '' : unescapeSuffix
|
|
1138
|
+
this.unescapePrefix = unescapeSuffix ? '' : unescapePrefix ? regexEscape(unescapePrefix) : '-';
|
|
1139
|
+
this.unescapeSuffix = this.unescapePrefix ? '' : unescapeSuffix ? regexEscape(unescapeSuffix) : '';
|
|
1130
1140
|
this.nestingPrefix = nestingPrefix ? regexEscape(nestingPrefix) : nestingPrefixEscaped || regexEscape('$t(');
|
|
1131
1141
|
this.nestingSuffix = nestingSuffix ? regexEscape(nestingSuffix) : nestingSuffixEscaped || regexEscape(')');
|
|
1132
1142
|
this.nestingOptionsSeparator = nestingOptionsSeparator || ',';
|
|
@@ -1155,7 +1165,7 @@ class Interpolator {
|
|
|
1155
1165
|
let replaces;
|
|
1156
1166
|
const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
|
|
1157
1167
|
const handleFormat = key => {
|
|
1158
|
-
if (key.
|
|
1168
|
+
if (!key.includes(this.formatSeparator)) {
|
|
1159
1169
|
const path = deepFindWithDefaults(data, defaultData, key, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
1160
1170
|
return this.alwaysFormat ? this.format(path, undefined, lng, {
|
|
1161
1171
|
...options,
|
|
@@ -1173,6 +1183,9 @@ class Interpolator {
|
|
|
1173
1183
|
});
|
|
1174
1184
|
};
|
|
1175
1185
|
this.resetRegExp();
|
|
1186
|
+
if (!this.escapeValue && typeof str === 'string' && /\$t\([^)]*\{[^}]*\{\{/.test(str)) {
|
|
1187
|
+
this.logger.warn('nesting options string contains interpolated variables with escapeValue: false — ' + 'if any of those values are attacker-controlled they can inject additional ' + 'nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing ' + 'it to t(), or keep escapeValue: true.');
|
|
1188
|
+
}
|
|
1176
1189
|
const missingInterpolationHandler = options?.missingInterpolationHandler || this.options.missingInterpolationHandler;
|
|
1177
1190
|
const skipOnVariables = options?.interpolation?.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
1178
1191
|
const todos = [{
|
|
@@ -1225,7 +1238,7 @@ class Interpolator {
|
|
|
1225
1238
|
let clonedOptions;
|
|
1226
1239
|
const handleHasOptions = (key, inheritedOptions) => {
|
|
1227
1240
|
const sep = this.nestingOptionsSeparator;
|
|
1228
|
-
if (key.
|
|
1241
|
+
if (!key.includes(sep)) return key;
|
|
1229
1242
|
const c = key.split(new RegExp(`${regexEscape(sep)}[ ]*{`));
|
|
1230
1243
|
let optionsString = `{${c[1]}`;
|
|
1231
1244
|
key = c[0];
|
|
@@ -1245,7 +1258,7 @@ class Interpolator {
|
|
|
1245
1258
|
this.logger.warn(`failed parsing options string in nesting for key ${key}`, e);
|
|
1246
1259
|
return `${key}${sep}${optionsString}`;
|
|
1247
1260
|
}
|
|
1248
|
-
if (clonedOptions.defaultValue && clonedOptions.defaultValue.
|
|
1261
|
+
if (clonedOptions.defaultValue && clonedOptions.defaultValue.includes(this.prefix)) delete clonedOptions.defaultValue;
|
|
1249
1262
|
return key;
|
|
1250
1263
|
};
|
|
1251
1264
|
while (match = this.nestingRegexp.exec(str)) {
|
|
@@ -1284,13 +1297,13 @@ class Interpolator {
|
|
|
1284
1297
|
const parseFormatStr = formatStr => {
|
|
1285
1298
|
let formatName = formatStr.toLowerCase().trim();
|
|
1286
1299
|
const formatOptions = {};
|
|
1287
|
-
if (formatStr.
|
|
1300
|
+
if (formatStr.includes('(')) {
|
|
1288
1301
|
const p = formatStr.split('(');
|
|
1289
1302
|
formatName = p[0].toLowerCase().trim();
|
|
1290
|
-
const optStr = p[1].
|
|
1291
|
-
if (formatName === 'currency' && optStr.
|
|
1303
|
+
const optStr = p[1].slice(0, -1);
|
|
1304
|
+
if (formatName === 'currency' && !optStr.includes(':')) {
|
|
1292
1305
|
if (!formatOptions.currency) formatOptions.currency = optStr.trim();
|
|
1293
|
-
} else if (formatName === 'relativetime' && optStr.
|
|
1306
|
+
} else if (formatName === 'relativetime' && !optStr.includes(':')) {
|
|
1294
1307
|
if (!formatOptions.range) formatOptions.range = optStr.trim();
|
|
1295
1308
|
} else {
|
|
1296
1309
|
const opts = optStr.split(';');
|
|
@@ -1384,9 +1397,11 @@ class Formatter {
|
|
|
1384
1397
|
this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);
|
|
1385
1398
|
}
|
|
1386
1399
|
format(value, format, lng, options = {}) {
|
|
1400
|
+
if (!format) return value;
|
|
1401
|
+
if (value == null) return value;
|
|
1387
1402
|
const formats = format.split(this.formatSeparator);
|
|
1388
|
-
if (formats.length > 1 && formats[0].indexOf('(') > 1 && formats[0].
|
|
1389
|
-
const lastIndex = formats.findIndex(f => f.
|
|
1403
|
+
if (formats.length > 1 && formats[0].indexOf('(') > 1 && !formats[0].includes(')') && formats.find(f => f.includes(')'))) {
|
|
1404
|
+
const lastIndex = formats.findIndex(f => f.includes(')'));
|
|
1390
1405
|
formats[0] = [formats[0], ...formats.splice(1, lastIndex)].join(this.formatSeparator);
|
|
1391
1406
|
}
|
|
1392
1407
|
const result = formats.reduce((mem, f) => {
|
|
@@ -1540,7 +1555,7 @@ class Connector extends EventEmitter {
|
|
|
1540
1555
|
}
|
|
1541
1556
|
if (err && data && tried < this.maxRetries) {
|
|
1542
1557
|
setTimeout(() => {
|
|
1543
|
-
this.read
|
|
1558
|
+
this.read(lng, ns, fcName, tried + 1, wait * 2, callback);
|
|
1544
1559
|
}, wait);
|
|
1545
1560
|
return;
|
|
1546
1561
|
}
|
|
@@ -1644,7 +1659,6 @@ const get = () => ({
|
|
|
1644
1659
|
nonExplicitSupportedLngs: false,
|
|
1645
1660
|
load: 'all',
|
|
1646
1661
|
preload: false,
|
|
1647
|
-
simplifyPluralSuffix: true,
|
|
1648
1662
|
keySeparator: '.',
|
|
1649
1663
|
nsSeparator: ':',
|
|
1650
1664
|
pluralSeparator: '_',
|
|
@@ -1681,7 +1695,6 @@ const get = () => ({
|
|
|
1681
1695
|
},
|
|
1682
1696
|
interpolation: {
|
|
1683
1697
|
escapeValue: true,
|
|
1684
|
-
format: value => value,
|
|
1685
1698
|
prefix: '{{',
|
|
1686
1699
|
suffix: '}}',
|
|
1687
1700
|
formatSeparator: ',',
|
|
@@ -1698,10 +1711,9 @@ const transformOptions = options => {
|
|
|
1698
1711
|
if (isString(options.ns)) options.ns = [options.ns];
|
|
1699
1712
|
if (isString(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];
|
|
1700
1713
|
if (isString(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];
|
|
1701
|
-
if (options.supportedLngs
|
|
1714
|
+
if (options.supportedLngs && !options.supportedLngs.includes('cimode')) {
|
|
1702
1715
|
options.supportedLngs = options.supportedLngs.concat(['cimode']);
|
|
1703
1716
|
}
|
|
1704
|
-
if (typeof options.initImmediate === 'boolean') options.initAsync = options.initImmediate;
|
|
1705
1717
|
return options;
|
|
1706
1718
|
};
|
|
1707
1719
|
|
|
@@ -1714,27 +1726,6 @@ const bindMemberFunctions = inst => {
|
|
|
1714
1726
|
}
|
|
1715
1727
|
});
|
|
1716
1728
|
};
|
|
1717
|
-
const SUPPORT_NOTICE_KEY = '__i18next_supportNoticeShown';
|
|
1718
|
-
const getSupportNoticeShown = () => {
|
|
1719
|
-
if (typeof globalThis !== 'undefined' && !!globalThis[SUPPORT_NOTICE_KEY]) return true;
|
|
1720
|
-
if (typeof process !== 'undefined' && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE) return true;
|
|
1721
|
-
return false;
|
|
1722
|
-
};
|
|
1723
|
-
const setSupportNoticeShown = () => {
|
|
1724
|
-
if (typeof globalThis !== 'undefined') globalThis[SUPPORT_NOTICE_KEY] = true;
|
|
1725
|
-
};
|
|
1726
|
-
const usesLocize = inst => {
|
|
1727
|
-
if (inst?.modules?.backend?.name?.indexOf('Locize') > 0) return true;
|
|
1728
|
-
if (inst?.modules?.backend?.constructor?.name?.indexOf('Locize') > 0) return true;
|
|
1729
|
-
if (inst?.options?.backend?.backends) {
|
|
1730
|
-
if (inst.options.backend.backends.some(b => b?.name?.indexOf('Locize') > 0 || b?.constructor?.name?.indexOf('Locize') > 0)) return true;
|
|
1731
|
-
}
|
|
1732
|
-
if (inst?.options?.backend?.projectId) return true;
|
|
1733
|
-
if (inst?.options?.backend?.backendOptions) {
|
|
1734
|
-
if (inst.options.backend.backendOptions.some(b => b?.projectId)) return true;
|
|
1735
|
-
}
|
|
1736
|
-
return false;
|
|
1737
|
-
};
|
|
1738
1729
|
class I18n extends EventEmitter {
|
|
1739
1730
|
constructor(options = {}, callback) {
|
|
1740
1731
|
super();
|
|
@@ -1764,7 +1755,7 @@ class I18n extends EventEmitter {
|
|
|
1764
1755
|
if (options.defaultNS == null && options.ns) {
|
|
1765
1756
|
if (isString(options.ns)) {
|
|
1766
1757
|
options.defaultNS = options.ns;
|
|
1767
|
-
} else if (options.ns.
|
|
1758
|
+
} else if (!options.ns.includes('translation')) {
|
|
1768
1759
|
options.defaultNS = options.ns[0];
|
|
1769
1760
|
}
|
|
1770
1761
|
}
|
|
@@ -1787,10 +1778,6 @@ class I18n extends EventEmitter {
|
|
|
1787
1778
|
if (typeof this.options.overloadTranslationOptionHandler !== 'function') {
|
|
1788
1779
|
this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;
|
|
1789
1780
|
}
|
|
1790
|
-
if (this.options.showSupportNotice !== false && !usesLocize(this) && !getSupportNoticeShown()) {
|
|
1791
|
-
if (typeof console !== 'undefined' && typeof console.info !== 'undefined') console.info('🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙');
|
|
1792
|
-
setSupportNoticeShown();
|
|
1793
|
-
}
|
|
1794
1781
|
const createClassOnDemand = ClassOrObject => {
|
|
1795
1782
|
if (!ClassOrObject) return null;
|
|
1796
1783
|
if (typeof ClassOrObject === 'function') return new ClassOrObject();
|
|
@@ -1815,14 +1802,9 @@ class I18n extends EventEmitter {
|
|
|
1815
1802
|
s.resourceStore = this.store;
|
|
1816
1803
|
s.languageUtils = lu;
|
|
1817
1804
|
s.pluralResolver = new PluralResolver(lu, {
|
|
1818
|
-
prepend: this.options.pluralSeparator
|
|
1819
|
-
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1805
|
+
prepend: this.options.pluralSeparator
|
|
1820
1806
|
});
|
|
1821
|
-
|
|
1822
|
-
if (usingLegacyFormatFunction) {
|
|
1823
|
-
this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`);
|
|
1824
|
-
}
|
|
1825
|
-
if (formatter && (!this.options.interpolation.format || this.options.interpolation.format === defOpts.interpolation.format)) {
|
|
1807
|
+
if (formatter) {
|
|
1826
1808
|
s.formatter = createClassOnDemand(formatter);
|
|
1827
1809
|
if (s.formatter.init) s.formatter.init(s, this.options);
|
|
1828
1810
|
this.options.interpolation.format = s.formatter.format.bind(s.formatter);
|
|
@@ -1882,7 +1864,7 @@ class I18n extends EventEmitter {
|
|
|
1882
1864
|
deferred.resolve(t);
|
|
1883
1865
|
callback(err, t);
|
|
1884
1866
|
};
|
|
1885
|
-
if (this.languages && !this.isInitialized) return finish(null, this.t.bind(this));
|
|
1867
|
+
if ((this.languages || this.isLanguageChangingTo) && !this.isInitialized) return finish(null, this.t.bind(this));
|
|
1886
1868
|
this.changeLanguage(this.options.lng, finish);
|
|
1887
1869
|
};
|
|
1888
1870
|
if (this.options.resources || !this.options.initAsync) {
|
|
@@ -1905,7 +1887,7 @@ class I18n extends EventEmitter {
|
|
|
1905
1887
|
const lngs = this.services.languageUtils.toResolveHierarchy(lng);
|
|
1906
1888
|
lngs.forEach(l => {
|
|
1907
1889
|
if (l === 'cimode') return;
|
|
1908
|
-
if (toLoad.
|
|
1890
|
+
if (!toLoad.includes(l)) toLoad.push(l);
|
|
1909
1891
|
});
|
|
1910
1892
|
};
|
|
1911
1893
|
if (!usedLng) {
|
|
@@ -1970,16 +1952,16 @@ class I18n extends EventEmitter {
|
|
|
1970
1952
|
}
|
|
1971
1953
|
setResolvedLanguage(l) {
|
|
1972
1954
|
if (!l || !this.languages) return;
|
|
1973
|
-
if (['cimode', 'dev'].
|
|
1955
|
+
if (['cimode', 'dev'].includes(l)) return;
|
|
1974
1956
|
for (let li = 0; li < this.languages.length; li++) {
|
|
1975
1957
|
const lngInLngs = this.languages[li];
|
|
1976
|
-
if (['cimode', 'dev'].
|
|
1958
|
+
if (['cimode', 'dev'].includes(lngInLngs)) continue;
|
|
1977
1959
|
if (this.store.hasLanguageSomeTranslations(lngInLngs)) {
|
|
1978
1960
|
this.resolvedLanguage = lngInLngs;
|
|
1979
1961
|
break;
|
|
1980
1962
|
}
|
|
1981
1963
|
}
|
|
1982
|
-
if (!this.resolvedLanguage && this.languages.
|
|
1964
|
+
if (!this.resolvedLanguage && !this.languages.includes(l) && this.store.hasLanguageSomeTranslations(l)) {
|
|
1983
1965
|
this.resolvedLanguage = l;
|
|
1984
1966
|
this.languages.unshift(l);
|
|
1985
1967
|
}
|
|
@@ -2121,7 +2103,7 @@ class I18n extends EventEmitter {
|
|
|
2121
2103
|
}
|
|
2122
2104
|
if (isString(ns)) ns = [ns];
|
|
2123
2105
|
ns.forEach(n => {
|
|
2124
|
-
if (this.options.ns.
|
|
2106
|
+
if (!this.options.ns.includes(n)) this.options.ns.push(n);
|
|
2125
2107
|
});
|
|
2126
2108
|
this.loadResources(err => {
|
|
2127
2109
|
deferred.resolve();
|
|
@@ -2133,7 +2115,7 @@ class I18n extends EventEmitter {
|
|
|
2133
2115
|
const deferred = defer();
|
|
2134
2116
|
if (isString(lngs)) lngs = [lngs];
|
|
2135
2117
|
const preloaded = this.options.preload || [];
|
|
2136
|
-
const newLngs = lngs.filter(lng => preloaded.
|
|
2118
|
+
const newLngs = lngs.filter(lng => !preloaded.includes(lng) && this.services.languageUtils.isSupportedCode(lng));
|
|
2137
2119
|
if (!newLngs.length) {
|
|
2138
2120
|
if (callback) callback();
|
|
2139
2121
|
return Promise.resolve();
|
|
@@ -2158,7 +2140,7 @@ class I18n extends EventEmitter {
|
|
|
2158
2140
|
const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];
|
|
2159
2141
|
const languageUtils = this.services?.languageUtils || new LanguageUtil(get());
|
|
2160
2142
|
if (lng.toLowerCase().indexOf('-latn') > 1) return 'ltr';
|
|
2161
|
-
return rtlLngs.
|
|
2143
|
+
return rtlLngs.includes(languageUtils.getLanguagePartFromCode(lng)) || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';
|
|
2162
2144
|
}
|
|
2163
2145
|
static createInstance(options = {}, callback) {
|
|
2164
2146
|
const instance = new I18n(options, callback);
|
|
@@ -2265,7 +2247,6 @@ function i18n(getElement, resources) {
|
|
|
2265
2247
|
resources,
|
|
2266
2248
|
defaultNS: element.tagName.toLowerCase(),
|
|
2267
2249
|
interpolation: { escapeValue: false },
|
|
2268
|
-
showSupportNotice: false,
|
|
2269
2250
|
});
|
|
2270
2251
|
let detectedLanguage = false;
|
|
2271
2252
|
return (key, variables) => {
|