jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/395516 )

Change subject: Move over files of Data View library (JS part)
......................................................................


Move over files of Data View library (JS part)

Bug: T180454
Change-Id: I2f654e17a46226959b66e21bd7fddd2dde124ea1
---
M .gitmodules
M lib/i18n/en.json
M lib/i18n/qqq.json
M repo/resources/Resources.php
A repo/resources/dataTypes/DataType.js
A repo/resources/dataTypes/DataTypeStore.js
A repo/resources/dataTypes/__namespace.js
M repo/resources/dataTypes/wikibase.dataTypeStore.js
A repo/tests/qunit/dataTypes/DataType.tests.js
A repo/tests/qunit/dataTypes/DataTypeStore.tests.js
M repo/tests/qunit/dataTypes/wikibase.dataTypeStore.tests.js
M repo/tests/qunit/resources.php
M view/lib/i18n.php
M view/lib/resources.php
D view/lib/resources/wikibase-data-types/resources.php
D view/lib/wikibase-data-types
M view/resources/jquery/wikibase/snakview/snakview.js
M view/resources/jquery/wikibase/snakview/snakview.variations.Value.js
M view/resources/jquery/wikibase/snakview/snakview.variations.Variation.js
M view/resources/wikibase/view/ViewFactory.js
M view/resources/wikibase/wikibase.ValueViewBuilder.js
M view/tests/qunit/jquery/wikibase/snakview/resources.php
M view/tests/qunit/jquery/wikibase/snakview/snakview.tests.js
23 files changed, 350 insertions(+), 67 deletions(-)

Approvals:
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.gitmodules b/.gitmodules
index 6c6af4f..fbb0476 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -13,6 +13,3 @@
 [submodule "view/lib/wikibase-data-model"]
        path = view/lib/wikibase-data-model
        url = https://phabricator.wikimedia.org/source/wikibase-data-model.git
-[submodule "view/lib/wikibase-data-types"]
-       path = view/lib/wikibase-data-types
-       url = https://phabricator.wikimedia.org/source/datatypes-javascript.git
diff --git a/lib/i18n/en.json b/lib/i18n/en.json
index 1e10275..85759d0 100644
--- a/lib/i18n/en.json
+++ b/lib/i18n/en.json
@@ -70,6 +70,16 @@
        "wikibase-validator-unknown-unit": "Unknown unit: $1",
        "wikibase-validator-not-allowed": "Illegal value: $1",
        "wikibase-validator-no-validators": "Forbidden",
+       "datatypes-type-string": "String",
+       "datatypes-type-quantity": "Quantity",
+       "datatypes-type-monolingualtext": "Monolingual text",
+       "datatypes-type-multilingualtext": "Multilingual text",
+       "datatypes-type-number": "Number",
+       "datatypes-type-mediawiki-title": "MediaWiki title",
+       "datatypes-type-unknown": "Unspecified",
+       "datatypes-type-boolean": "Boolean",
+       "datatypes-type-globe-coordinate": "Geographic coordinates",
+       "datatypes-type-time": "Point in time",
        "datatypes-type-wikibase-item": "Item",
        "datatypes-type-wikibase-property": "Property",
        "datatypes-type-commonsMedia": "Commons media file",
diff --git a/lib/i18n/qqq.json b/lib/i18n/qqq.json
index 9797653..6fb95e4 100644
--- a/lib/i18n/qqq.json
+++ b/lib/i18n/qqq.json
@@ -81,6 +81,16 @@
        "wikibase-validator-unknown-unit": "Input validation error when the 
value has an unknown unit.\n\nParameters:\n* $1 - the unknown 
unit\n{{Related|Wikibase-validator}}",
        "wikibase-validator-not-allowed": "Input validation error when the 
given value is not found in the known list of allowed values.\n\nParameters:\n* 
$1 - the illegal value\n{{Related|Wikibase-validator}}",
        "wikibase-validator-no-validators": "Input validation error when there 
are no validators that can pass (that is, the validation always fails, per 
configuration).\n\n{{Related|Wikibase-validator}}\n{{Identical|Forbidden}}",
+       "datatypes-type-string": "The name of a data 
type.\n{{Identical|String}}",
+       "datatypes-type-quantity": "The name of a data type for quantities 
(proper name, capitalised in English; first letter capitalised anyway in this 
message and relatives).\n{{Identical|Quantity}}",
+       "datatypes-type-monolingualtext": "The name of a data 
type.\n{{Identical|Monolingual text}}",
+       "datatypes-type-multilingualtext": "The name of a data 
type.\n{{Identical|Multilingual text}}",
+       "datatypes-type-number": "The name of a data 
type.\n{{Identical|Number}}",
+       "datatypes-type-mediawiki-title": "The name of a data type",
+       "datatypes-type-unknown": "The name of a data 
type\n{{Identical|Unspecified}}",
+       "datatypes-type-boolean": "The name of a data 
type\n{{Identical|Boolean}}",
+       "datatypes-type-globe-coordinate": "The name of a data type",
+       "datatypes-type-time": "The name of a data type.",
        "datatypes-type-wikibase-item": "The name of a data type for items in 
Wikibase.\n{{Identical|Item}}",
        "datatypes-type-wikibase-property": "The name of a data type for 
properties in Wikibase.\n{{Identical|Property}}",
        "datatypes-type-commonsMedia": "The name of a data type for media files 
on Wikimedia Commons (proper name, capitalised in English; first letter 
capitalised anyway in this message and 
relatives).\n\n{{related|Datatypes-type}}",
diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php
index c3c9f15..ea2d155 100644
--- a/repo/resources/Resources.php
+++ b/repo/resources/Resources.php
@@ -74,13 +74,35 @@
                        },
                ],
 
+               'wikibase.dataTypes.__namespace' => $moduleTemplate + [
+                       'scripts' => 'dataTypes/__namespace.js',
+                       'dependencies' => [
+                               'wikibase'
+                       ],
+          ],
+
+               'wikibase.dataTypes.DataType' => $moduleTemplate + [
+                       'scripts' => 'dataTypes/DataType.js',
+                       'dependencies' => [
+                               'wikibase.dataTypes.__namespace',
+                       ],
+               ],
+
+               'wikibase.dataTypes.DataTypeStore' => $moduleTemplate + [
+                       'scripts' => 'dataTypes/DataTypeStore.js',
+                       'dependencies' => [
+                               'wikibase.dataTypes.__namespace',
+                               'wikibase.dataTypes.DataType',
+                       ]
+               ],
+
                'wikibase.dataTypeStore' => $moduleTemplate + [
                        'scripts' => [
                                'dataTypes/wikibase.dataTypeStore.js',
                        ],
                        'dependencies' => [
-                               'dataTypes.DataType',
-                               'dataTypes.DataTypeStore',
+                               'wikibase.dataTypes.DataType',
+                               'wikibase.dataTypes.DataTypeStore',
                                'mw.config.values.wbDataTypes',
                                'wikibase',
                        ],
diff --git a/repo/resources/dataTypes/DataType.js 
b/repo/resources/dataTypes/DataType.js
new file mode 100644
index 0000000..89b74ee
--- /dev/null
+++ b/repo/resources/dataTypes/DataType.js
@@ -0,0 +1,82 @@
+( function ( $, wb ) {
+       'use strict';
+
+       /**
+        * Base constructor for objects representing a data type.
+        * @class wikibase.dataTypes.DataType
+        * @abstract
+        * @since 0.1
+        * @license GPL-2.0+
+        * @author Daniel Werner
+        * @author H. Snater < [email protected] >
+        *
+        * @constructor
+        * @param {string} dataTypeId
+        * @param {string} dataValueType
+        *
+        * @throws {Error} if data type id is not provided as a string.
+        * @throws {Error} if data value type is not provided as a string.
+        */
+       var SELF = wb.dataTypes.DataType = function DtDataType( dataTypeId, 
dataValueType ) {
+               if ( !dataTypeId || typeof dataTypeId !== 'string' ) {
+                       throw new Error( 'A data type\'s ID has to be a string' 
);
+               }
+
+               if ( typeof dataValueType !== 'string' ) {
+                       throw new Error( 'A data value type has to be given in 
form of a string' );
+               }
+
+               this._id = dataTypeId;
+               this._dataValueType = dataValueType;
+       };
+
+       /**
+        * @class wikibase.dataTypes.DataType
+        */
+       $.extend( SELF.prototype, {
+               /**
+                * Data type (a.k.a. property type) identifier.
+                * @property {string}
+                * @private
+                */
+               _id: null,
+
+               /**
+                * Identifier of the data value type internally used by this 
data type.
+                * @property {string}
+                * @private
+                */
+               _dataValueType: null,
+
+               /**
+                * Returns the data type (a.k.a. property type) identifier.
+                *
+                * @return {string}
+                */
+               getId: function () {
+                       return this._id;
+               },
+
+               /**
+                * Returns the identifier of the data value type internally 
used by this data type.
+                *
+                * @return {string}
+                */
+               getDataValueType: function () {
+                       return this._dataValueType;
+               }
+       } );
+
+       /**
+        * Creates a new DataType object from a given JSON structure.
+        * @static
+        *
+        * @param {string} dataTypeId
+        * @param {Object} json
+        * @return {dataTypes.DataType}
+        */
+       SELF.newFromJSON = function ( dataTypeId, json ) {
+               return new SELF( dataTypeId, json.dataValueType );
+       };
+
+}( jQuery, wikibase ) );
diff --git a/repo/resources/dataTypes/DataTypeStore.js 
b/repo/resources/dataTypes/DataTypeStore.js
new file mode 100644
index 0000000..93045dc
--- /dev/null
+++ b/repo/resources/dataTypes/DataTypeStore.js
@@ -0,0 +1,68 @@
+( function ( $, wb ) {
+       'use strict';
+
+       /**
+        * @class wikibase.dataTypes.DataTypeStore
+        * @since 0.2
+        * @license GPL-2.0+
+        * @author H. Snater < [email protected] >
+        *
+        * @constructor
+        */
+       var SELF = wb.dataTypes.DataTypeStore = function DtDataTypeStore() {
+               this._dataTypes = {};
+       };
+
+       /**
+        * @class dataTypes.DataTypeStore
+        */
+       $.extend( SELF.prototype, {
+               /**
+                * Data type definitions.
+                * @property {Object} [_dataTypes={}]
+                * @private
+                */
+               _dataTypes: null,
+
+               /**
+                * Returns the data type of a specific data type id.
+                *
+                * @param {string} dataTypeId
+                * @return {dataTypes.DataType|null}
+                *
+                * @throws {Error} when supplied data type id is not a string.
+                */
+               getDataType: function ( dataTypeId ) {
+                       if ( !dataTypeId || typeof dataTypeId !== 'string' ) {
+                               throw new Error( 'The ID given to identify a 
data type needs to be a string' );
+                       }
+                       return this._dataTypes[ dataTypeId ] || null;
+               },
+
+               /**
+                * Returns if there is a DataType of the provided type.
+                *
+                * @param {string} dataTypeId
+                * @return {boolean}
+                */
+               hasDataType: function ( dataTypeId ) {
+                       return this._dataTypes[ dataTypeId ] !== undefined;
+               },
+
+               /**
+                * Registers a new data type. A data type already registered 
for the id of the new data type
+                * will be overwritten.
+                *
+                * @param {dataTypes.DataType} dataType
+                *
+                * @throws {Error} if data type is not a DataType instance.
+                */
+               registerDataType: function ( dataType ) {
+                       if ( !( dataType instanceof wb.dataTypes.DataType ) ) {
+                               throw new Error( 'Can only register instances 
of wikibase.dataTypes.DataType' );
+                       }
+                       this._dataTypes[ dataType.getId() ] = dataType;
+               }
+       } );
+
+}( jQuery, wikibase ) );
diff --git a/repo/resources/dataTypes/__namespace.js 
b/repo/resources/dataTypes/__namespace.js
new file mode 100644
index 0000000..b0adebe
--- /dev/null
+++ b/repo/resources/dataTypes/__namespace.js
@@ -0,0 +1,4 @@
+/**
+ * @ignore
+ */
+this.wikibase.dataTypes = {};
diff --git a/repo/resources/dataTypes/wikibase.dataTypeStore.js 
b/repo/resources/dataTypes/wikibase.dataTypeStore.js
index 76fb3be..8ae247c 100644
--- a/repo/resources/dataTypes/wikibase.dataTypeStore.js
+++ b/repo/resources/dataTypes/wikibase.dataTypeStore.js
@@ -3,16 +3,16 @@
  * @author Daniel Werner < [email protected] >
  * @author H. Snater < [email protected] >
  */
-wikibase.dataTypeStore = ( function ( $, mw, dataTypes ) {
+wikibase.dataTypeStore = ( function ( $, mw, wb ) {
        'use strict';
 
-       var dataTypeStore = new dataTypes.DataTypeStore(),
+       var dataTypeStore = new wb.dataTypes.DataTypeStore(),
                dataTypeDefinitions = mw.config.get( 'wbDataTypes' ) || {};
 
        $.each( dataTypeDefinitions, function ( dtTypeId, dtDefinition ) {
-               dataTypeStore.registerDataType( dataTypes.DataType.newFromJSON( 
dtTypeId, dtDefinition ) );
+               dataTypeStore.registerDataType( 
wb.dataTypes.DataType.newFromJSON( dtTypeId, dtDefinition ) );
        } );
 
        return dataTypeStore;
 
-}( jQuery, mediaWiki, dataTypes ) );
+}( jQuery, mediaWiki, wikibase ) );
diff --git a/repo/tests/qunit/dataTypes/DataType.tests.js 
b/repo/tests/qunit/dataTypes/DataType.tests.js
new file mode 100644
index 0000000..b666244
--- /dev/null
+++ b/repo/tests/qunit/dataTypes/DataType.tests.js
@@ -0,0 +1,84 @@
+/**
+ * @license GPL-2.0+
+ * @author Daniel Werner < [email protected] >
+ */
+( function ( QUnit, dt ) {
+       'use strict';
+
+       var DataType = dt.DataType;
+
+       QUnit.module( 'wikibase.dataTypes.DataType' );
+
+       QUnit.test( 'constructor', function ( assert ) {
+               var dataType = new DataType( 'foo', 'string' );
+
+               assert.ok(
+                       dataType instanceof DataType,
+                       'New data type created and instance of DataType'
+               );
+       } );
+
+       QUnit.test( 'getId', function ( assert ) {
+               var dataType = new DataType( 'foo', 'string' );
+
+               assert.strictEqual(
+                       dataType.getId(),
+                       'foo',
+                       'getId() returns string ID provided in constructor'
+               );
+       } );
+
+       QUnit.test( 'getDataValueType', function ( assert ) {
+               var dataType = new DataType( 'foo', 'string' ),
+                       dvType = dataType.getDataValueType();
+
+               assert.equal(
+                       typeof dvType,
+                       'string',
+                       'getDataValueType() returns string'
+               );
+
+               assert.ok(
+                       dvType !== '',
+                       'string returned by getDataValueType() is not empty'
+               );
+       } );
+
+       var invalidArguments = [
+               {
+                       title: 'no arguments',
+                       constructorParams: []
+               },
+               {
+                       title: 'missing data value type',
+                       constructorParams: [ 'foo' ]
+               },
+               {
+                       title: 'wrong type for data value type',
+                       constructorParams: [ 'foo', {} ]
+               },
+               {
+                       title: 'wrong type for ID',
+                       constructorParams: [ null, 'xxx' ]
+               }
+       ];
+
+       QUnit.test( 'invalid constructor arguments', function ( assert ) {
+               assert.expect( invalidArguments.length );
+
+               function instantiateObject( testArguments ) {
+                       return function () {
+                               var args = testArguments.constructorParams;
+                               return new DataType( args[ 0 ], args[ 1 ] );
+                       };
+               }
+
+               for ( var i = 0; i < invalidArguments.length; i++ ) {
+                       assert.throws(
+                               instantiateObject( invalidArguments[ i ] ),
+                               'DataType can not be constructed from invalid 
arguments: ' + invalidArguments[ i ].title
+                       );
+               }
+       } );
+
+}( QUnit, wikibase.dataTypes ) );
diff --git a/repo/tests/qunit/dataTypes/DataTypeStore.tests.js 
b/repo/tests/qunit/dataTypes/DataTypeStore.tests.js
new file mode 100644
index 0000000..414605f
--- /dev/null
+++ b/repo/tests/qunit/dataTypes/DataTypeStore.tests.js
@@ -0,0 +1,28 @@
+/**
+ * @license GPL-2.0+
+ * @author H. Snater < [email protected] >
+ */
+( function ( QUnit, dataTypes ) {
+       'use strict';
+
+       QUnit.module( 'wikibase.dataTypes.DataTypeStore' );
+
+       QUnit.test( 'Test initializing a DataType object', function ( assert ) {
+               var dataTypeStore = new dataTypes.DataTypeStore(),
+                       testDataType = new dataTypes.DataType( 'foo', 
'fooDataValueType' ),
+                       testDataTypeId = testDataType.getId();
+
+               dataTypeStore.registerDataType( testDataType );
+
+               assert.ok(
+                       dataTypeStore.hasDataType( testDataTypeId ),
+                       'hasDataType: Data type "' + testDataTypeId + '" is 
available after registering it'
+               );
+
+               assert.ok(
+                       testDataType === dataTypeStore.getDataType( 
testDataTypeId ),
+                       'getDataType: returns exact same instance of the data 
type which was registered before'
+               );
+       } );
+
+}( QUnit, wikibase.dataTypes ) );
diff --git a/repo/tests/qunit/dataTypes/wikibase.dataTypeStore.tests.js 
b/repo/tests/qunit/dataTypes/wikibase.dataTypeStore.tests.js
index fdc08da..64f1f4d 100644
--- a/repo/tests/qunit/dataTypes/wikibase.dataTypeStore.tests.js
+++ b/repo/tests/qunit/dataTypes/wikibase.dataTypeStore.tests.js
@@ -16,4 +16,4 @@
                );
        } );
 
-}( QUnit, wikibase.dataTypeStore, dataTypes ) );
+}( QUnit, wikibase.dataTypeStore, wikibase.dataTypes ) );
diff --git a/repo/tests/qunit/resources.php b/repo/tests/qunit/resources.php
index b4d17be..7d0e343 100644
--- a/repo/tests/qunit/resources.php
+++ b/repo/tests/qunit/resources.php
@@ -25,12 +25,30 @@
                        ],
                ],
 
+               'wikibase.dataTypes.DataType.tests' => $moduleBase + [
+                       'scripts' => [
+                               'dataTypes/DataType.tests.js',
+                       ],
+                       'dependencies' => [
+                               'wikibase.dataTypes.DataType'
+                       ],
+               ],
+
+               'wikibase.dataTypes.DataTypeStore.tests' => $moduleBase + [
+                       'scripts' => [
+                               'dataTypes/DataTypeStore.tests.js',
+                       ],
+                       'dependencies' => [
+                               'wikibase.dataTypes.DataTypeStore'
+                       ],
+               ],
+
                'wikibase.dataTypeStore.tests' => $moduleBase + [
                        'scripts' => [
                                'dataTypes/wikibase.dataTypeStore.tests.js',
                        ],
                        'dependencies' => [
-                               'dataTypes.DataTypeStore',
+                               'wikibase.dataTypes.DataTypeStore',
                                'wikibase.dataTypeStore',
                        ],
                ],
diff --git a/view/lib/i18n.php b/view/lib/i18n.php
index 59bc2bd..538a092 100644
--- a/view/lib/i18n.php
+++ b/view/lib/i18n.php
@@ -8,7 +8,6 @@
 
        $wgMessagesDirs['WikibaseView'] = array_merge(
                $wgMessagesDirs['WikibaseView'],
-               [ __DIR__ . '/wikibase-data-values-value-view/i18n' ],
-               [ __DIR__ . '/wikibase-data-types/i18n' ]
+               [ __DIR__ . '/wikibase-data-values-value-view/i18n' ]
        );
 } );
diff --git a/view/lib/resources.php b/view/lib/resources.php
index 45a4f40..9ef13c0 100644
--- a/view/lib/resources.php
+++ b/view/lib/resources.php
@@ -9,7 +9,6 @@
                include __DIR__ . '/resources/wikibase-data-values.php',
                include __DIR__ . '/resources/wikibase-serialization.php',
                include __DIR__ . '/resources/wikibase-api.php',
-               include __DIR__ . '/resources/wikibase-data-types.php',
                include __DIR__ . 
'/resources/wikibase-data-values-value-view.php'
        );
 } );
diff --git a/view/lib/resources/wikibase-data-types/resources.php 
b/view/lib/resources/wikibase-data-types/resources.php
deleted file mode 100644
index d5413ae..0000000
--- a/view/lib/resources/wikibase-data-types/resources.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-/**
- * @license GPL-2.0+
- */
-return call_user_func( function() {
-       $dir = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 
'..' . DIRECTORY_SEPARATOR
-               . 'wikibase-data-types' . DIRECTORY_SEPARATOR . 'src';
-
-       preg_match( '+' . preg_quote( DIRECTORY_SEPARATOR ) . 
'(?:vendor|extensions)'
-               . preg_quote( DIRECTORY_SEPARATOR ) . '.*+', $dir, 
$remoteExtPath );
-
-       $moduleTemplate = [
-               'localBasePath' => $dir,
-               'remoteExtPath' => '..' . $remoteExtPath[0],
-       ];
-
-       return [
-               'dataTypes.__namespace' => $moduleTemplate + [
-                       'scripts' => [
-                               'dataTypes/__namespace.js'
-                       ]
-               ],
-               'dataTypes.DataType' => $moduleTemplate + [
-                       'scripts' => 'dataTypes/DataType.js',
-                       'dependencies' => 'dataTypes.__namespace',
-               ],
-               'dataTypes.DataTypeStore' => $moduleTemplate + [
-                       'scripts' => 'dataTypes/DataTypeStore.js',
-                       'dependencies' => [
-                               'dataTypes.__namespace',
-                               'dataTypes.DataType',
-                       ]
-               ],
-       ];
-} );
diff --git a/view/lib/wikibase-data-types b/view/lib/wikibase-data-types
deleted file mode 160000
index f245ffd..0000000
--- a/view/lib/wikibase-data-types
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit f245ffd1f1037f7ad81729e8d0529e7df85072bd
diff --git a/view/resources/jquery/wikibase/snakview/snakview.js 
b/view/resources/jquery/wikibase/snakview/snakview.js
index a324e00..50aae29 100644
--- a/view/resources/jquery/wikibase/snakview/snakview.js
+++ b/view/resources/jquery/wikibase/snakview/snakview.js
@@ -42,8 +42,8 @@
         *        Required for dynamically gathering `Entity`/`Property` 
information.
         * @param {wikibase.ValueViewBuilder} options.valueViewBuilder
         *        Required to interfacing a `snakview` "value" `Variation` to 
`jQuery.valueview`.
-        * @param {dataTypes.DataTypeStore} options.dataTypeStore
-        *        Required to retrieve and evaluate a proper 
`dataTypes.DataType` object when interacting on
+        * @param {wikibase.dataTypes.DataTypeStore} options.dataTypeStore
+        *        Required to retrieve and evaluate a proper 
`wikibase.dataTypes.DataType` object when interacting on
         *        a "value" `Variation`.
         * @param {boolean} [options.drawProperty=true]
         *        The `Property` part of the `snakview` is not rendered when 
`drawProperty` is false.
diff --git 
a/view/resources/jquery/wikibase/snakview/snakview.variations.Value.js 
b/view/resources/jquery/wikibase/snakview/snakview.variations.Value.js
index f3b8b43..525f238 100644
--- a/view/resources/jquery/wikibase/snakview/snakview.variations.Value.js
+++ b/view/resources/jquery/wikibase/snakview/snakview.variations.Value.js
@@ -110,7 +110,7 @@
                         * @private
                         *
                         * @param {wikibase.datamodel.Property|undefined|null} 
property
-                        * @return {dataTypes.DataType|null}
+                        * @return {wikibase.dataTypes.DataType|null}
                         */
                        function _getDataType( property ) {
                                // If the set property is not there, we have to 
display a warning. This can happen
@@ -350,7 +350,7 @@
                 * @private
                 *
                 * @param {dataValues.DataValue} dataValue
-                * @param {dataTypes.DataType} [dataType] The `DataTypes` which 
the given `DataValue` has
+                * @param {wikibase.dataTypes.DataType} [dataType] The 
`DataTypes` which the given `DataValue` has
                 *        been created for. Can be omitted but might result in 
a less specialized
                 *        `jQuery.valueview`.
                 * @param {string} [propertyId]
diff --git 
a/view/resources/jquery/wikibase/snakview/snakview.variations.Variation.js 
b/view/resources/jquery/wikibase/snakview/snakview.variations.Variation.js
index 0de062b..e32156b 100644
--- a/view/resources/jquery/wikibase/snakview/snakview.variations.Variation.js
+++ b/view/resources/jquery/wikibase/snakview/snakview.variations.Variation.js
@@ -28,10 +28,10 @@
         * @param {wikibase.store.EntityStore} entityStore Enables the 
`Variation` to retrieve `Entity`
         *        information.
         * @param {wikibase.ValueViewBuilder} valueViewBuilder Enables the 
`Variation` to have
-        *        `jQuery.valueview` instances created according to particular 
`dataTypes.DataType` /
+        *        `jQuery.valueview` instances created according to particular 
`wikibase.dataTypes.DataType` /
         *        `dataValues.DataValue` objects.
-        * @param {dataTypes.DataTypeStore} dataTypeStore Enables the 
`Variation` to retrieve a
-        *        `dataTypes.DataType` instance for a particular `DataType` ID.
+        * @param {wikibase.dataTypes.DataTypeStore} dataTypeStore Enables the 
`Variation` to retrieve a
+        *        `wikibase.dataTypes.DataType` instance for a particular 
`DataType` ID.
         *
         * @throws {Error} if a required parameter is not specified properly.
         */
@@ -106,7 +106,7 @@
                _viewState: null,
 
                /**
-                * @property {dataTypes.DataTypeStore}
+                * @property {wikibase.dataTypes.DataTypeStore}
                 */
                _dataTypeStore: null,
 
diff --git a/view/resources/wikibase/view/ViewFactory.js 
b/view/resources/wikibase/view/ViewFactory.js
index d425f74..28d384e 100644
--- a/view/resources/wikibase/view/ViewFactory.js
+++ b/view/resources/wikibase/view/ViewFactory.js
@@ -16,7 +16,7 @@
         *        Required by the `ValueView` for limiting the list of 
available languages for
         *        particular `jQuery.valueview.Expert` instances like the 
`Expert` responsible
         *        for `MonoLingualTextValue`s.
-        * @param {dataTypes.DataTypeStore} dataTypeStore
+        * @param {wikibase.dataTypes.DataTypeStore} dataTypeStore
         *        Required by the `snakview` for retrieving and evaluating a 
proper `dataTypes.DataType`
         *        object when interacting on a "value" `Variation`.
         * @param {wikibase.entityIdFormatter.EntityIdHtmlFormatter} 
entityIdHtmlFormatter
@@ -93,7 +93,7 @@
        SELF.prototype._contentLanguages = null;
 
        /**
-        * @property {dataTypes.DataTypeStore}
+        * @property {wikibase.dataTypes.DataTypeStore}
         * @private
         */
        SELF.prototype._dataTypeStore = null;
diff --git a/view/resources/wikibase/wikibase.ValueViewBuilder.js 
b/view/resources/wikibase/wikibase.ValueViewBuilder.js
index cbd5ed6..8e247d0 100644
--- a/view/resources/wikibase/wikibase.ValueViewBuilder.js
+++ b/view/resources/wikibase/wikibase.ValueViewBuilder.js
@@ -52,7 +52,7 @@
 
                /**
                 * @param {jQuery} $valueViewDom
-                * @param {dataTypes.DataType|null} dataType
+                * @param {wikibase.dataTypes.DataType|null} dataType
                 * @param {dataValues.DataValue|null} dataValue
                 * @param {string|null} propertyId
                 *
@@ -71,7 +71,7 @@
                },
 
                /**
-                * @param {dataTypes.DataType|null} dataType
+                * @param {wikibase.dataTypes.DataType|null} dataType
                 * @param {dataValues.DataValue|null} dataValue
                 * @param {string|null} propertyId
                 *
diff --git a/view/tests/qunit/jquery/wikibase/snakview/resources.php 
b/view/tests/qunit/jquery/wikibase/snakview/resources.php
index 65f0b3b..738685d 100644
--- a/view/tests/qunit/jquery/wikibase/snakview/resources.php
+++ b/view/tests/qunit/jquery/wikibase/snakview/resources.php
@@ -22,7 +22,6 @@
                                'snakview.tests.js',
                        ],
                        'dependencies' => [
-                               'dataTypes.DataTypeStore',
                                'jquery.wikibase.snakview',
                                'wikibase.datamodel.Property',
                                'wikibase.datamodel.PropertyNoValueSnak',
diff --git a/view/tests/qunit/jquery/wikibase/snakview/snakview.tests.js 
b/view/tests/qunit/jquery/wikibase/snakview/snakview.tests.js
index fe67839..d515b37 100644
--- a/view/tests/qunit/jquery/wikibase/snakview/snakview.tests.js
+++ b/view/tests/qunit/jquery/wikibase/snakview/snakview.tests.js
@@ -2,7 +2,7 @@
  * @license GPL-2.0+
  * @author H. Snater < [email protected] >
  */
-( function ( $, QUnit, wb, dt, mw ) {
+( function ( $, QUnit, wb, mw ) {
        'use strict';
 
        QUnit.module( 'jquery.wikibase.snakview', QUnit.newMwEnvironment( {
@@ -49,7 +49,7 @@
                        getSnakRemover: function () {
                        },
                        valueViewBuilder: 'I am a ValueViewBuilder',
-                       dataTypeStore: new dt.DataTypeStore()
+                       dataTypeStore: new wb.dataTypes.DataTypeStore()
                }, options || {} );
 
                $node = $node || $( '<div/>' ).appendTo( 'body' );
@@ -303,4 +303,4 @@
                );
        } );
 
-}( jQuery, QUnit, wikibase, dataTypes, mediaWiki ) );
+}( jQuery, QUnit, wikibase, mediaWiki ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/395516
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f654e17a46226959b66e21bd7fddd2dde124ea1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to