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",
{
"runtime": "automatic",
"importSource": "@cloudsop/horizon"
"importSource": "inulajs"
}
]
],

View File

@ -2,7 +2,7 @@
* 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 zh from "./locale/zh";
import en from "./locale/en";

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
* 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';
class Example5 extends Component<any, any, any> {

View File

@ -2,7 +2,7 @@
* 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 Example6Child from "./Example6Child";

View File

@ -1,7 +1,7 @@
/*
* 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'
function render() {

View File

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

View File

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

View File

@ -1,7 +1,7 @@
/*
* 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 useI18n from '../hook/useI18n';

View File

@ -1,7 +1,7 @@
/*
* 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 { InjectProvider } from './InjectI18n';
import I18n, { createI18nInstance } from '../I18n';

View File

@ -1,7 +1,7 @@
/*
* 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 copyStaticProps from '../../utils/copyStaticProps';
import { InjectOptions } from '../../types/interfaces';

View File

@ -1,7 +1,7 @@
/*
* 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 { I18nContext } from '../components/InjectI18n';
import I18n from '../I18n';

View File

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

View File

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

View File

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