Match-id-093c12d2a2ecaf8edf1894e8fa83ed3de5be7716

This commit is contained in:
* 2023-09-15 16:05:13 +08:00
parent 74ea35072d
commit 09f3b4c54c
18 changed files with 22 additions and 25 deletions

View File

@ -19,7 +19,7 @@ module.exports = {
"@babel/preset-react", "@babel/preset-react",
{ {
"runtime": "automatic", "runtime": "automatic",
"importSource": "@cloudsop/horizon" "importSource": "inulajs"
} }
] ]
], ],

View File

@ -2,7 +2,7 @@
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved. * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/ */
import Inula, { useState } from '@cloudsop/horizon'; import Inula, { useState } from 'inulajs';
import { IntlProvider } from "../index"; import { IntlProvider } from "../index";
import zh from "./locale/zh"; import zh from "./locale/zh";
import en from "./locale/en"; import en from "./locale/en";

View File

@ -2,7 +2,7 @@
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved. * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/ */
import Inula from "@cloudsop/horizon"; import Inula from "inulajs";
import { useIntl } from "../../index"; import { useIntl } from "../../index";
const Example1 = () => { const Example1 = () => {

View File

@ -1,7 +1,7 @@
/* /*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved. * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/ */
import Inula from "@cloudsop/horizon"; import Inula from "inulajs";
import { FormattedMessage } from "../../index"; import { FormattedMessage } from "../../index";
const Example2= () => { const Example2= () => {

View File

@ -2,7 +2,7 @@
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved. * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/ */
import Inula from '@cloudsop/horizon'; import Inula from 'inulajs';
import { FormattedMessage } from "../../index"; import { FormattedMessage } from "../../index";
const Example3 = (props) => { const Example3 = (props) => {

View File

@ -2,7 +2,7 @@
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved. * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/ */
import Inula from "@cloudsop/horizon"; import Inula from "inulajs";
import { createIntl } from "../../index"; import { createIntl } from "../../index";
const Example4 = (props) => { const Example4 = (props) => {

View File

@ -2,7 +2,7 @@
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved. * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/ */
import Inula, { Component } from '@cloudsop/horizon'; import Inula, { Component } from 'inulajs';
import { injectIntl } from '../../index'; import { injectIntl } from '../../index';
class Example5 extends Component<any, any, any> { class Example5 extends Component<any, any, any> {

View File

@ -2,7 +2,7 @@
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved. * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/ */
import Inula from "@cloudsop/horizon"; import Inula from "inulajs";
import { createIntl, createIntlCache, RawIntlProvider } from "../../index"; import { createIntl, createIntlCache, RawIntlProvider } from "../../index";
import Example6Child from "./Example6Child"; import Example6Child from "./Example6Child";

View File

@ -1,7 +1,7 @@
/* /*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved. * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/ */
import * as Inula from '@cloudsop/horizon'; import * as Inula from 'inulajs';
import App from './App' import App from './App'
function render() { function render() {

View File

@ -1,6 +1,6 @@
{ {
"name": "@cloudsop/horizon-intl", "name": "inula-intl",
"version": "1.0.22", "version": "0.0.1",
"description": "", "description": "",
"main": "build/intl.umd.js", "main": "build/intl.umd.js",
"type": "commonjs", "type": "commonjs",
@ -13,7 +13,7 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://szv-open.codehub.huawei.com/innersource/fenghuang/horizon/horizon-core.git" "url": ""
}, },
"files": [ "files": [
"build", "build",
@ -23,7 +23,7 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@cloudsop/horizon": "^0.0.58" "inulajs": "^0.0.11"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "7.21.3", "@babel/core": "7.21.3",

View File

@ -20,11 +20,8 @@ export default {
output: [ output: [
{ {
file: path.resolve(output, 'intl.umd.js'), file: path.resolve(output, 'intl.umd.js'),
name: 'HorizonI18n', name: 'InulaI18n',
format: 'umd', format: 'umd',
globals:{
'@cloudsop/horizon':'Horizon'
}
}, },
], ],
plugins: [ plugins: [
@ -46,7 +43,7 @@ export default {
terser(), terser(),
], ],
external:[ external:[
'@cloudsop/horizon', 'inulajs',
'react', 'react',
'react-dom' 'react-dom'
] ]

View File

@ -1,7 +1,7 @@
/* /*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved. * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/ */
import Inula, { Children, Fragment } from '@cloudsop/horizon'; import Inula, { Children, Fragment } from 'inulajs';
import { FormattedMessageProps } from '../../types/interfaces'; import { FormattedMessageProps } from '../../types/interfaces';
import useI18n from '../hook/useI18n'; import useI18n from '../hook/useI18n';

View File

@ -1,7 +1,7 @@
/* /*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved. * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/ */
import Inula, { useRef, useState, useEffect, useMemo, Component } from '@cloudsop/horizon'; import Inula, { useRef, useState, useEffect, useMemo, Component } from 'inulajs';
import utils from '../../utils/utils'; import utils from '../../utils/utils';
import { InjectProvider } from './InjectI18n'; import { InjectProvider } from './InjectI18n';
import I18n, { createI18nInstance } from '../I18n'; import I18n, { createI18nInstance } from '../I18n';

View File

@ -1,7 +1,7 @@
/* /*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved. * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/ */
import Inula , { createContext, forwardRef } from '@cloudsop/horizon'; import Inula , { createContext, forwardRef } from 'inulajs';
import { isVariantI18n } from '../../utils/utils'; import { isVariantI18n } from '../../utils/utils';
import copyStaticProps from '../../utils/copyStaticProps'; import copyStaticProps from '../../utils/copyStaticProps';
import { InjectOptions } from '../../types/interfaces'; import { InjectOptions } from '../../types/interfaces';

View File

@ -1,7 +1,7 @@
/* /*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved. * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/ */
import Inula, { useContext } from '@cloudsop/horizon'; import Inula, { useContext } from 'inulajs';
import utils from '../../utils/utils'; import utils from '../../utils/utils';
import { I18nContext } from '../components/InjectI18n'; import { I18nContext } from '../components/InjectI18n';
import I18n from '../I18n'; import I18n from '../I18n';

View File

@ -1,7 +1,7 @@
/* /*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved. * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/ */
import { isMemo, ForwardRef } from '@cloudsop/horizon'; import { isMemo, ForwardRef } from 'inulajs';
import { import {
INULA_FORWARD_REF_STATICS, INULA_FORWARD_REF_STATICS,
INULA_MEMO_STATICS, INULA_MEMO_STATICS,

View File

@ -3,7 +3,7 @@
*/ */
import copyStaticProps from '../../src/utils/copyStaticProps'; import copyStaticProps from '../../src/utils/copyStaticProps';
describe('hoistNonReactStatics', () => { describe('copyStaticProps', () => {
test('should hoist static properties from sourceComponent to targetComponent', () => { test('should hoist static properties from sourceComponent to targetComponent', () => {
class SourceComponent { class SourceComponent {
static staticProp = 'sourceProp'; static staticProp = 'sourceProp';

View File

@ -21,7 +21,7 @@ module.exports = {
'@babel/preset-react', '@babel/preset-react',
{ {
'runtime': 'automatic', // 新增 'runtime': 'automatic', // 新增
'importSource': '@cloudsop/horizon' // 新增 'importSource': 'inulajs' // 新增
} }
], ],
'@babel/preset-typescript'], '@babel/preset-typescript'],