Skip to content

Commit

Permalink
1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Feb 27, 2023
1 parent 0ee7367 commit fbf9a1f
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Js.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Df\Phone;
namespace Dfe\Phone;
use Magento\Framework\View\Element\AbstractBlock as _P;
/** 2017-09-06 @final Unable to use the PHP «final» keyword here because of the M2 code generation. */
class Js extends _P {
Expand All @@ -25,5 +25,5 @@ class Js extends _P {
*/
final protected function _toHtml():string {return df_js(__CLASS__, '', [
'countries' => df_country_codes_allowed()
]) . df_cc_br(df_link_inline('Df_Phone::lib/css/main.css', 'Df_Phone::main.css'));}
]) . df_cc_br(df_link_inline('Dfe_Phone::lib/css/main.css', 'Dfe_Phone::main.css'));}
}
2 changes: 1 addition & 1 deletion Test/Basic.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Df\Phone\Test;
namespace Dfe\Phone\Test;
# 2017-04-25
final class Basic extends TestCase {
/** 2017-04-24 @test */
Expand Down
4 changes: 2 additions & 2 deletions Test/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Df\Phone\Test;
namespace Dfe\Phone\Test;
# 2017-04-25
/** @see \Df\Phone\Test\Basic */
/** @see \Dfe\Phone\Test\Basic */
abstract class TestCase extends \Df\Payment\TestCase {}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage2pro/phone"
,"version": "1.2.0"
,"version": "1.2.1"
,"description": "A telephone numbers handling library for my Magento 2 extensions."
,"type": "magento2-module"
,"homepage": "https://github.com/mage2pro/phone"
Expand All @@ -12,5 +12,5 @@
"role": "Developer"
}]
,"require": {"mage2pro/core": ">=4.2.2", "giggsey/libphonenumber-for-php": ">=8.4.1"}
,"autoload": {"files": ["registration.php"], "psr-4": {"Df\\Phone\\": ""}}
,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\Phone\\": ""}}
}
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation='urn:magento:framework:Module/etc/module.xsd'
>
<module name='Df_Phone' setup_version='1.0.0'>
<module name='Dfe_Phone' setup_version='1.0.0'>
<sequence>
<module name='Df_Core'/>
</sequence>
Expand Down
2 changes: 1 addition & 1 deletion registration.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
use Magento\Framework\Component\ComponentRegistrar as R;
R::register(R::MODULE, 'Df_Phone', __DIR__);
R::register(R::MODULE, 'Dfe_Phone', __DIR__);
# 2017-04-25, 2017-12-13
# Unfortunately, I have not found a way to make this code reusable among my modules.
# I tried to move this code to a `/lib` function like df_lib(), but it raises a «chicken and egg» problem,
Expand Down
10 changes: 5 additions & 5 deletions view/base/web/main.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// 2017-09-06
define([
'df-lodash', 'jquery', 'ko', 'Df_Phone/lib/js/main'
'df-lodash', 'jquery', 'ko', 'Dfe_Phone/lib/js/main'
// 2017-09-09
// It is not used by the binding itself,
// but in practice it is always used by the binding users, so I decided to place it here,
// and now the binding users can write define(['Df_Phone/main'], function() {...})
// instead of define(['Df_Phone/main', 'Df_Phone/validator'], function() {...})
,'Df_Phone/validator'
// and now the binding users can write define(['Dfe_Phone/main'], function() {...})
// instead of define(['Dfe_Phone/main', 'Dfe_Phone/validator'], function() {...})
,'Dfe_Phone/validator'
], function (_, $, ko) {return (
/**
* 2017-09-06
Expand Down Expand Up @@ -144,7 +144,7 @@ function(c) {ko.bindingHandlers['df-phone'] = {init: function(e, accessor) {var
// https://github.com/jackocnr/intl-tel-input/blob/v12.0.2/build/js/intlTelInput.js#L1086-L1105
// handleUtils():
// https://github.com/jackocnr/intl-tel-input/blob/v12.0.2/build/js/intlTelInput.js#L938-L949
require(['Df_Phone/lib/js/utils'], function() {
require(['Dfe_Phone/lib/js/utils'], function() {
$.fn.intlTelInput.loadedUtilsScript = true;
$e.intlTelInput('handleUtils');
});
Expand Down
2 changes: 1 addition & 1 deletion view/base/web/validator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(['df', 'Df_Ui/validator', 'Df_Phone/lib/js/utils'], function(df, vr) {
define(['df', 'Df_Ui/validator', 'Dfe_Phone/lib/js/utils'], function(df, vr) {
vr.add('phone', function(v) {
// 2017-09-09
// intlTelInputUtils.isValidNumber() accepts the Cyrillic letters
Expand Down

0 comments on commit fbf9a1f

Please sign in to comment.