slickgrid-react 5.14.1 → 9.0.2
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/LICENSE +1 -1
- package/README.md +12 -42
- package/dist/{types/components → components}/slickgrid-react.d.ts +26 -22
- package/dist/{esm/components → components}/slickgrid-react.js +367 -327
- package/dist/components/slickgrid-react.js.map +1 -0
- package/dist/{types/components → components}/slickgridReactProps.d.ts +19 -19
- package/dist/components/slickgridReactProps.js.map +1 -0
- package/dist/{types/constants.d.ts → constants.d.ts} +0 -1
- package/dist/constants.js +89 -0
- package/dist/constants.js.map +1 -0
- package/dist/contexts/i18nextContext.d.ts +5 -0
- package/dist/contexts/i18nextContext.js +5 -0
- package/dist/contexts/i18nextContext.js.map +1 -0
- package/dist/{types/extensions → extensions}/slickRowDetailView.d.ts +3 -4
- package/dist/{esm/extensions → extensions}/slickRowDetailView.js +35 -43
- package/dist/extensions/slickRowDetailView.js.map +1 -0
- package/dist/{types/global-grid-options.d.ts → global-grid-options.d.ts} +1 -2
- package/dist/{esm/global-grid-options.js → global-grid-options.js} +19 -19
- package/dist/global-grid-options.js.map +1 -0
- package/dist/i18n/en/translation.json +109 -0
- package/dist/i18n/fr/translation.json +110 -0
- package/dist/{types/index.d.ts → index.d.ts} +6 -6
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/{types/models → models}/gridOption.interface.d.ts +3 -4
- package/dist/models/gridOption.interface.js.map +1 -0
- package/dist/models/i18next.interface.d.ts +27 -0
- package/dist/models/i18next.interface.js +2 -0
- package/dist/models/i18next.interface.js.map +1 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js.map +1 -0
- package/dist/{types/models → models}/reactComponentOutput.interface.d.ts +0 -1
- package/dist/models/reactComponentOutput.interface.js.map +1 -0
- package/dist/{types/models → models}/rowDetailView.interface.d.ts +1 -2
- package/dist/models/rowDetailView.interface.js.map +1 -0
- package/dist/{types/models → models}/slickgridReactInstance.interface.d.ts +0 -3
- package/dist/models/slickgridReactInstance.interface.js.map +1 -0
- package/dist/{types/models → models}/viewModelBindableData.interface.d.ts +1 -2
- package/dist/models/viewModelBindableData.interface.js.map +1 -0
- package/dist/{types/models → models}/viewModelBindableInputData.interface.d.ts +1 -2
- package/dist/models/viewModelBindableInputData.interface.js.map +1 -0
- package/dist/{types/services → services}/container.service.d.ts +0 -1
- package/dist/{esm/services → services}/container.service.js +1 -3
- package/dist/services/container.service.js.map +1 -0
- package/dist/services/index.d.ts +3 -0
- package/dist/services/index.js +4 -0
- package/dist/services/index.js.map +1 -0
- package/dist/{types/services → services}/reactUtils.d.ts +0 -1
- package/dist/{esm/services → services}/reactUtils.js +4 -5
- package/dist/services/reactUtils.js.map +1 -0
- package/dist/{types/services → services}/singletons.d.ts +1 -2
- package/dist/{esm/services → services}/singletons.js +1 -1
- package/dist/services/singletons.js.map +1 -0
- package/dist/{types/services/translater.service.d.ts → services/translaterI18Next.service.d.ts} +5 -3
- package/dist/{esm/services/translater.service.js → services/translaterI18Next.service.js} +9 -8
- package/dist/services/translaterI18Next.service.js.map +1 -0
- package/dist/{types/services → services}/utilities.d.ts +0 -1
- package/dist/{esm/services → services}/utilities.js +1 -1
- package/dist/services/utilities.js.map +1 -0
- package/dist/slickgrid-config.d.ts +5 -0
- package/dist/slickgrid-config.js +8 -0
- package/dist/slickgrid-config.js.map +1 -0
- package/package.json +22 -106
- package/src/assets/locales/en/translation.json +109 -0
- package/src/assets/locales/fr/translation.json +110 -0
- package/src/{slickgrid-react/components → components}/slickgrid-react.tsx +365 -240
- package/src/{slickgrid-react/components → components}/slickgridReactProps.ts +72 -73
- package/src/{slickgrid-react/constants.ts → constants.ts} +11 -5
- package/src/contexts/i18nextContext.ts +7 -0
- package/src/{slickgrid-react/extensions → extensions}/slickRowDetailView.ts +38 -36
- package/src/{slickgrid-react/global-grid-options.ts → global-grid-options.ts} +18 -16
- package/src/index.ts +21 -0
- package/src/{slickgrid-react/models → models}/gridOption.interface.ts +7 -4
- package/src/models/i18next.interface.ts +34 -0
- package/src/models/index.ts +7 -0
- package/src/{slickgrid-react/models → models}/rowDetailView.interface.ts +1 -1
- package/src/{slickgrid-react/models → models}/slickgridReactInstance.interface.ts +1 -4
- package/src/{slickgrid-react/models → models}/viewModelBindableData.interface.ts +1 -1
- package/src/{slickgrid-react/models → models}/viewModelBindableInputData.interface.ts +1 -1
- package/src/services/index.ts +3 -0
- package/src/{slickgrid-react/services → services}/reactUtils.ts +14 -5
- package/src/{slickgrid-react/services → services}/singletons.ts +2 -1
- package/src/{slickgrid-react/services/translater.service.ts → services/translaterI18Next.service.ts} +12 -6
- package/src/slickgrid-config.ts +10 -0
- package/src/vite-env.d.ts +1 -0
- package/dist/cjs/components/slickgrid-react.js +0 -1375
- package/dist/cjs/components/slickgrid-react.js.map +0 -1
- package/dist/cjs/components/slickgridReactProps.js +0 -3
- package/dist/cjs/components/slickgridReactProps.js.map +0 -1
- package/dist/cjs/constants.js +0 -92
- package/dist/cjs/constants.js.map +0 -1
- package/dist/cjs/extensions/slickRowDetailView.js +0 -345
- package/dist/cjs/extensions/slickRowDetailView.js.map +0 -1
- package/dist/cjs/global-grid-options.js +0 -281
- package/dist/cjs/global-grid-options.js.map +0 -1
- package/dist/cjs/index.js +0 -28
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/models/gridOption.interface.js +0 -3
- package/dist/cjs/models/gridOption.interface.js.map +0 -1
- package/dist/cjs/models/index.js +0 -3
- package/dist/cjs/models/index.js.map +0 -1
- package/dist/cjs/models/reactComponentOutput.interface.js +0 -3
- package/dist/cjs/models/reactComponentOutput.interface.js.map +0 -1
- package/dist/cjs/models/rowDetailView.interface.js +0 -3
- package/dist/cjs/models/rowDetailView.interface.js.map +0 -1
- package/dist/cjs/models/slickgridReactInstance.interface.js +0 -3
- package/dist/cjs/models/slickgridReactInstance.interface.js.map +0 -1
- package/dist/cjs/models/viewModelBindableData.interface.js +0 -3
- package/dist/cjs/models/viewModelBindableData.interface.js.map +0 -1
- package/dist/cjs/models/viewModelBindableInputData.interface.js +0 -3
- package/dist/cjs/models/viewModelBindableInputData.interface.js.map +0 -1
- package/dist/cjs/services/container.service.js +0 -16
- package/dist/cjs/services/container.service.js.map +0 -1
- package/dist/cjs/services/index.js +0 -20
- package/dist/cjs/services/index.js.map +0 -1
- package/dist/cjs/services/reactUtils.js +0 -26
- package/dist/cjs/services/reactUtils.js.map +0 -1
- package/dist/cjs/services/singletons.js +0 -10
- package/dist/cjs/services/singletons.js.map +0 -1
- package/dist/cjs/services/translater.service.js +0 -41
- package/dist/cjs/services/translater.service.js.map +0 -1
- package/dist/cjs/services/utilities.js +0 -20
- package/dist/cjs/services/utilities.js.map +0 -1
- package/dist/cjs/slickgrid-config.js +0 -11
- package/dist/cjs/slickgrid-config.js.map +0 -1
- package/dist/esm/components/slickgrid-react.js.map +0 -1
- package/dist/esm/components/slickgridReactProps.js.map +0 -1
- package/dist/esm/constants.js +0 -88
- package/dist/esm/constants.js.map +0 -1
- package/dist/esm/extensions/slickRowDetailView.js.map +0 -1
- package/dist/esm/global-grid-options.js.map +0 -1
- package/dist/esm/index.js +0 -8
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/models/gridOption.interface.js.map +0 -1
- package/dist/esm/models/index.js.map +0 -1
- package/dist/esm/models/reactComponentOutput.interface.js.map +0 -1
- package/dist/esm/models/rowDetailView.interface.js.map +0 -1
- package/dist/esm/models/slickgridReactInstance.interface.js.map +0 -1
- package/dist/esm/models/viewModelBindableData.interface.js.map +0 -1
- package/dist/esm/models/viewModelBindableInputData.interface.js.map +0 -1
- package/dist/esm/services/container.service.js.map +0 -1
- package/dist/esm/services/index.js +0 -4
- package/dist/esm/services/index.js.map +0 -1
- package/dist/esm/services/reactUtils.js.map +0 -1
- package/dist/esm/services/singletons.js.map +0 -1
- package/dist/esm/services/translater.service.js.map +0 -1
- package/dist/esm/services/utilities.js.map +0 -1
- package/dist/esm/slickgrid-config.js +0 -7
- package/dist/esm/slickgrid-config.js.map +0 -1
- package/dist/types/components/slickgrid-react.d.ts.map +0 -1
- package/dist/types/components/slickgridReactProps.d.ts.map +0 -1
- package/dist/types/constants.d.ts.map +0 -1
- package/dist/types/extensions/slickRowDetailView.d.ts.map +0 -1
- package/dist/types/global-grid-options.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/models/gridOption.interface.d.ts.map +0 -1
- package/dist/types/models/index.d.ts +0 -7
- package/dist/types/models/index.d.ts.map +0 -1
- package/dist/types/models/reactComponentOutput.interface.d.ts.map +0 -1
- package/dist/types/models/rowDetailView.interface.d.ts.map +0 -1
- package/dist/types/models/slickgridReactInstance.interface.d.ts.map +0 -1
- package/dist/types/models/viewModelBindableData.interface.d.ts.map +0 -1
- package/dist/types/models/viewModelBindableInputData.interface.d.ts.map +0 -1
- package/dist/types/services/container.service.d.ts.map +0 -1
- package/dist/types/services/index.d.ts +0 -4
- package/dist/types/services/index.d.ts.map +0 -1
- package/dist/types/services/reactUtils.d.ts.map +0 -1
- package/dist/types/services/singletons.d.ts.map +0 -1
- package/dist/types/services/translater.service.d.ts.map +0 -1
- package/dist/types/services/utilities.d.ts.map +0 -1
- package/dist/types/slickgrid-config.d.ts +0 -6
- package/dist/types/slickgrid-config.d.ts.map +0 -1
- package/src/slickgrid-react/index.ts +0 -29
- package/src/slickgrid-react/models/index.ts +0 -6
- package/src/slickgrid-react/services/index.ts +0 -3
- package/src/slickgrid-react/slickgrid-config.ts +0 -10
- /package/dist/{esm/components → components}/slickgridReactProps.js +0 -0
- /package/dist/{esm/models → models}/gridOption.interface.js +0 -0
- /package/dist/{esm/models → models}/index.js +0 -0
- /package/dist/{esm/models → models}/reactComponentOutput.interface.js +0 -0
- /package/dist/{esm/models → models}/rowDetailView.interface.js +0 -0
- /package/dist/{esm/models → models}/slickgridReactInstance.interface.js +0 -0
- /package/dist/{esm/models → models}/viewModelBindableData.interface.js +0 -0
- /package/dist/{esm/models → models}/viewModelBindableInputData.interface.js +0 -0
- /package/src/{slickgrid-react/models → models}/reactComponentOutput.interface.ts +0 -0
- /package/src/{slickgrid-react/services → services}/container.service.ts +0 -0
- /package/src/{slickgrid-react/services → services}/utilities.ts +0 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ALL_SELECTED": "Tout sélectionnés",
|
|
3
|
+
"ALL_X_RECORDS_SELECTED": "Sur tous les {{x}} éléments",
|
|
4
|
+
"APPLY_MASS_UPDATE": "Mettre à jour en masse",
|
|
5
|
+
"APPLY_TO_SELECTION": "Mettre à jour la sélection",
|
|
6
|
+
"CANCEL": "Annuler",
|
|
7
|
+
"CLEAR_ALL_FILTERS": "Supprimer tous les filtres",
|
|
8
|
+
"CLEAR_ALL_GROUPING": "Supprimer tous les groupes",
|
|
9
|
+
"CLEAR_ALL_SORTING": "Supprimer tous les tris",
|
|
10
|
+
"CLEAR_PINNING": "Dégeler les colonnes/rangées",
|
|
11
|
+
"CLONE": "Cloner",
|
|
12
|
+
"COLLAPSE_ALL_GROUPS": "Réduire tous les groupes",
|
|
13
|
+
"COLUMNS": "Colonnes",
|
|
14
|
+
"COLUMN_RESIZE_BY_CONTENT": "Redimensionner par contenu",
|
|
15
|
+
"COMMANDS": "Commandes",
|
|
16
|
+
"CONTAINS": "Contient",
|
|
17
|
+
"COPY": "Copier",
|
|
18
|
+
"EMPTY_DATA_WARNING_MESSAGE": "Aucune donnée à afficher.",
|
|
19
|
+
"ENDS_WITH": "Se termine par",
|
|
20
|
+
"EQUALS": "Égale",
|
|
21
|
+
"EQUAL_TO": "Égal à",
|
|
22
|
+
"EXPAND_ALL_GROUPS": "Étendre tous les groupes",
|
|
23
|
+
"EXPORT_TO_CSV": "Exporter en format CSV",
|
|
24
|
+
"EXPORT_TO_EXCEL": "Exporter vers Excel",
|
|
25
|
+
"EXPORT_TO_TAB_DELIMITED": "Exporter en format texte (délimité par tabulation)",
|
|
26
|
+
"EXPORT_TO_TEXT_FORMAT": "Exporter en format texte",
|
|
27
|
+
"FILTER_SHORTCUTS": "Raccourcis de filtre",
|
|
28
|
+
"FROM_TO_OF_TOTAL_ITEMS": "{{from}}-{{to}} de {{totalItems}} éléments",
|
|
29
|
+
"FORCE_FIT_COLUMNS": "Ajustement forcé des colonnes",
|
|
30
|
+
"FREEZE_COLUMNS": "Geler les colonnes",
|
|
31
|
+
"GREATER_THAN": "Plus grand que",
|
|
32
|
+
"GREATER_THAN_OR_EQUAL_TO": "Plus grand ou égal à",
|
|
33
|
+
"GROUP_BY": "Grouper par",
|
|
34
|
+
"HIDE_COLUMN": "Cacher la colonne",
|
|
35
|
+
"IN_COLLECTION_SEPERATED_BY_COMMA": "Recherche incluant certain éléments d'une collection, doit être séparé par une virgule (a,b)",
|
|
36
|
+
"INVALID_FLOAT": "Le nombre doit être valide et avoir un maximum de {{maxDecimal}} décimales.",
|
|
37
|
+
"ITEMS": "éléments",
|
|
38
|
+
"ITEMS_PER_PAGE": "éléments par page",
|
|
39
|
+
"ITEMS_SELECTED": "éléments sélectionnés",
|
|
40
|
+
"LAST_UPDATE": "Dernière mise à jour",
|
|
41
|
+
"LESS_THAN": "Plus petit que",
|
|
42
|
+
"LESS_THAN_OR_EQUAL_TO": "Plus petit ou égal à",
|
|
43
|
+
"LOADING": "Chargement...",
|
|
44
|
+
"NO_ELEMENTS_FOUND": "Aucun élément trouvé",
|
|
45
|
+
"NOT_CONTAINS": "Ne contient pas",
|
|
46
|
+
"NOT_EQUAL_TO": "Non égal à",
|
|
47
|
+
"NOT_IN_COLLECTION_SEPERATED_BY_COMMA": "Recherche excluant certain éléments d'une collection, doit être séparé par une virgule (a,b)",
|
|
48
|
+
"OF": "de",
|
|
49
|
+
"OK": "Terminé",
|
|
50
|
+
"PAGE": "Page",
|
|
51
|
+
"PAGE_X_OF_Y": "page {{x}} de {{y}}",
|
|
52
|
+
"REFRESH_DATASET": "Rafraîchir les données",
|
|
53
|
+
"REMOVE_FILTER": "Supprimer le filtre",
|
|
54
|
+
"REMOVE_SORT": "Supprimer le tri",
|
|
55
|
+
"RESET_INPUT_VALUE": "Réinitialiser la valeur",
|
|
56
|
+
"RESET_FORM": "Réinitialiser le formulaire",
|
|
57
|
+
"SAVE": "Sauvegarder",
|
|
58
|
+
"SELECT_ALL": "Sélectionner tout",
|
|
59
|
+
"SORT_ASCENDING": "Trier par ordre croissant",
|
|
60
|
+
"SORT_DESCENDING": "Trier par ordre décroissant",
|
|
61
|
+
"STARTS_WITH": "Commence par",
|
|
62
|
+
"SYNCHRONOUS_RESIZE": "Redimension synchrone",
|
|
63
|
+
"TOGGLE_FILTER_ROW": "Basculer la ligne des filtres",
|
|
64
|
+
"TOGGLE_PRE_HEADER_ROW": "Basculer la ligne de pré-en-tête",
|
|
65
|
+
"X_OF_Y_SELECTED": "# de % sélectionnés",
|
|
66
|
+
"X_OF_Y_MASS_SELECTED": "{{x}} de {{y}} sélectionnés",
|
|
67
|
+
"BILLING": {
|
|
68
|
+
"ADDRESS": {
|
|
69
|
+
"STREET": "Adresse de facturation",
|
|
70
|
+
"ZIP": "Code zip de facturation"
|
|
71
|
+
},
|
|
72
|
+
"INFORMATION": "Information de Facturation"
|
|
73
|
+
},
|
|
74
|
+
"BLANK_VALUES": "Valeurs nulles",
|
|
75
|
+
"NON_BLANK_VALUES": "Valeurs non-nulles",
|
|
76
|
+
"DURATION": "Durée",
|
|
77
|
+
"COMPANY": "Compagnie",
|
|
78
|
+
"COMPLETED": "Terminé",
|
|
79
|
+
"CHANGE_COMPLETED_FLAG": "Changer l'indicateur terminé",
|
|
80
|
+
"CHANGE_PRIORITY": "Changer la priorité",
|
|
81
|
+
"CUSTOM_COMMANDS": "Commandes Personnalisées",
|
|
82
|
+
"CUSTOMER_INFORMATION": "Information Client",
|
|
83
|
+
"DELETE_ROW": "Supprimer la ligne",
|
|
84
|
+
"DISABLED_COMMAND": "Commande désactivée",
|
|
85
|
+
"FALSE": "Faux",
|
|
86
|
+
"FEMALE": "Féminin",
|
|
87
|
+
"FINISH": "Fin",
|
|
88
|
+
"FUTURE": "Future",
|
|
89
|
+
"GENDER": "Sexe",
|
|
90
|
+
"HELP": "Aide",
|
|
91
|
+
"HIGH": "Haut",
|
|
92
|
+
"LOW": "Bas",
|
|
93
|
+
"MEDIUM": "Moyen",
|
|
94
|
+
"MALE": "Masculin",
|
|
95
|
+
"NAME": "Nom",
|
|
96
|
+
"NEXT_20_DAYS": "20 prochain jours",
|
|
97
|
+
"NONE": "Aucun",
|
|
98
|
+
"PAST": "Passé",
|
|
99
|
+
"PERCENT_COMPLETE": "% Achevée",
|
|
100
|
+
"PRIORITY": "Priorité",
|
|
101
|
+
"START": "Début",
|
|
102
|
+
"TASK_X": "Tâche {{x}}",
|
|
103
|
+
"TITLE": "Titre",
|
|
104
|
+
"TITLE.NAME": "Nom du Titre",
|
|
105
|
+
"TODAY": "Aujourd'hui",
|
|
106
|
+
"TRUE": "Vrai",
|
|
107
|
+
"X_DAY_PLURAL": "{{x}} journée{{plural}}",
|
|
108
|
+
"RBE_BTN_UPDATE": "Mettre à jour la ligne actuelle",
|
|
109
|
+
"RBE_BTN_CANCEL": "Annuler la ligne actuelle"
|
|
110
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import 'regenerator-runtime/runtime.js';
|
|
2
2
|
export * from '@slickgrid-universal/common';
|
|
3
|
-
import { SlickgridReact } from './components/slickgrid-react';
|
|
4
|
-
import { SlickRowDetailView } from './extensions/slickRowDetailView';
|
|
5
|
-
import type { SlickgridConfig } from './slickgrid-config';
|
|
6
|
-
import type { SlickgridReactInstance, SlickgridReactComponentOutput, RowDetailView, GridOption } from './models/index';
|
|
7
|
-
export {
|
|
3
|
+
import { SlickgridReact } from './components/slickgrid-react.js';
|
|
4
|
+
import { SlickRowDetailView } from './extensions/slickRowDetailView.js';
|
|
5
|
+
import type { SlickgridConfig } from './slickgrid-config.js';
|
|
6
|
+
import type { SlickgridReactInstance, SlickgridReactComponentOutput, RowDetailView, GridOption } from './models/index.js';
|
|
7
|
+
export { TranslaterI18NextService, disposeAllSubscriptions } from './services/index.js';
|
|
8
|
+
export { I18nextContext, I18nextProvider } from './contexts/i18nextContext.js';
|
|
8
9
|
export { type SlickgridReactInstance, type SlickgridReactComponentOutput, type GridOption, type RowDetailView, SlickgridReact, SlickgridConfig, SlickRowDetailView, };
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import 'regenerator-runtime/runtime.js';
|
|
2
|
+
export * from '@slickgrid-universal/common';
|
|
3
|
+
import { SlickgridReact } from './components/slickgrid-react.js';
|
|
4
|
+
import { SlickRowDetailView } from './extensions/slickRowDetailView.js';
|
|
5
|
+
// expose all public classes & contexts
|
|
6
|
+
export { TranslaterI18NextService, disposeAllSubscriptions } from './services/index.js';
|
|
7
|
+
export { I18nextContext, I18nextProvider } from './contexts/i18nextContext.js';
|
|
8
|
+
export { SlickgridReact, SlickRowDetailView, };
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAIxE,uCAAuC;AACvC,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/E,OAAO,EAKL,cAAc,EAEd,kBAAkB,GACnB,CAAC","sourcesContent":["import 'regenerator-runtime/runtime.js';\nexport * from '@slickgrid-universal/common';\n\nimport { SlickgridReact } from './components/slickgrid-react.js';\nimport { SlickRowDetailView } from './extensions/slickRowDetailView.js';\nimport type { SlickgridConfig } from './slickgrid-config.js';\nimport type { SlickgridReactInstance, SlickgridReactComponentOutput, RowDetailView, GridOption } from './models/index.js';\n\n// expose all public classes & contexts\nexport { TranslaterI18NextService, disposeAllSubscriptions } from './services/index.js';\nexport { I18nextContext, I18nextProvider } from './contexts/i18nextContext.js';\n\nexport {\n type SlickgridReactInstance,\n type SlickgridReactComponentOutput,\n type GridOption,\n type RowDetailView,\n SlickgridReact,\n SlickgridConfig,\n SlickRowDetailView,\n};\n"]}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { BasePaginationComponent, BasePaginationModel, GridOption as UniversalGridOption } from '@slickgrid-universal/common';
|
|
2
|
-
import type * as i18next from 'i18next';
|
|
3
2
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
-
import type {
|
|
3
|
+
import type { I18Next } from './i18next.interface.js';
|
|
4
|
+
import type { RowDetailView } from './rowDetailView.interface.js';
|
|
5
5
|
export interface GridOption extends UniversalGridOption {
|
|
6
6
|
/** External Custom Pagination Component that can be provided by the user */
|
|
7
7
|
customPaginationComponent?: typeof BasePaginationComponent | (() => BasePaginationModel) | ForwardRefExoticComponent<any & RefAttributes<any>>;
|
|
8
8
|
/** I18N translation service instance */
|
|
9
|
-
i18n?:
|
|
9
|
+
i18n?: I18Next;
|
|
10
10
|
/** Row Detail View Plugin options & events (columnId, cssClass, toolTip, width) */
|
|
11
11
|
rowDetailView?: RowDetailView;
|
|
12
12
|
}
|
|
13
|
-
//# sourceMappingURL=gridOption.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gridOption.interface.js","sourceRoot":"","sources":["../../src/models/gridOption.interface.ts"],"names":[],"mappings":"","sourcesContent":["import type { BasePaginationComponent, BasePaginationModel, GridOption as UniversalGridOption } from '@slickgrid-universal/common';\nimport type { ForwardRefExoticComponent, RefAttributes } from 'react';\n\nimport type { I18Next } from './i18next.interface.js';\nimport type { RowDetailView } from './rowDetailView.interface.js';\n\nexport interface GridOption extends UniversalGridOption {\n /** External Custom Pagination Component that can be provided by the user */\n customPaginationComponent?:\n | typeof BasePaginationComponent\n | (() => BasePaginationModel)\n | ForwardRefExoticComponent<any & RefAttributes<any>>;\n\n /** I18N translation service instance */\n i18n?: I18Next;\n\n /** Row Detail View Plugin options & events (columnId, cssClass, toolTip, width) */\n rowDetailView?: RowDetailView;\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type Callback = (error: any, t: Function) => void;
|
|
2
|
+
export interface I18Next {
|
|
3
|
+
/**
|
|
4
|
+
* Is set to the current detected or set language.
|
|
5
|
+
* If you need the primary used language depending on your configuration (supportedLngs, load) you will prefer using i18next.languages[0].
|
|
6
|
+
*/
|
|
7
|
+
language: string;
|
|
8
|
+
/**
|
|
9
|
+
* Changes the language. The callback will be called as soon translations were loaded or an error occurs while loading.
|
|
10
|
+
* HINT: For easy testing - setting lng to 'cimode' will set t function to always return the key.
|
|
11
|
+
*/
|
|
12
|
+
changeLanguage(lng?: string, callback?: Callback): Promise<Function>;
|
|
13
|
+
/**
|
|
14
|
+
* Gets fired when changeLanguage got called.
|
|
15
|
+
*/
|
|
16
|
+
on(event: 'languageChanged', callback: (lng: string) => void): void;
|
|
17
|
+
/**
|
|
18
|
+
* Event listener
|
|
19
|
+
*/
|
|
20
|
+
on(event: string, listener: (...args: any[]) => void): void;
|
|
21
|
+
/**
|
|
22
|
+
* Remove event listener
|
|
23
|
+
* removes all callback when callback not specified
|
|
24
|
+
*/
|
|
25
|
+
off(event: string, listener?: (...args: any[]) => void): void;
|
|
26
|
+
t(key: string, options?: any): string;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18next.interface.js","sourceRoot":"","sources":["../../src/models/i18next.interface.ts"],"names":[],"mappings":"","sourcesContent":["export type Callback = (error: any, t: Function) => void;\n\nexport interface I18Next {\n /**\n * Is set to the current detected or set language.\n * If you need the primary used language depending on your configuration (supportedLngs, load) you will prefer using i18next.languages[0].\n */\n language: string;\n\n /**\n * Changes the language. The callback will be called as soon translations were loaded or an error occurs while loading.\n * HINT: For easy testing - setting lng to 'cimode' will set t function to always return the key.\n */\n changeLanguage(lng?: string, callback?: Callback): Promise<Function>;\n\n /**\n * Gets fired when changeLanguage got called.\n */\n on(event: 'languageChanged', callback: (lng: string) => void): void;\n\n /**\n * Event listener\n */\n on(event: string, listener: (...args: any[]) => void): void;\n\n /**\n * Remove event listener\n * removes all callback when callback not specified\n */\n off(event: string, listener?: (...args: any[]) => void): void;\n\n // Expose parameterized t in the i18next interface hierarchy\n t(key: string, options?: any): string;\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type * from './gridOption.interface.js';
|
|
2
|
+
export type * from './i18next.interface.js';
|
|
3
|
+
export type * from './reactComponentOutput.interface.js';
|
|
4
|
+
export type * from './rowDetailView.interface.js';
|
|
5
|
+
export type * from './slickgridReactInstance.interface.js';
|
|
6
|
+
export type * from './viewModelBindableData.interface.js';
|
|
7
|
+
export type * from './viewModelBindableInputData.interface.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"","sourcesContent":["export type * from './gridOption.interface.js';\nexport type * from './i18next.interface.js';\nexport type * from './reactComponentOutput.interface.js';\nexport type * from './rowDetailView.interface.js';\nexport type * from './slickgridReactInstance.interface.js';\nexport type * from './viewModelBindableData.interface.js';\nexport type * from './viewModelBindableInputData.interface.js';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactComponentOutput.interface.js","sourceRoot":"","sources":["../../src/models/reactComponentOutput.interface.ts"],"names":[],"mappings":"","sourcesContent":["/* eslint-disable @typescript-eslint/consistent-type-imports */\nimport React, { type ReactInstance } from 'react';\n\nexport interface SlickgridReactComponentOutput {\n componentInstance?: ReactInstance;\n componentElement?: React.CElement<any, React.Component<any, any, any>>;\n domElement?: Element | Text | null;\n}\n"]}
|
|
@@ -4,10 +4,9 @@ export interface RowDetailView extends UniversalRowDetailView {
|
|
|
4
4
|
* Optionally pass your Parent Component reference to your Child Component (row detail component).
|
|
5
5
|
* note:: If anyone finds a better way of passing the parent to the row detail extension, please reach out and/or create a PR
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
parentRef?: any;
|
|
8
8
|
/** View Model of the preload template which shows after opening row detail & before row detail data shows up */
|
|
9
9
|
preloadComponent?: any;
|
|
10
10
|
/** View Model template that will be loaded once the async function finishes */
|
|
11
11
|
viewComponent?: any;
|
|
12
12
|
}
|
|
13
|
-
//# sourceMappingURL=rowDetailView.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rowDetailView.interface.js","sourceRoot":"","sources":["../../src/models/rowDetailView.interface.ts"],"names":[],"mappings":"","sourcesContent":["import type { RowDetailView as UniversalRowDetailView } from '@slickgrid-universal/common';\n\nexport interface RowDetailView extends UniversalRowDetailView {\n /**\n * Optionally pass your Parent Component reference to your Child Component (row detail component).\n * note:: If anyone finds a better way of passing the parent to the row detail extension, please reach out and/or create a PR\n */\n parentRef?: any;\n\n /** View Model of the preload template which shows after opening row detail & before row detail data shows up */\n preloadComponent?: any;\n\n /** View Model template that will be loaded once the async function finishes */\n viewComponent?: any;\n}\n"]}
|
|
@@ -22,8 +22,6 @@ export interface SlickgridReactInstance {
|
|
|
22
22
|
gridEventService: GridEventService;
|
|
23
23
|
/** Grid State Service */
|
|
24
24
|
gridStateService: GridStateService;
|
|
25
|
-
/** @deprecated @use `headerGroupingService` */
|
|
26
|
-
groupingService: HeaderGroupingService;
|
|
27
25
|
/** Grouping (and colspan) Service */
|
|
28
26
|
headerGroupingService: HeaderGroupingService;
|
|
29
27
|
/** Pagination Service (allows you to programmatically go to first/last page, etc...) */
|
|
@@ -35,4 +33,3 @@ export interface SlickgridReactInstance {
|
|
|
35
33
|
/** Tree Data View Service */
|
|
36
34
|
treeDataService: TreeDataService;
|
|
37
35
|
}
|
|
38
|
-
//# sourceMappingURL=slickgridReactInstance.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slickgridReactInstance.interface.js","sourceRoot":"","sources":["../../src/models/slickgridReactInstance.interface.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n BackendService,\n ExtensionService,\n FilterService,\n GridEventService,\n GridService,\n GridStateService,\n HeaderGroupingService,\n PaginationService,\n ResizerService,\n SlickDataView,\n SlickGrid,\n SortService,\n TreeDataService,\n} from '@slickgrid-universal/common';\nimport type { EventPubSubService } from '@slickgrid-universal/event-pub-sub';\n\nexport interface SlickgridReactInstance {\n element: HTMLDivElement;\n\n /** Slick DataView object */\n dataView: SlickDataView;\n\n /** Slick Grid object */\n slickGrid: SlickGrid;\n\n // --\n // Methods\n /** Dispose of the grid and optionally empty the DOM element grid container as well */\n dispose: (emptyDomElementContainer?: boolean) => void;\n\n // --\n // Services\n\n /** Backend Service, when available */\n backendService?: BackendService;\n\n /** EventPubSub Service instance that is used internal by the lib and could be used externally to subscribe to Slickgrid-React events */\n eventPubSubService?: EventPubSubService;\n\n /** Extension (Plugins & Controls) Service */\n extensionService: ExtensionService;\n\n /** Filter Service */\n filterService: FilterService;\n\n /** Grid Service (grid extra functionalities) */\n gridService: GridService;\n\n /** Grid Events Service */\n gridEventService: GridEventService;\n\n /** Grid State Service */\n gridStateService: GridStateService;\n\n /** Grouping (and colspan) Service */\n headerGroupingService: HeaderGroupingService;\n\n /** Pagination Service (allows you to programmatically go to first/last page, etc...) */\n paginationService?: PaginationService;\n\n /** Resizer Service (including auto-resize) */\n resizerService: ResizerService;\n\n /** Sort Service */\n sortService: SortService;\n\n /** Tree Data View Service */\n treeDataService: TreeDataService;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewModelBindableData.interface.js","sourceRoot":"","sources":["../../src/models/viewModelBindableData.interface.ts"],"names":[],"mappings":"","sourcesContent":["import type { SlickDataView, SlickGrid } from '@slickgrid-universal/common';\n\nexport interface ViewModelBindableData {\n template: string;\n model: any;\n addon: any;\n grid: SlickGrid;\n dataView: SlickDataView;\n parentRef?: any;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewModelBindableInputData.interface.js","sourceRoot":"","sources":["../../src/models/viewModelBindableInputData.interface.ts"],"names":[],"mappings":"","sourcesContent":["import type { SlickDataView, SlickGrid } from '@slickgrid-universal/common';\n\nexport interface ViewModelBindableInputData {\n model: any;\n addon: any;\n grid: SlickGrid;\n dataView: SlickDataView;\n parentRef?: any;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container.service.js","sourceRoot":"","sources":["../../src/services/container.service.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,gBAAgB;IACV,SAAS,GAA2B,EAAE,CAAC;IAExD,GAAG,CAAU,GAAW;QACtB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAED,gBAAgB,CAAC,GAAW,EAAE,QAAa;QACzC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;IACjC,CAAC;CACF","sourcesContent":["import type { ContainerService as UniversalContainerService } from '@slickgrid-universal/common';\n\nexport class ContainerService implements UniversalContainerService {\n private readonly container: { [key: string]: any } = {};\n\n get<T = any>(key: string): T | null {\n return this.container[key];\n }\n\n registerInstance(key: string, instance: any) {\n this.container[key] = instance;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './container.service.js';\nexport * from './translaterI18Next.service.js';\nexport * from './utilities.js';\n"]}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { createRef } from 'react';
|
|
1
|
+
import React, { createRef } from 'react';
|
|
3
2
|
import { createRoot } from 'react-dom/client';
|
|
4
3
|
// these 2 functions are the same except that 1 is synch and the promise is delayed by a CPU cycle before resolving
|
|
5
4
|
export function createReactComponentDynamically(customComponent, targetElm, props, root) {
|
|
6
5
|
const compRef = createRef();
|
|
7
|
-
root
|
|
6
|
+
root ??= createRoot(targetElm);
|
|
8
7
|
root.render(React.createElement(customComponent, { ...props, ref: compRef }));
|
|
9
8
|
return { component: compRef.current, root: root };
|
|
10
9
|
}
|
|
11
10
|
export function loadReactComponentDynamically(customComponent, targetElm, props, root) {
|
|
12
|
-
return new Promise(resolve => {
|
|
11
|
+
return new Promise((resolve) => {
|
|
13
12
|
const compRef = createRef();
|
|
14
|
-
root
|
|
13
|
+
root ??= createRoot(targetElm);
|
|
15
14
|
root.render(React.createElement(customComponent, { ...props, ref: compRef }));
|
|
16
15
|
queueMicrotask(() => resolve({ component: compRef.current, root: root }));
|
|
17
16
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactUtils.js","sourceRoot":"","sources":["../../src/services/reactUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,UAAU,EAAa,MAAM,kBAAkB,CAAC;AAEzD,mHAAmH;AAEnH,MAAM,UAAU,+BAA+B,CAC7C,eAAoB,EACpB,SAAsB,EACtB,KAAW,EACX,IAAkB;IAElB,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAC5B,IAAI,KAAK,UAAU,CAAC,SAAS,CAAC,CAAC;IAC/B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,eAAe,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IAE9E,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,OAAY,EAAE,IAAI,EAAE,IAAY,EAAE,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,eAAoB,EACpB,SAAsB,EACtB,KAAW,EACX,IAAkB;IAElB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;QAC5B,IAAI,KAAK,UAAU,CAAC,SAAS,CAAC,CAAC;QAC/B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,eAAe,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;QAE9E,cAAc,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,OAAY,EAAE,IAAI,EAAE,IAAY,EAAE,CAAC,CAAC,CAAC;IACzF,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import React, { createRef } from 'react';\nimport { createRoot, type Root } from 'react-dom/client';\n\n// these 2 functions are the same except that 1 is synch and the promise is delayed by a CPU cycle before resolving\n\nexport function createReactComponentDynamically<T = any>(\n customComponent: any,\n targetElm: HTMLElement,\n props?: any,\n root?: Root | null\n): { component: T; root: Root } {\n const compRef = createRef();\n root ??= createRoot(targetElm);\n root.render(React.createElement(customComponent, { ...props, ref: compRef }));\n\n return { component: compRef.current as T, root: root as Root };\n}\n\nexport function loadReactComponentDynamically<T = any>(\n customComponent: any,\n targetElm: HTMLElement,\n props?: any,\n root?: Root | null\n): Promise<{ component: T; root: Root }> {\n return new Promise((resolve) => {\n const compRef = createRef();\n root ??= createRoot(targetElm);\n root.render(React.createElement(customComponent, { ...props, ref: compRef }));\n\n queueMicrotask(() => resolve({ component: compRef.current as T, root: root as Root }));\n });\n}\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SharedService } from '@slickgrid-universal/common';
|
|
2
2
|
import { EventPubSubService } from '@slickgrid-universal/event-pub-sub';
|
|
3
|
-
import { ContainerService } from './container.service';
|
|
3
|
+
import { ContainerService } from './container.service.js';
|
|
4
4
|
export declare const GlobalEventPubSubService: EventPubSubService;
|
|
5
5
|
export declare const GlobalEventSharedService: SharedService;
|
|
6
6
|
export declare const GlobalContainerService: ContainerService;
|
|
7
|
-
//# sourceMappingURL=singletons.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SharedService } from '@slickgrid-universal/common';
|
|
2
2
|
import { EventPubSubService } from '@slickgrid-universal/event-pub-sub';
|
|
3
|
-
import { ContainerService } from './container.service';
|
|
3
|
+
import { ContainerService } from './container.service.js';
|
|
4
4
|
export const GlobalEventPubSubService = new EventPubSubService();
|
|
5
5
|
export const GlobalEventSharedService = new SharedService();
|
|
6
6
|
export const GlobalContainerService = new ContainerService();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"singletons.js","sourceRoot":"","sources":["../../src/services/singletons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,kBAAkB,EAAE,CAAC;AACjE,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,aAAa,EAAE,CAAC;AAC5D,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,gBAAgB,EAAE,CAAC","sourcesContent":["import { SharedService } from '@slickgrid-universal/common';\nimport { EventPubSubService } from '@slickgrid-universal/event-pub-sub';\n\nimport { ContainerService } from './container.service.js';\n\nexport const GlobalEventPubSubService = new EventPubSubService();\nexport const GlobalEventSharedService = new SharedService();\nexport const GlobalContainerService = new ContainerService();\n"]}
|
package/dist/{types/services/translater.service.d.ts → services/translaterI18Next.service.d.ts}
RENAMED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { TranslaterService as UniversalTranslateService } from '@slickgrid-universal/common';
|
|
2
|
+
import type { I18Next } from '../models/i18next.interface.js';
|
|
2
3
|
/**
|
|
3
4
|
* This is a Translate Service Wrapper for Slickgrid-Universal monorepo lib to work properly,
|
|
4
5
|
* it must implement Slickgrid-Universal TranslaterService interface to work properly
|
|
5
6
|
*/
|
|
6
|
-
export declare class
|
|
7
|
-
|
|
7
|
+
export declare class TranslaterI18NextService implements UniversalTranslateService {
|
|
8
|
+
i18n?: I18Next;
|
|
9
|
+
/** I18Next instance setter */
|
|
10
|
+
set i18nInstance(i18n: I18Next);
|
|
8
11
|
/**
|
|
9
12
|
* Method to return the current language used by the App
|
|
10
13
|
* @return {string} current language
|
|
@@ -23,4 +26,3 @@ export declare class TranslaterService implements UniversalTranslateService {
|
|
|
23
26
|
*/
|
|
24
27
|
translate(translationKey: string): string;
|
|
25
28
|
}
|
|
26
|
-
//# sourceMappingURL=translater.service.d.ts.map
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import i18next from 'i18next';
|
|
2
1
|
/**
|
|
3
2
|
* This is a Translate Service Wrapper for Slickgrid-Universal monorepo lib to work properly,
|
|
4
3
|
* it must implement Slickgrid-Universal TranslaterService interface to work properly
|
|
5
4
|
*/
|
|
6
|
-
export class
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
export class TranslaterI18NextService {
|
|
6
|
+
i18n;
|
|
7
|
+
/** I18Next instance setter */
|
|
8
|
+
set i18nInstance(i18n) {
|
|
9
|
+
this.i18n = i18n;
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
11
12
|
* Method to return the current language used by the App
|
|
12
13
|
* @return {string} current language
|
|
13
14
|
*/
|
|
14
15
|
getCurrentLanguage() {
|
|
15
|
-
return this.i18n
|
|
16
|
+
return this.i18n?.language || '';
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
19
|
* Method to set the language to use in the App and Translate Service
|
|
@@ -20,7 +21,7 @@ export class TranslaterService {
|
|
|
20
21
|
* @return {Promise} output
|
|
21
22
|
*/
|
|
22
23
|
async use(newLang) {
|
|
23
|
-
return this.i18n
|
|
24
|
+
return this.i18n?.changeLanguage(newLang);
|
|
24
25
|
}
|
|
25
26
|
/**
|
|
26
27
|
* Method which receives a translation key and returns the translated value assigned to that key
|
|
@@ -28,7 +29,7 @@ export class TranslaterService {
|
|
|
28
29
|
* @return {string} translated value
|
|
29
30
|
*/
|
|
30
31
|
translate(translationKey) {
|
|
31
|
-
return this.i18n
|
|
32
|
+
return this.i18n?.t(translationKey) || '';
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
|
-
//# sourceMappingURL=
|
|
35
|
+
//# sourceMappingURL=translaterI18Next.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translaterI18Next.service.js","sourceRoot":"","sources":["../../src/services/translaterI18Next.service.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,OAAO,wBAAwB;IAC5B,IAAI,CAAW;IAEtB,8BAA8B;IAC9B,IAAI,YAAY,CAAC,IAAa;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED;;;OAGG;IACH,kBAAkB;QAChB,OAAO,IAAI,CAAC,IAAI,EAAE,QAAQ,IAAI,EAAE,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,GAAG,CAAC,OAAe;QACvB,OAAO,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,cAAsB;QAC9B,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;IAC5C,CAAC;CACF","sourcesContent":["import type { TranslaterService as UniversalTranslateService } from '@slickgrid-universal/common';\n\nimport type { I18Next } from '../models/i18next.interface.js';\n\n/**\n * This is a Translate Service Wrapper for Slickgrid-Universal monorepo lib to work properly,\n * it must implement Slickgrid-Universal TranslaterService interface to work properly\n */\nexport class TranslaterI18NextService implements UniversalTranslateService {\n public i18n?: I18Next;\n\n /** I18Next instance setter */\n set i18nInstance(i18n: I18Next) {\n this.i18n = i18n;\n }\n\n /**\n * Method to return the current language used by the App\n * @return {string} current language\n */\n getCurrentLanguage(): string {\n return this.i18n?.language || '';\n }\n\n /**\n * Method to set the language to use in the App and Translate Service\n * @param {string} language\n * @return {Promise} output\n */\n async use(newLang: string): Promise<any> {\n return this.i18n?.changeLanguage(newLang);\n }\n\n /**\n * Method which receives a translation key and returns the translated value assigned to that key\n * @param {string} translation key\n * @return {string} translated value\n */\n translate(translationKey: string): string {\n return this.i18n?.t(translationKey) || '';\n }\n}\n"]}
|
|
@@ -7,7 +7,7 @@ export function disposeAllSubscriptions(subscriptions) {
|
|
|
7
7
|
if (Array.isArray(subscriptions)) {
|
|
8
8
|
while (subscriptions.length > 0) {
|
|
9
9
|
const subscription = subscriptions.pop();
|
|
10
|
-
if (subscription
|
|
10
|
+
if (subscription?.unsubscribe) {
|
|
11
11
|
subscription.unsubscribe();
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../../src/services/utilities.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,aAAuC;IAC7E,IAAI,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;QACjC,OAAO,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChC,MAAM,YAAY,GAAG,aAAa,CAAC,GAAG,EAAuB,CAAC;YAC9D,IAAK,YAAkC,EAAE,WAAW,EAAE,CAAC;gBACpD,YAAkC,CAAC,WAAY,EAAE,CAAC;YACrD,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["import type { EventSubscription } from '@slickgrid-universal/common';\n\n/**\n * Loop through and dispose of all subscriptions when they are disposable\n * @param subscriptions\n * @return empty array\n */\nexport function disposeAllSubscriptions(subscriptions: Array<EventSubscription>): Array<EventSubscription> {\n if (Array.isArray(subscriptions)) {\n while (subscriptions.length > 0) {\n const subscription = subscriptions.pop() as EventSubscription;\n if ((subscription as EventSubscription)?.unsubscribe) {\n (subscription as EventSubscription).unsubscribe!();\n }\n }\n }\n return subscriptions;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slickgrid-config.js","sourceRoot":"","sources":["../src/slickgrid-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,OAAO,eAAe;IAC1B,OAAO,CAAsB;IAE7B;QACE,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC;IACnC,CAAC;CACF","sourcesContent":["import type { GridOption } from './models/gridOption.interface.js';\nimport { GlobalGridOptions } from './global-grid-options.js';\n\nexport class SlickgridConfig {\n options: Partial<GridOption>;\n\n constructor() {\n this.options = GlobalGridOptions;\n }\n}\n"]}
|