@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
|
@@ -14,7 +14,7 @@ const defer = () => {
|
|
|
14
14
|
};
|
|
15
15
|
const makeString = object => {
|
|
16
16
|
if (object == null) return '';
|
|
17
|
-
return
|
|
17
|
+
return String(object);
|
|
18
18
|
};
|
|
19
19
|
const copy = (a, s, t) => {
|
|
20
20
|
a.forEach(m => {
|
|
@@ -22,7 +22,7 @@ const copy = (a, s, t) => {
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
const lastOfPathSeparatorRegExp = /###/g;
|
|
25
|
-
const cleanKey = key => key && key.
|
|
25
|
+
const cleanKey = key => key && key.includes('###') ? key.replace(lastOfPathSeparatorRegExp, '.') : key;
|
|
26
26
|
const canNotTraverseDeeper = object => !object || isString(object);
|
|
27
27
|
const getLastOfPath = (object, path, Empty) => {
|
|
28
28
|
const stack = !isString(path) ? path : path.split('.');
|
|
@@ -107,7 +107,7 @@ const deepExtend = (target, source, overwrite) => {
|
|
|
107
107
|
return target;
|
|
108
108
|
};
|
|
109
109
|
const regexEscape = str => str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
|
110
|
-
|
|
110
|
+
const _entityMap = {
|
|
111
111
|
'&': '&',
|
|
112
112
|
'<': '<',
|
|
113
113
|
'>': '>',
|
|
@@ -146,7 +146,7 @@ const looksLikeObjectPathRegExpCache = new RegExpCache(20);
|
|
|
146
146
|
const looksLikeObjectPath = (key, nsSeparator, keySeparator) => {
|
|
147
147
|
nsSeparator = nsSeparator || '';
|
|
148
148
|
keySeparator = keySeparator || '';
|
|
149
|
-
const possibleChars = chars.filter(c => nsSeparator.
|
|
149
|
+
const possibleChars = chars.filter(c => !nsSeparator.includes(c) && !keySeparator.includes(c));
|
|
150
150
|
if (possibleChars.length === 0) return true;
|
|
151
151
|
const r = looksLikeObjectPathRegExpCache.getRegExp(`(${possibleChars.map(c => c === '?' ? '\\?' : c).join('|')})`);
|
|
152
152
|
let matched = !r.test(key);
|
|
@@ -179,7 +179,7 @@ const deepFind = (obj, path, keySeparator = '.') => {
|
|
|
179
179
|
nextPath += tokens[j];
|
|
180
180
|
next = current[nextPath];
|
|
181
181
|
if (next !== undefined) {
|
|
182
|
-
if (['string', 'number', 'boolean'].
|
|
182
|
+
if (['string', 'number', 'boolean'].includes(typeof next) && j < tokens.length - 1) {
|
|
183
183
|
continue;
|
|
184
184
|
}
|
|
185
185
|
i += j - i + 1;
|
|
@@ -231,6 +231,7 @@ class Logger {
|
|
|
231
231
|
}
|
|
232
232
|
forward(args, lvl, prefix, debugOnly) {
|
|
233
233
|
if (debugOnly && !this.debug) return null;
|
|
234
|
+
args = args.map(a => isString(a) ? a.replace(/[\r\n\x00-\x1F\x7F]/g, ' ') : a);
|
|
234
235
|
if (isString(args[0])) args[0] = `${prefix}${this.prefix} ${args[0]}`;
|
|
235
236
|
return this.logger[lvl](args);
|
|
236
237
|
}
|
|
@@ -270,6 +271,14 @@ class EventEmitter {
|
|
|
270
271
|
}
|
|
271
272
|
this.observers[event].delete(listener);
|
|
272
273
|
}
|
|
274
|
+
once(event, listener) {
|
|
275
|
+
const wrapper = (...args) => {
|
|
276
|
+
listener(...args);
|
|
277
|
+
this.off(event, wrapper);
|
|
278
|
+
};
|
|
279
|
+
this.on(event, wrapper);
|
|
280
|
+
return this;
|
|
281
|
+
}
|
|
273
282
|
emit(event, ...args) {
|
|
274
283
|
if (this.observers[event]) {
|
|
275
284
|
const cloned = Array.from(this.observers[event].entries());
|
|
@@ -283,7 +292,7 @@ class EventEmitter {
|
|
|
283
292
|
const cloned = Array.from(this.observers['*'].entries());
|
|
284
293
|
cloned.forEach(([observer, numTimesAdded]) => {
|
|
285
294
|
for (let i = 0; i < numTimesAdded; i++) {
|
|
286
|
-
observer
|
|
295
|
+
observer(event, ...args);
|
|
287
296
|
}
|
|
288
297
|
});
|
|
289
298
|
}
|
|
@@ -306,7 +315,7 @@ class ResourceStore extends EventEmitter {
|
|
|
306
315
|
}
|
|
307
316
|
}
|
|
308
317
|
addNamespaces(ns) {
|
|
309
|
-
if (this.options.ns.
|
|
318
|
+
if (!this.options.ns.includes(ns)) {
|
|
310
319
|
this.options.ns.push(ns);
|
|
311
320
|
}
|
|
312
321
|
}
|
|
@@ -320,7 +329,7 @@ class ResourceStore extends EventEmitter {
|
|
|
320
329
|
const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
|
|
321
330
|
const ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
322
331
|
let path;
|
|
323
|
-
if (lng.
|
|
332
|
+
if (lng.includes('.')) {
|
|
324
333
|
path = lng.split('.');
|
|
325
334
|
} else {
|
|
326
335
|
path = [lng, ns];
|
|
@@ -335,7 +344,7 @@ class ResourceStore extends EventEmitter {
|
|
|
335
344
|
}
|
|
336
345
|
}
|
|
337
346
|
const result = getPath(this.data, path);
|
|
338
|
-
if (!result && !ns && !key && lng.
|
|
347
|
+
if (!result && !ns && !key && lng.includes('.')) {
|
|
339
348
|
lng = path[0];
|
|
340
349
|
ns = path[1];
|
|
341
350
|
key = path.slice(2).join('.');
|
|
@@ -349,7 +358,7 @@ class ResourceStore extends EventEmitter {
|
|
|
349
358
|
const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
|
|
350
359
|
let path = [lng, ns];
|
|
351
360
|
if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);
|
|
352
|
-
if (lng.
|
|
361
|
+
if (lng.includes('.')) {
|
|
353
362
|
path = lng.split('.');
|
|
354
363
|
value = ns;
|
|
355
364
|
ns = path[1];
|
|
@@ -373,7 +382,7 @@ class ResourceStore extends EventEmitter {
|
|
|
373
382
|
skipCopy: false
|
|
374
383
|
}) {
|
|
375
384
|
let path = [lng, ns];
|
|
376
|
-
if (lng.
|
|
385
|
+
if (lng.includes('.')) {
|
|
377
386
|
path = lng.split('.');
|
|
378
387
|
deep = resources;
|
|
379
388
|
resources = ns;
|
|
@@ -463,7 +472,6 @@ function keysFromSelector(selector, opts) {
|
|
|
463
472
|
return path.join(keySeparator);
|
|
464
473
|
}
|
|
465
474
|
|
|
466
|
-
const checkedLoadedFor = {};
|
|
467
475
|
const shouldHandleAsObject = res => !isString(res) && typeof res !== 'boolean' && typeof res !== 'number';
|
|
468
476
|
class Translator extends EventEmitter {
|
|
469
477
|
constructor(services, options = {}) {
|
|
@@ -474,6 +482,7 @@ class Translator extends EventEmitter {
|
|
|
474
482
|
this.options.keySeparator = '.';
|
|
475
483
|
}
|
|
476
484
|
this.logger = baseLogger.create('translator');
|
|
485
|
+
this.checkedLoadedFor = {};
|
|
477
486
|
}
|
|
478
487
|
changeLanguage(lng) {
|
|
479
488
|
if (lng) this.language = lng;
|
|
@@ -498,7 +507,7 @@ class Translator extends EventEmitter {
|
|
|
498
507
|
if (nsSeparator === undefined) nsSeparator = ':';
|
|
499
508
|
const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;
|
|
500
509
|
let namespaces = opt.ns || this.options.defaultNS || [];
|
|
501
|
-
const wouldCheckForNsInKey = nsSeparator && key.
|
|
510
|
+
const wouldCheckForNsInKey = nsSeparator && key.includes(nsSeparator);
|
|
502
511
|
const seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !opt.keySeparator && !this.options.userDefinedNsSeparator && !opt.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);
|
|
503
512
|
if (wouldCheckForNsInKey && !seemsNaturalLanguage) {
|
|
504
513
|
const m = key.match(this.interpolator.nestingRegexp);
|
|
@@ -509,7 +518,7 @@ class Translator extends EventEmitter {
|
|
|
509
518
|
};
|
|
510
519
|
}
|
|
511
520
|
const parts = key.split(nsSeparator);
|
|
512
|
-
if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.
|
|
521
|
+
if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.includes(parts[0])) namespaces = parts.shift();
|
|
513
522
|
key = parts.join(keySeparator);
|
|
514
523
|
}
|
|
515
524
|
return {
|
|
@@ -596,7 +605,7 @@ class Translator extends EventEmitter {
|
|
|
596
605
|
}
|
|
597
606
|
const handleAsObject = shouldHandleAsObject(resForObjHndl);
|
|
598
607
|
const resType = Object.prototype.toString.apply(resForObjHndl);
|
|
599
|
-
if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && noObject.
|
|
608
|
+
if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && !noObject.includes(resType) && !(isString(joinArrays) && Array.isArray(resForObjHndl))) {
|
|
600
609
|
if (!opt.returnObjects && !this.options.returnObjects) {
|
|
601
610
|
if (!this.options.returnedObjectHandler) {
|
|
602
611
|
this.logger.warn('accessing an object - but returnObjects options is not enabled!');
|
|
@@ -660,7 +669,7 @@ class Translator extends EventEmitter {
|
|
|
660
669
|
const resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;
|
|
661
670
|
const updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;
|
|
662
671
|
if (usedKey || usedDefault || updateMissing) {
|
|
663
|
-
this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ? defaultValue : res);
|
|
672
|
+
this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, needsPluralHandling && !updateMissing ? `${key}${this.pluralResolver.getSuffix(lng, opt.count, opt)}` : key, updateMissing ? defaultValue : res);
|
|
664
673
|
if (keySeparator) {
|
|
665
674
|
const fk = this.resolve(key, {
|
|
666
675
|
...opt,
|
|
@@ -692,7 +701,7 @@ class Translator extends EventEmitter {
|
|
|
692
701
|
if (this.options.saveMissingPlurals && needsPluralHandling) {
|
|
693
702
|
lngs.forEach(language => {
|
|
694
703
|
const suffixes = this.pluralResolver.getSuffixes(language, opt);
|
|
695
|
-
if (needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] && suffixes.
|
|
704
|
+
if (needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] && !suffixes.includes(`${this.options.pluralSeparator}zero`)) {
|
|
696
705
|
suffixes.push(`${this.options.pluralSeparator}zero`);
|
|
697
706
|
}
|
|
698
707
|
suffixes.forEach(suffix => {
|
|
@@ -802,8 +811,8 @@ class Translator extends EventEmitter {
|
|
|
802
811
|
namespaces.forEach(ns => {
|
|
803
812
|
if (this.isValidLookup(found)) return;
|
|
804
813
|
usedNS = ns;
|
|
805
|
-
if (!checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {
|
|
806
|
-
checkedLoadedFor[`${codes[0]}-${ns}`] = true;
|
|
814
|
+
if (!this.checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {
|
|
815
|
+
this.checkedLoadedFor[`${codes[0]}-${ns}`] = true;
|
|
807
816
|
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!!!');
|
|
808
817
|
}
|
|
809
818
|
codes.forEach(code => {
|
|
@@ -818,7 +827,7 @@ class Translator extends EventEmitter {
|
|
|
818
827
|
const zeroSuffix = `${this.options.pluralSeparator}zero`;
|
|
819
828
|
const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
820
829
|
if (needsPluralHandling) {
|
|
821
|
-
if (opt.ordinal && pluralSuffix.
|
|
830
|
+
if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {
|
|
822
831
|
finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));
|
|
823
832
|
}
|
|
824
833
|
finalKeys.push(key + pluralSuffix);
|
|
@@ -830,7 +839,7 @@ class Translator extends EventEmitter {
|
|
|
830
839
|
const contextKey = `${key}${this.options.contextSeparator || '_'}${opt.context}`;
|
|
831
840
|
finalKeys.push(contextKey);
|
|
832
841
|
if (needsPluralHandling) {
|
|
833
|
-
if (opt.ordinal && pluralSuffix.
|
|
842
|
+
if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {
|
|
834
843
|
finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));
|
|
835
844
|
}
|
|
836
845
|
finalKeys.push(contextKey + pluralSuffix);
|
|
@@ -891,7 +900,7 @@ class Translator extends EventEmitter {
|
|
|
891
900
|
static hasDefaultValue(options) {
|
|
892
901
|
const prefix = 'defaultValue';
|
|
893
902
|
for (const option in options) {
|
|
894
|
-
if (Object.prototype.hasOwnProperty.call(options, option) &&
|
|
903
|
+
if (Object.prototype.hasOwnProperty.call(options, option) && option.startsWith(prefix) && undefined !== options[option]) {
|
|
895
904
|
return true;
|
|
896
905
|
}
|
|
897
906
|
}
|
|
@@ -907,7 +916,7 @@ class LanguageUtil {
|
|
|
907
916
|
}
|
|
908
917
|
getScriptPartFromCode(code) {
|
|
909
918
|
code = getCleanedCode(code);
|
|
910
|
-
if (!code || code.
|
|
919
|
+
if (!code || !code.includes('-')) return null;
|
|
911
920
|
const p = code.split('-');
|
|
912
921
|
if (p.length === 2) return null;
|
|
913
922
|
p.pop();
|
|
@@ -916,12 +925,12 @@ class LanguageUtil {
|
|
|
916
925
|
}
|
|
917
926
|
getLanguagePartFromCode(code) {
|
|
918
927
|
code = getCleanedCode(code);
|
|
919
|
-
if (!code || code.
|
|
928
|
+
if (!code || !code.includes('-')) return code;
|
|
920
929
|
const p = code.split('-');
|
|
921
930
|
return this.formatLanguageCode(p[0]);
|
|
922
931
|
}
|
|
923
932
|
formatLanguageCode(code) {
|
|
924
|
-
if (isString(code) && code.
|
|
933
|
+
if (isString(code) && code.includes('-')) {
|
|
925
934
|
let formattedCode;
|
|
926
935
|
try {
|
|
927
936
|
formattedCode = Intl.getCanonicalLocales(code)[0];
|
|
@@ -941,7 +950,7 @@ class LanguageUtil {
|
|
|
941
950
|
if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {
|
|
942
951
|
code = this.getLanguagePartFromCode(code);
|
|
943
952
|
}
|
|
944
|
-
return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.
|
|
953
|
+
return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.includes(code);
|
|
945
954
|
}
|
|
946
955
|
getBestMatchFromCodes(codes) {
|
|
947
956
|
if (!codes) return null;
|
|
@@ -959,10 +968,11 @@ class LanguageUtil {
|
|
|
959
968
|
const lngOnly = this.getLanguagePartFromCode(code);
|
|
960
969
|
if (this.isSupportedCode(lngOnly)) return found = lngOnly;
|
|
961
970
|
found = this.options.supportedLngs.find(supportedLng => {
|
|
962
|
-
if (supportedLng === lngOnly) return
|
|
963
|
-
if (supportedLng.
|
|
964
|
-
if (supportedLng.
|
|
965
|
-
if (supportedLng.
|
|
971
|
+
if (supportedLng === lngOnly) return true;
|
|
972
|
+
if (!supportedLng.includes('-') && !lngOnly.includes('-')) return false;
|
|
973
|
+
if (supportedLng.includes('-') && !lngOnly.includes('-') && supportedLng.slice(0, supportedLng.indexOf('-')) === lngOnly) return true;
|
|
974
|
+
if (supportedLng.startsWith(lngOnly) && lngOnly.length > 1) return true;
|
|
975
|
+
return false;
|
|
966
976
|
});
|
|
967
977
|
});
|
|
968
978
|
}
|
|
@@ -993,7 +1003,7 @@ class LanguageUtil {
|
|
|
993
1003
|
this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`);
|
|
994
1004
|
}
|
|
995
1005
|
};
|
|
996
|
-
if (isString(code) && (code.
|
|
1006
|
+
if (isString(code) && (code.includes('-') || code.includes('_'))) {
|
|
997
1007
|
if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));
|
|
998
1008
|
if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));
|
|
999
1009
|
if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));
|
|
@@ -1001,7 +1011,7 @@ class LanguageUtil {
|
|
|
1001
1011
|
addCode(this.formatLanguageCode(code));
|
|
1002
1012
|
}
|
|
1003
1013
|
fallbackCodes.forEach(fc => {
|
|
1004
|
-
if (codes.
|
|
1014
|
+
if (!codes.includes(fc)) addCode(this.formatLanguageCode(fc));
|
|
1005
1015
|
});
|
|
1006
1016
|
return codes;
|
|
1007
1017
|
}
|
|
@@ -1127,8 +1137,8 @@ class Interpolator {
|
|
|
1127
1137
|
this.prefix = prefix ? regexEscape(prefix) : prefixEscaped || '{{';
|
|
1128
1138
|
this.suffix = suffix ? regexEscape(suffix) : suffixEscaped || '}}';
|
|
1129
1139
|
this.formatSeparator = formatSeparator || ',';
|
|
1130
|
-
this.unescapePrefix = unescapeSuffix ? '' : unescapePrefix
|
|
1131
|
-
this.unescapeSuffix = this.unescapePrefix ? '' : unescapeSuffix
|
|
1140
|
+
this.unescapePrefix = unescapeSuffix ? '' : unescapePrefix ? regexEscape(unescapePrefix) : '-';
|
|
1141
|
+
this.unescapeSuffix = this.unescapePrefix ? '' : unescapeSuffix ? regexEscape(unescapeSuffix) : '';
|
|
1132
1142
|
this.nestingPrefix = nestingPrefix ? regexEscape(nestingPrefix) : nestingPrefixEscaped || regexEscape('$t(');
|
|
1133
1143
|
this.nestingSuffix = nestingSuffix ? regexEscape(nestingSuffix) : nestingSuffixEscaped || regexEscape(')');
|
|
1134
1144
|
this.nestingOptionsSeparator = nestingOptionsSeparator || ',';
|
|
@@ -1157,7 +1167,7 @@ class Interpolator {
|
|
|
1157
1167
|
let replaces;
|
|
1158
1168
|
const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
|
|
1159
1169
|
const handleFormat = key => {
|
|
1160
|
-
if (key.
|
|
1170
|
+
if (!key.includes(this.formatSeparator)) {
|
|
1161
1171
|
const path = deepFindWithDefaults(data, defaultData, key, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
1162
1172
|
return this.alwaysFormat ? this.format(path, undefined, lng, {
|
|
1163
1173
|
...options,
|
|
@@ -1175,6 +1185,9 @@ class Interpolator {
|
|
|
1175
1185
|
});
|
|
1176
1186
|
};
|
|
1177
1187
|
this.resetRegExp();
|
|
1188
|
+
if (!this.escapeValue && typeof str === 'string' && /\$t\([^)]*\{[^}]*\{\{/.test(str)) {
|
|
1189
|
+
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.');
|
|
1190
|
+
}
|
|
1178
1191
|
const missingInterpolationHandler = options?.missingInterpolationHandler || this.options.missingInterpolationHandler;
|
|
1179
1192
|
const skipOnVariables = options?.interpolation?.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
1180
1193
|
const todos = [{
|
|
@@ -1227,7 +1240,7 @@ class Interpolator {
|
|
|
1227
1240
|
let clonedOptions;
|
|
1228
1241
|
const handleHasOptions = (key, inheritedOptions) => {
|
|
1229
1242
|
const sep = this.nestingOptionsSeparator;
|
|
1230
|
-
if (key.
|
|
1243
|
+
if (!key.includes(sep)) return key;
|
|
1231
1244
|
const c = key.split(new RegExp(`${regexEscape(sep)}[ ]*{`));
|
|
1232
1245
|
let optionsString = `{${c[1]}`;
|
|
1233
1246
|
key = c[0];
|
|
@@ -1247,7 +1260,7 @@ class Interpolator {
|
|
|
1247
1260
|
this.logger.warn(`failed parsing options string in nesting for key ${key}`, e);
|
|
1248
1261
|
return `${key}${sep}${optionsString}`;
|
|
1249
1262
|
}
|
|
1250
|
-
if (clonedOptions.defaultValue && clonedOptions.defaultValue.
|
|
1263
|
+
if (clonedOptions.defaultValue && clonedOptions.defaultValue.includes(this.prefix)) delete clonedOptions.defaultValue;
|
|
1251
1264
|
return key;
|
|
1252
1265
|
};
|
|
1253
1266
|
while (match = this.nestingRegexp.exec(str)) {
|
|
@@ -1286,13 +1299,13 @@ class Interpolator {
|
|
|
1286
1299
|
const parseFormatStr = formatStr => {
|
|
1287
1300
|
let formatName = formatStr.toLowerCase().trim();
|
|
1288
1301
|
const formatOptions = {};
|
|
1289
|
-
if (formatStr.
|
|
1302
|
+
if (formatStr.includes('(')) {
|
|
1290
1303
|
const p = formatStr.split('(');
|
|
1291
1304
|
formatName = p[0].toLowerCase().trim();
|
|
1292
|
-
const optStr = p[1].
|
|
1293
|
-
if (formatName === 'currency' && optStr.
|
|
1305
|
+
const optStr = p[1].slice(0, -1);
|
|
1306
|
+
if (formatName === 'currency' && !optStr.includes(':')) {
|
|
1294
1307
|
if (!formatOptions.currency) formatOptions.currency = optStr.trim();
|
|
1295
|
-
} else if (formatName === 'relativetime' && optStr.
|
|
1308
|
+
} else if (formatName === 'relativetime' && !optStr.includes(':')) {
|
|
1296
1309
|
if (!formatOptions.range) formatOptions.range = optStr.trim();
|
|
1297
1310
|
} else {
|
|
1298
1311
|
const opts = optStr.split(';');
|
|
@@ -1386,9 +1399,11 @@ class Formatter {
|
|
|
1386
1399
|
this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);
|
|
1387
1400
|
}
|
|
1388
1401
|
format(value, format, lng, options = {}) {
|
|
1402
|
+
if (!format) return value;
|
|
1403
|
+
if (value == null) return value;
|
|
1389
1404
|
const formats = format.split(this.formatSeparator);
|
|
1390
|
-
if (formats.length > 1 && formats[0].indexOf('(') > 1 && formats[0].
|
|
1391
|
-
const lastIndex = formats.findIndex(f => f.
|
|
1405
|
+
if (formats.length > 1 && formats[0].indexOf('(') > 1 && !formats[0].includes(')') && formats.find(f => f.includes(')'))) {
|
|
1406
|
+
const lastIndex = formats.findIndex(f => f.includes(')'));
|
|
1392
1407
|
formats[0] = [formats[0], ...formats.splice(1, lastIndex)].join(this.formatSeparator);
|
|
1393
1408
|
}
|
|
1394
1409
|
const result = formats.reduce((mem, f) => {
|
|
@@ -1542,7 +1557,7 @@ class Connector extends EventEmitter {
|
|
|
1542
1557
|
}
|
|
1543
1558
|
if (err && data && tried < this.maxRetries) {
|
|
1544
1559
|
setTimeout(() => {
|
|
1545
|
-
this.read
|
|
1560
|
+
this.read(lng, ns, fcName, tried + 1, wait * 2, callback);
|
|
1546
1561
|
}, wait);
|
|
1547
1562
|
return;
|
|
1548
1563
|
}
|
|
@@ -1646,7 +1661,6 @@ const get = () => ({
|
|
|
1646
1661
|
nonExplicitSupportedLngs: false,
|
|
1647
1662
|
load: 'all',
|
|
1648
1663
|
preload: false,
|
|
1649
|
-
simplifyPluralSuffix: true,
|
|
1650
1664
|
keySeparator: '.',
|
|
1651
1665
|
nsSeparator: ':',
|
|
1652
1666
|
pluralSeparator: '_',
|
|
@@ -1683,7 +1697,6 @@ const get = () => ({
|
|
|
1683
1697
|
},
|
|
1684
1698
|
interpolation: {
|
|
1685
1699
|
escapeValue: true,
|
|
1686
|
-
format: value => value,
|
|
1687
1700
|
prefix: '{{',
|
|
1688
1701
|
suffix: '}}',
|
|
1689
1702
|
formatSeparator: ',',
|
|
@@ -1700,10 +1713,9 @@ const transformOptions = options => {
|
|
|
1700
1713
|
if (isString(options.ns)) options.ns = [options.ns];
|
|
1701
1714
|
if (isString(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];
|
|
1702
1715
|
if (isString(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];
|
|
1703
|
-
if (options.supportedLngs
|
|
1716
|
+
if (options.supportedLngs && !options.supportedLngs.includes('cimode')) {
|
|
1704
1717
|
options.supportedLngs = options.supportedLngs.concat(['cimode']);
|
|
1705
1718
|
}
|
|
1706
|
-
if (typeof options.initImmediate === 'boolean') options.initAsync = options.initImmediate;
|
|
1707
1719
|
return options;
|
|
1708
1720
|
};
|
|
1709
1721
|
|
|
@@ -1716,27 +1728,6 @@ const bindMemberFunctions = inst => {
|
|
|
1716
1728
|
}
|
|
1717
1729
|
});
|
|
1718
1730
|
};
|
|
1719
|
-
const SUPPORT_NOTICE_KEY = '__i18next_supportNoticeShown';
|
|
1720
|
-
const getSupportNoticeShown = () => {
|
|
1721
|
-
if (typeof globalThis !== 'undefined' && !!globalThis[SUPPORT_NOTICE_KEY]) return true;
|
|
1722
|
-
if (typeof process !== 'undefined' && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE) return true;
|
|
1723
|
-
return false;
|
|
1724
|
-
};
|
|
1725
|
-
const setSupportNoticeShown = () => {
|
|
1726
|
-
if (typeof globalThis !== 'undefined') globalThis[SUPPORT_NOTICE_KEY] = true;
|
|
1727
|
-
};
|
|
1728
|
-
const usesLocize = inst => {
|
|
1729
|
-
if (inst?.modules?.backend?.name?.indexOf('Locize') > 0) return true;
|
|
1730
|
-
if (inst?.modules?.backend?.constructor?.name?.indexOf('Locize') > 0) return true;
|
|
1731
|
-
if (inst?.options?.backend?.backends) {
|
|
1732
|
-
if (inst.options.backend.backends.some(b => b?.name?.indexOf('Locize') > 0 || b?.constructor?.name?.indexOf('Locize') > 0)) return true;
|
|
1733
|
-
}
|
|
1734
|
-
if (inst?.options?.backend?.projectId) return true;
|
|
1735
|
-
if (inst?.options?.backend?.backendOptions) {
|
|
1736
|
-
if (inst.options.backend.backendOptions.some(b => b?.projectId)) return true;
|
|
1737
|
-
}
|
|
1738
|
-
return false;
|
|
1739
|
-
};
|
|
1740
1731
|
class I18n extends EventEmitter {
|
|
1741
1732
|
constructor(options = {}, callback) {
|
|
1742
1733
|
super();
|
|
@@ -1766,7 +1757,7 @@ class I18n extends EventEmitter {
|
|
|
1766
1757
|
if (options.defaultNS == null && options.ns) {
|
|
1767
1758
|
if (isString(options.ns)) {
|
|
1768
1759
|
options.defaultNS = options.ns;
|
|
1769
|
-
} else if (options.ns.
|
|
1760
|
+
} else if (!options.ns.includes('translation')) {
|
|
1770
1761
|
options.defaultNS = options.ns[0];
|
|
1771
1762
|
}
|
|
1772
1763
|
}
|
|
@@ -1789,10 +1780,6 @@ class I18n extends EventEmitter {
|
|
|
1789
1780
|
if (typeof this.options.overloadTranslationOptionHandler !== 'function') {
|
|
1790
1781
|
this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;
|
|
1791
1782
|
}
|
|
1792
|
-
if (this.options.showSupportNotice !== false && !usesLocize(this) && !getSupportNoticeShown()) {
|
|
1793
|
-
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 💙');
|
|
1794
|
-
setSupportNoticeShown();
|
|
1795
|
-
}
|
|
1796
1783
|
const createClassOnDemand = ClassOrObject => {
|
|
1797
1784
|
if (!ClassOrObject) return null;
|
|
1798
1785
|
if (typeof ClassOrObject === 'function') return new ClassOrObject();
|
|
@@ -1817,14 +1804,9 @@ class I18n extends EventEmitter {
|
|
|
1817
1804
|
s.resourceStore = this.store;
|
|
1818
1805
|
s.languageUtils = lu;
|
|
1819
1806
|
s.pluralResolver = new PluralResolver(lu, {
|
|
1820
|
-
prepend: this.options.pluralSeparator
|
|
1821
|
-
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1807
|
+
prepend: this.options.pluralSeparator
|
|
1822
1808
|
});
|
|
1823
|
-
|
|
1824
|
-
if (usingLegacyFormatFunction) {
|
|
1825
|
-
this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`);
|
|
1826
|
-
}
|
|
1827
|
-
if (formatter && (!this.options.interpolation.format || this.options.interpolation.format === defOpts.interpolation.format)) {
|
|
1809
|
+
if (formatter) {
|
|
1828
1810
|
s.formatter = createClassOnDemand(formatter);
|
|
1829
1811
|
if (s.formatter.init) s.formatter.init(s, this.options);
|
|
1830
1812
|
this.options.interpolation.format = s.formatter.format.bind(s.formatter);
|
|
@@ -1884,7 +1866,7 @@ class I18n extends EventEmitter {
|
|
|
1884
1866
|
deferred.resolve(t);
|
|
1885
1867
|
callback(err, t);
|
|
1886
1868
|
};
|
|
1887
|
-
if (this.languages && !this.isInitialized) return finish(null, this.t.bind(this));
|
|
1869
|
+
if ((this.languages || this.isLanguageChangingTo) && !this.isInitialized) return finish(null, this.t.bind(this));
|
|
1888
1870
|
this.changeLanguage(this.options.lng, finish);
|
|
1889
1871
|
};
|
|
1890
1872
|
if (this.options.resources || !this.options.initAsync) {
|
|
@@ -1907,7 +1889,7 @@ class I18n extends EventEmitter {
|
|
|
1907
1889
|
const lngs = this.services.languageUtils.toResolveHierarchy(lng);
|
|
1908
1890
|
lngs.forEach(l => {
|
|
1909
1891
|
if (l === 'cimode') return;
|
|
1910
|
-
if (toLoad.
|
|
1892
|
+
if (!toLoad.includes(l)) toLoad.push(l);
|
|
1911
1893
|
});
|
|
1912
1894
|
};
|
|
1913
1895
|
if (!usedLng) {
|
|
@@ -1972,16 +1954,16 @@ class I18n extends EventEmitter {
|
|
|
1972
1954
|
}
|
|
1973
1955
|
setResolvedLanguage(l) {
|
|
1974
1956
|
if (!l || !this.languages) return;
|
|
1975
|
-
if (['cimode', 'dev'].
|
|
1957
|
+
if (['cimode', 'dev'].includes(l)) return;
|
|
1976
1958
|
for (let li = 0; li < this.languages.length; li++) {
|
|
1977
1959
|
const lngInLngs = this.languages[li];
|
|
1978
|
-
if (['cimode', 'dev'].
|
|
1960
|
+
if (['cimode', 'dev'].includes(lngInLngs)) continue;
|
|
1979
1961
|
if (this.store.hasLanguageSomeTranslations(lngInLngs)) {
|
|
1980
1962
|
this.resolvedLanguage = lngInLngs;
|
|
1981
1963
|
break;
|
|
1982
1964
|
}
|
|
1983
1965
|
}
|
|
1984
|
-
if (!this.resolvedLanguage && this.languages.
|
|
1966
|
+
if (!this.resolvedLanguage && !this.languages.includes(l) && this.store.hasLanguageSomeTranslations(l)) {
|
|
1985
1967
|
this.resolvedLanguage = l;
|
|
1986
1968
|
this.languages.unshift(l);
|
|
1987
1969
|
}
|
|
@@ -2123,7 +2105,7 @@ class I18n extends EventEmitter {
|
|
|
2123
2105
|
}
|
|
2124
2106
|
if (isString(ns)) ns = [ns];
|
|
2125
2107
|
ns.forEach(n => {
|
|
2126
|
-
if (this.options.ns.
|
|
2108
|
+
if (!this.options.ns.includes(n)) this.options.ns.push(n);
|
|
2127
2109
|
});
|
|
2128
2110
|
this.loadResources(err => {
|
|
2129
2111
|
deferred.resolve();
|
|
@@ -2135,7 +2117,7 @@ class I18n extends EventEmitter {
|
|
|
2135
2117
|
const deferred = defer();
|
|
2136
2118
|
if (isString(lngs)) lngs = [lngs];
|
|
2137
2119
|
const preloaded = this.options.preload || [];
|
|
2138
|
-
const newLngs = lngs.filter(lng => preloaded.
|
|
2120
|
+
const newLngs = lngs.filter(lng => !preloaded.includes(lng) && this.services.languageUtils.isSupportedCode(lng));
|
|
2139
2121
|
if (!newLngs.length) {
|
|
2140
2122
|
if (callback) callback();
|
|
2141
2123
|
return Promise.resolve();
|
|
@@ -2160,7 +2142,7 @@ class I18n extends EventEmitter {
|
|
|
2160
2142
|
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'];
|
|
2161
2143
|
const languageUtils = this.services?.languageUtils || new LanguageUtil(get());
|
|
2162
2144
|
if (lng.toLowerCase().indexOf('-latn') > 1) return 'ltr';
|
|
2163
|
-
return rtlLngs.
|
|
2145
|
+
return rtlLngs.includes(languageUtils.getLanguagePartFromCode(lng)) || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';
|
|
2164
2146
|
}
|
|
2165
2147
|
static createInstance(options = {}, callback) {
|
|
2166
2148
|
const instance = new I18n(options, callback);
|
|
@@ -2267,7 +2249,6 @@ function i18n(getElement, resources) {
|
|
|
2267
2249
|
resources,
|
|
2268
2250
|
defaultNS: element.tagName.toLowerCase(),
|
|
2269
2251
|
interpolation: { escapeValue: false },
|
|
2270
|
-
showSupportNotice: false,
|
|
2271
2252
|
});
|
|
2272
2253
|
let detectedLanguage = false;
|
|
2273
2254
|
return (key, variables) => {
|